header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
action2n3
Points:200
Posts:0

11/1/2010 2:14:16 AM

Title: Assign dynamic id to flex components


Hi,

Is it possible to assign dynamic id to flex components like:

var dId:String = "myImage";

<mx:Image id="{dId}" />

I am trying to do it in an itemRenderer, the code is as under:
<mx:itemRenderer>
<mx:Component>
<mx:Image id="{data.id.toString()}"
source="{data.url}"
width="23"
height="19"
buttonMode="true"
toolTip="{data.tipText}"
mouseDown="outerDocument.imageMouseDownHandler(event)">
</mx:Image>
</mx:Component>
</mx:itemRenderer>

and the error is:
'{data.id.toString()}' is not a valid identifier.


Thanks for any help




Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+8 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions