I tried your first suggestion about reinstantiating the SWFLoader, but that doesn't seem to work. Here is my code in the init() function that gets called every time I want the SWF to replay:
tileFront = new SWFLoader(); tileFront.source = tile_Front; //(tileFront.content as MovieClip).gotoAndPlay(1); The commented line generates a "Cannot access a property or method of a null object reference" error, even though I clearly define its source on the previous line. I looked into your ByteArray method but I couldn't find enough documentation online to show how to do it. Any tips? --- In [email protected], EECOLOR <[EMAIL PROTECTED]> wrote: > > If you embed the whole swf file, it will probably of type MovieClip. I am > not sure how you embed it, but once you make an instance of it, it will > remember its state. In order to get it into the start state you would have > to re-instantiate it. > > Another option is to embed the swf as a ByteArray. You could then use the > loader.loadBytes method to load it. This way you can reload the swf as much > as you want. > > > Greetz Erik > > On 5/29/08, kenny14390 <[EMAIL PROTECTED]> wrote: > > > > I've got a SWF file that is embedded in the Flex app. When the SWF is > > clicked, it does an animation and fades away. How can I get the SWF to > > revert to its default state? I've tried resetting the source of the > > SWFLoader to the same SWF file, but it does not load. I've also tried > > creating a second SWFLoader with the same source, but there must be > > something preventing the same file from being loaded more than once. > > The only way the SWF starts over is when the entire app is reloaded. > > What can I do? I could modify the FLA itself or the Flex implementation. > > >

