Ok some precision to the bug...
It seems that if I embeded my Icon into an external class like Assets it
broke...
(Example: [Embed(source="../../images/ParagrapheMathematique.swf",
symbol="mover")]
public static const ICONE_MOVER:Class; )
But inside the same mxml it doesn't.
(Example: <![CDATA[
[Embed(source="../images/ParagrapheMathematique.swf",
symbol="mover")]
public static const ICONE_MOVER2:Class; ...)
But it still is a big issue for me to not be able to use an external class.
On 9/5/07, Guillaume Malartre <[EMAIL PROTECTED]> wrote:
>
> Hi!
> I've got a weird issue with embed image.
> I'm currently learning how to handle state view. Here's what I don't
> understand :
>
> <mx:State name="Basic">
> <mx:AddChild position="lastChild">
> <mx:HBox id="hbox0"/>
> </mx:AddChild>
> </mx:State>
> <mx:State name="Test1" basedOn="Basic">
> <mx:AddChild relativeTo="{hbox0}" position="lastChild">
> <mx:Button icon="{Assets.ICONE_MFRAC}"/> //The icon create
> the problem. no warning or error here
> </mx:AddChild>
> </mx:State>
> <mx:State name="Test2" basedOn="Basic">
> <mx:AddChild relativeTo="{hbox0}" position="lastChild"> //this
> line get a warning and when rendered the button appears to be on the parent
> component
> <mx:Button icon="{Assets.ICONE_MFRAC}"/>
> //Data binding will not be able to detect assignments to "hbox0". hmkay
> but why?
> </mx:AddChild>
> </mx:State>
>
> but if I do this :
>
> <mx:State name="Basic">
> <mx:AddChild position="lastChild">
> <mx:HBox id="hbox0"/>
> </mx:AddChild>
> </mx:State>
> <mx:State name="Test1" basedOn="Basic">
> <mx:AddChild relativeTo="{hbox0}" position="lastChild">
> <mx:Button/> //No icon
> </mx:AddChild>
> </mx:State>
> <mx:State name="Test2" basedOn="Basic">
> <mx:AddChild relativeTo="{hbox0}" position="lastChild"> //work
> fine! no error of warning anywere but whyyyy??????
> <mx:Button icon="{ Assets.ICONE_MFRAC}"/>
> </mx:AddChild>
> </mx:State>
>
> If anyone could give me a hint on this issue it would be great.
>
> --
> Thanks,
> Guillaume
>
>
--
Merci,
Guillaume
Guillaume Malartre
Programmeur-Analyste, Scolab
514-528-8066, 1-888-528-8066
Besoin d'aide en maths?
www.NetMaths.net