I guess you are having the flash movie embeded in a flex wrapper. Expose a 
public "start" (or something)function from there (from the flash movie). Just 
call that on the state change interception.

HTH,
Claudiu



----- Original Message ----
From: John <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, October 24, 2008 12:45:41 PM
Subject: [flexcoders] Re: PLaying Flash From Scratch


Cool, thanks for that.

I now can intercept the change of state within the ViewStack, so any 
ideas how I can then tell the SWF file in the component how to play 
from frame 1?

TIA

--- In [EMAIL PROTECTED] ups.com, "valdhor" <[EMAIL PROTECTED] ..> wrote:
>
> 
http://livedocs. adobe.com/ flex/3/langref/ mx/containers/ ViewStack. html#
event:change
> 
> 
> --- In [EMAIL PROTECTED] ups.com, "John" <jpapworth@> wrote:
> >
> > Does anyone have any source code for this? I cannot find anything 
> > mentioned in the Flex 3 documentation.
> > 
> > --- In [EMAIL PROTECTED] ups.com, "Fotis Chatzinikos" 
> > <fotis.chatzinikos@ > wrote:
> > >
> > > The view stack has a change event,
> > > 
> > > you can associate a handler there and depending on the index of 
the 
> > stack
> > > call the appropriate swf start/play method
> > > 
> > > 
> > > On Wed, Oct 22, 2008 at 3:20 AM, John <
> > > jpapworth@> wrote:
> > > 
> > > >   My actionscript is not that strong, we have several Flash 
> > animations
> > > > in each of our viewstack children, and reall I wondered if 
there 
> > was
> > > > something we could make it play it from frame 1 of the movie 
> > again.
> > > >
> > > > If we cannot get this to work, is there a similar 
functionality
> > > > within States, where we can use our forward and back buttons 
to
> > > > navigate each way?
> > > >
> > > > TIA
> > > > --- In [EMAIL PROTECTED] ups.com <flexcoders%
40yahoogroups. com>,
> > > > "valdhor" <stevedepp@> wrote:
> > > > >
> > > > > In a viewstack each view is only instantiated when that 
> > particular
> > > > > view is selected. Once instantiated, it is not instantiated 
> > again.
> > > > > What you want to do is have your Flash play when an event 
> > occurs.
> > > > For
> > > > > the instantiation you would probably want to use the
> > > > CreationComplete
> > > > > event. For subsequent times I think the event is Show 
(Although 
> > I
> > > > > could be wrong)
> > > > >
> > > > >
> > > > > --- In [EMAIL PROTECTED] ups.com <flexcoders%
> > 40yahoogroups. com>, "John"
> > > > <jpapworth@> wrote:
> > > > > >
> > > > > > Hi there
> > > > > >
> > > > > > I wonder if someone can help me.
> > > > > >
> > > > > > I have a viewstack with seperate pages - each page has a 
Flash
> > > > > > animation. However, what I have found is when I navigate 
> > through
> > > > the
> > > > > > viewstack, the flash plays, then I goto the next page all 
is
> > > > fine, but,
> > > > > > if I then return to the previous one - it does not reset 
the
> > > > Flash to
> > > > > > frame 1. It has stayed at its last frame.
> > > > > >
> > > > > > Is there a way of telling Flex to play these movies from 
the
> > > > beginning
> > > > > > everytime?
> > > > > >
> > > > > > Regards
> > > > > >
> > > > > > J
> > > > > >
> > > > >
> > > >
> > > > 
> > > >
> > > 
> > > 
> > > 
> > > -- 
> > > Fotis Chatzinikos, Ph.D.
> > > Founder,
> > > Phinnovation
> > > Fotis.Chatzinikos@ ,
> > >
> >
>

    


      

Reply via email to