Flex: access of undefined property
Hi all,
I suppose I'm overlooking something very basic, but I can't get something very simple to work.
I try, for example, to access a Graphic from the script block in Flex like this:
immibgroundRect.alpha = 0.5;
The graphic is like this:
PHP Code:
<s:Graphic id="immi" toolTip="{'immigratie: '}{Number(data.immi)*10000}">
<s:Rect id="immibgroundRect"
width="{Number(data.immi)*9}" height="26"
x="{Number(data.pop)*9}" y="0">
<s:fill>
<s:BitmapFill source="@Embed('../assets/man-in.png')" fillMode="repeat"/>
</s:fill>
</s:Rect>
</s:Graphic>
The names match and both highlight grey when I select them yet I get the error:
1120: Access of undefined property immibgroundRect.
What am I missing here? Thanks very much in advance for your help.