Right, I would never expect you to be able
to successfully get information from childDescriptors, that’s used to
instantiate, it’s not the object itself.
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of bhaq1972
Sent: Thursday, October 27, 2005
3:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: set
Effect at runtime
try
mx.core.Application.application.canvas1.viewstack1.panel1.viewstack2.
selectedChild.getChildAt(0).getStyle("fontSize");
-- In flexcoders@yahoogroups.com,
"keishichi2001"
<[EMAIL PROTECTED]> wrote:
>
> Actually, 'viewstack2' has defined as
following.
>
> <mx:ViewStack id="viewstack2"
width="100%" height="100%"
>
selectedIndex="{ModelLocator.currentPageNum - 1}" >
> <mx:Canvas id="cv_1"
width="100%" height="100%" >
> <mx:Image
x="0" y="0" source="assets/img01.jpg"
moveEffect="b" />
> </mx:Canvas>
> <mx:Canvas id="cv_2"
width="100%" height="100%" >
> <mx:Image
x="0" y="0" source="assets/img02.jpg"
moveEffect="b" />
> </mx:Canvas>
> ...
> </mx:ViewStack>
>
> Therefore your recommendation would pick one
of <mx:Canvas>, not
> <mx:Image> that I really want to pick
and change the moveEffect at
> runtime.
>
> Anyway, i tested your recommendation with
changing "moveEffect" to
> "fontSize" which is very style
property.
> and I got correct answer.
> Also I set "fontSize" property on
the <mx:Image>, and tried with
> following code.
>
>
mx.core.Application.application.canvas1.viewstack1.panel1.viewstack2.
selectedChild.childDescriptors[0].getStyle("fontSize");
>
> It returns 'undefined'.
> I presume my reference to the
<mx:Image> might be wrong...
> Shouldn't use '.childDescriptors[0]' ?
> Could you please let me know how i should
pick <mx:Image>
correctly...
>
>
> Best Regards,
> Keishichi
>
>
> --- In flexcoders@yahoogroups.com,
"bhaq1972" <[EMAIL PROTECTED]> wrote:
> >
> > > trace
> >
(mx.core.Application.application.canvas1.viewstack1.panel1.viewstack2
.s
> >
electedChild.childDescriptors[0].getStyle("moveEffect");
> > >
> >
> > shouldn't that be
> > trace
> >
mx.core.Application.application.canvas1.viewstack1.panel1.viewstack2.
se
> >
lectedChild.getStyle("moveEffect")
> > ??
> >
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
|