Re: [flexcoders] Re: Replaying an Embedding SWF
*[Embed(source="applicationContext.xml", mimeType="application/octet-stream")] public class EmbeddedContent extends ByteArray * Greetz Erik On 5/30/08, kenny14390 <[EMAIL PROTECTED]> wrote: > > I looked into your ByteArray method but I couldn't find enough > documentation online to show how to do it. Any tips? > >
[flexcoders] Re: Replaying an Embedding SWF
PROBLEM SOLVED: tileFront.source = new tile_Front(); I forgot that when Embedding the SWF, you store it as a Class. So to reinstatiate, you use the "new" keyword to get another instance of it. Thanks to all that helped. --- In flexcoders@yahoogroups.com, "kenny14390" <[EMAIL PROTECTED]> wrote: > > 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 flexcoders@yahoogroups.com, EECOLOR 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 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. > > > > > >
[flexcoders] Re: Replaying an Embedding SWF
Also, SWFLoader component cannot toggle "visible" correctly. I'm using visible=true and visible=false but nothing happens. --- In flexcoders@yahoogroups.com, "kenny14390" <[EMAIL PROTECTED]> wrote: > > 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 flexcoders@yahoogroups.com, EECOLOR 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 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. > > > > > >
[flexcoders] Re: Replaying an Embedding SWF
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 flexcoders@yahoogroups.com, 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. > > >
RE: [flexcoders] Re: Replaying an Embedding SWF
I've been playing with this a bit. One thing you have to be sure of is the symbol that the EMBED command is referring to is the SYMBOL in the LIBRARY. Not the instance on the stage, and the symbol has to be visible to AS via your linkage. By embedding like this: [Embed(source="test_animation.swf",symbol="animation")] [Bindable] public var test:Class; You can then manipulate the timeline of the symbol like this: (testImage.content as MovieClip).gotoAndPlay(2); What I've been unable to get working correctly is getting the animation to stop once started, and I can't work on this more today. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kenny14390 Sent: Thursday, May 29, 2008 5:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Replaying an Embedding SWF Instead of using "symbol=..." in the Embed, I tried the shorthand "#" notation instead, but I get the same error. Perhaps the Flex app doesn't recognize the symbol? Is there a way to access the specific instance of the flash application in Flex? --- In flexcoders@yahoogroups.com, "kenny14390" <[EMAIL PROTECTED]> wrote: > > Yes, the movie clip has its own timeline. It's AS3. > > I thought the movie clip is a symbol and I can just embed it as the > livedocs show: "...symbol='movieClipName')]". I guess since the MC is > the first frame of the scene, and that's the only frame of the scene, > gotoAndPlay(1) doesn't do anything because the MC's timeline is still > at the end. So the issue now is changing the MC timeline. > > --- In flexcoders@yahoogroups.com, "Battershall, Jeff" > wrote: > > > > Sounds like you need to dig a little deeper into the .fla file to > > find out what script is executing when the button is pressed. That movie clip > > may have its own timeline that you need to access. What AS version > > is being used? > > > > Jeff > > > > -Original Message----- > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of kenny14390 > > Sent: Thursday, May 29, 2008 2:38 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > > > > I didn't make it but I have the .FLA file. The first frame is just a > > movie clip with a button in it. When the button is pressed, the > > movie clip plays. Do I need to set the movie clips timeline to 1? > > How can I access this specific component? I tried to embed the > > symbol using... > > > > [Embed(source="assets/Tile_Flip_Front.swf", > > symbol="button_mc_break")] > > > > ...but I get a couple of errors. Is there a valid way to do this? > > > > --- In flexcoders@yahoogroups.com, "Battershall, Jeff" > > wrote: > > > > > > Do you know if the animation is in fact done via timeline? If it is > > > not, gotoAndPlay(1) isn't going to do you much good. > > > > > > Jeff > > > > > > -Original Message- > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > > > On Behalf Of kenny14390 > > > Sent: Thursday, May 29, 2008 2:23 PM > > > To: flexcoders@yahoogroups.com > > > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > > > > > > > I got the AS: > > > > > > (tileFront.content as MovieClip).gotoAndPlay(1); > > > > > > However, the SWF is still not visible after it has already run. > > > > > > > > > --- In flexcoders@yahoogroups.com, "kenny14390" > > > wrote: > > > > > > > > I searched this topic and actually found your blog post about > > > > it. > > > > It's > > > > > > > still a bit unclear how to access the timeline. Do you get the > > > > content > > > > > > > property of the SWFLoader instance, cast that to a MovieClip, > > > > then access the MC's root property? I cannot access the timeline > > > > in this > > > > way. > > > > > > > > --- In flexcoders@yahoogroups.com, "peterent" wrote: > > > > > > > > > > Once the SWF has been loaded you can access its root timeline > > > > through the loader's content. > > > > > Having the root timeline will let you execute the function: > > > > gotoAndPlay(1) - making the SWF > > > > > move the playhead back to the firs
RE: [flexcoders] Re: Replaying an Embedding SWF
If there is more than one frame on the main timeline, you want to embed the whole SWF and not some symbol from it. Make sure the swfloader's .content is what you think it is. Embeds get wrapped up in interesting ways. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kenny14390 Sent: Thursday, May 29, 2008 2:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Replaying an Embedding SWF Instead of using "symbol=..." in the Embed, I tried the shorthand "#" notation instead, but I get the same error. Perhaps the Flex app doesn't recognize the symbol? Is there a way to access the specific instance of the flash application in Flex? --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "kenny14390" <[EMAIL PROTECTED]> wrote: > > Yes, the movie clip has its own timeline. It's AS3. > > I thought the movie clip is a symbol and I can just embed it as the > livedocs show: "...symbol='movieClipName')]". I guess since the MC is > the first frame of the scene, and that's the only frame of the scene, > gotoAndPlay(1) doesn't do anything because the MC's timeline is still > at the end. So the issue now is changing the MC timeline. > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Battershall, Jeff" > wrote: > > > > Sounds like you need to dig a little deeper into the .fla file to find > > out what script is executing when the button is pressed. That movie clip > > may have its own timeline that you need to access. What AS version is > > being used? > > > > Jeff > > > > -Original Message- > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > > Behalf Of kenny14390 > > Sent: Thursday, May 29, 2008 2:38 PM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > > > > I didn't make it but I have the .FLA file. The first frame is just a > > movie clip with a button in it. When the button is pressed, the movie > > clip plays. Do I need to set the movie clips timeline to 1? How can I > > access this specific component? I tried to embed the symbol using... > > > > [Embed(source="assets/Tile_Flip_Front.swf", symbol="button_mc_break")] > > > > ...but I get a couple of errors. Is there a valid way to do this? > > > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Battershall, Jeff" > > wrote: > > > > > > Do you know if the animation is in fact done via timeline? If it is > > > not, gotoAndPlay(1) isn't going to do you much good. > > > > > > Jeff > > > > > > -Original Message- > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] > > > On Behalf Of kenny14390 > > > Sent: Thursday, May 29, 2008 2:23 PM > > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > > > > > > > I got the AS: > > > > > > (tileFront.content as MovieClip).gotoAndPlay(1); > > > > > > However, the SWF is still not visible after it has already run. > > > > > > > > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "kenny14390" wrote: > > > > > > > > I searched this topic and actually found your blog post about it. > > > > It's > > > > > > > still a bit unclear how to access the timeline. Do you get the > > > > content > > > > > > > property of the SWFLoader instance, cast that to a MovieClip, then > > > > access the MC's root property? I cannot access the timeline in this > > > > way. > > > > > > > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "peterent" wrote: > > > > > > > > > > Once the SWF has been loaded you can access its root timeline > > > > through the loader's content. > > > > > Having the root timeline will let you execute the function: > > > > gotoAndPlay(1) - making the SWF > > > > > move the playhead b
[flexcoders] Re: Replaying an Embedding SWF
Instead of using "symbol=..." in the Embed, I tried the shorthand "#" notation instead, but I get the same error. Perhaps the Flex app doesn't recognize the symbol? Is there a way to access the specific instance of the flash application in Flex? --- In flexcoders@yahoogroups.com, "kenny14390" <[EMAIL PROTECTED]> wrote: > > Yes, the movie clip has its own timeline. It's AS3. > > I thought the movie clip is a symbol and I can just embed it as the > livedocs show: "...symbol='movieClipName')]". I guess since the MC is > the first frame of the scene, and that's the only frame of the scene, > gotoAndPlay(1) doesn't do anything because the MC's timeline is still > at the end. So the issue now is changing the MC timeline. > > --- In flexcoders@yahoogroups.com, "Battershall, Jeff" > wrote: > > > > Sounds like you need to dig a little deeper into the .fla file to find > > out what script is executing when the button is pressed. That movie clip > > may have its own timeline that you need to access. What AS version is > > being used? > > > > Jeff > > > > -Original Message- > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of kenny14390 > > Sent: Thursday, May 29, 2008 2:38 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > > > > I didn't make it but I have the .FLA file. The first frame is just a > > movie clip with a button in it. When the button is pressed, the movie > > clip plays. Do I need to set the movie clips timeline to 1? How can I > > access this specific component? I tried to embed the symbol using... > > > > [Embed(source="assets/Tile_Flip_Front.swf", symbol="button_mc_break")] > > > > ...but I get a couple of errors. Is there a valid way to do this? > > > > --- In flexcoders@yahoogroups.com, "Battershall, Jeff" > > wrote: > > > > > > Do you know if the animation is in fact done via timeline? If it is > > > not, gotoAndPlay(1) isn't going to do you much good. > > > > > > Jeff > > > > > > -Original Message- > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > > > On Behalf Of kenny14390 > > > Sent: Thursday, May 29, 2008 2:23 PM > > > To: flexcoders@yahoogroups.com > > > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > > > > > > > I got the AS: > > > > > > (tileFront.content as MovieClip).gotoAndPlay(1); > > > > > > However, the SWF is still not visible after it has already run. > > > > > > > > > --- In flexcoders@yahoogroups.com, "kenny14390" wrote: > > > > > > > > I searched this topic and actually found your blog post about it. > > > > It's > > > > > > > still a bit unclear how to access the timeline. Do you get the > > > > content > > > > > > > property of the SWFLoader instance, cast that to a MovieClip, then > > > > access the MC's root property? I cannot access the timeline in this > > > > way. > > > > > > > > --- In flexcoders@yahoogroups.com, "peterent" wrote: > > > > > > > > > > Once the SWF has been loaded you can access its root timeline > > > > through the loader's content. > > > > > Having the root timeline will let you execute the function: > > > > gotoAndPlay(1) - making the SWF > > > > > move the playhead back to the first frame and start playing it > > > > > again. --peter > > > > > > > > > > --- In flexcoders@yahoogroups.com, "kenny14390" > > > > > 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. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Flexcoders Mailing List > > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > Search Archives: > > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > > > Links > > > > > > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > > Links > > >
[flexcoders] Re: Replaying an Embedding SWF
Yes, the movie clip has its own timeline. It's AS3. I thought the movie clip is a symbol and I can just embed it as the livedocs show: "...symbol='movieClipName')]". I guess since the MC is the first frame of the scene, and that's the only frame of the scene, gotoAndPlay(1) doesn't do anything because the MC's timeline is still at the end. So the issue now is changing the MC timeline. --- In flexcoders@yahoogroups.com, "Battershall, Jeff" <[EMAIL PROTECTED]> wrote: > > Sounds like you need to dig a little deeper into the .fla file to find > out what script is executing when the button is pressed. That movie clip > may have its own timeline that you need to access. What AS version is > being used? > > Jeff > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of kenny14390 > Sent: Thursday, May 29, 2008 2:38 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > I didn't make it but I have the .FLA file. The first frame is just a > movie clip with a button in it. When the button is pressed, the movie > clip plays. Do I need to set the movie clips timeline to 1? How can I > access this specific component? I tried to embed the symbol using... > > [Embed(source="assets/Tile_Flip_Front.swf", symbol="button_mc_break")] > > ...but I get a couple of errors. Is there a valid way to do this? > > --- In flexcoders@yahoogroups.com, "Battershall, Jeff" > wrote: > > > > Do you know if the animation is in fact done via timeline? If it is > > not, gotoAndPlay(1) isn't going to do you much good. > > > > Jeff > > > > -----Original Message- > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > > On Behalf Of kenny14390 > > Sent: Thursday, May 29, 2008 2:23 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > > > > I got the AS: > > > > (tileFront.content as MovieClip).gotoAndPlay(1); > > > > However, the SWF is still not visible after it has already run. > > > > > > --- In flexcoders@yahoogroups.com, "kenny14390" wrote: > > > > > > I searched this topic and actually found your blog post about it. > > > It's > > > > > still a bit unclear how to access the timeline. Do you get the > > > content > > > > > property of the SWFLoader instance, cast that to a MovieClip, then > > > access the MC's root property? I cannot access the timeline in this > > > way. > > > > > > --- In flexcoders@yahoogroups.com, "peterent" wrote: > > > > > > > > Once the SWF has been loaded you can access its root timeline > > > through the loader's content. > > > > Having the root timeline will let you execute the function: > > > gotoAndPlay(1) - making the SWF > > > > move the playhead back to the first frame and start playing it > > > > again. --peter > > > > > > > > --- In flexcoders@yahoogroups.com, "kenny14390" > > > > 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. > > > > > > > > > > > > > > > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > > Links > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links >
RE: [flexcoders] Re: Replaying an Embedding SWF
Sounds like you need to dig a little deeper into the .fla file to find out what script is executing when the button is pressed. That movie clip may have its own timeline that you need to access. What AS version is being used? Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kenny14390 Sent: Thursday, May 29, 2008 2:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Replaying an Embedding SWF I didn't make it but I have the .FLA file. The first frame is just a movie clip with a button in it. When the button is pressed, the movie clip plays. Do I need to set the movie clips timeline to 1? How can I access this specific component? I tried to embed the symbol using... [Embed(source="assets/Tile_Flip_Front.swf", symbol="button_mc_break")] ...but I get a couple of errors. Is there a valid way to do this? --- In flexcoders@yahoogroups.com, "Battershall, Jeff" <[EMAIL PROTECTED]> wrote: > > Do you know if the animation is in fact done via timeline? If it is > not, gotoAndPlay(1) isn't going to do you much good. > > Jeff > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > On Behalf Of kenny14390 > Sent: Thursday, May 29, 2008 2:23 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > I got the AS: > > (tileFront.content as MovieClip).gotoAndPlay(1); > > However, the SWF is still not visible after it has already run. > > > --- In flexcoders@yahoogroups.com, "kenny14390" wrote: > > > > I searched this topic and actually found your blog post about it. > > It's > > > still a bit unclear how to access the timeline. Do you get the > > content > > > property of the SWFLoader instance, cast that to a MovieClip, then > > access the MC's root property? I cannot access the timeline in this > > way. > > > > --- In flexcoders@yahoogroups.com, "peterent" wrote: > > > > > > Once the SWF has been loaded you can access its root timeline > > through the loader's content. > > > Having the root timeline will let you execute the function: > > gotoAndPlay(1) - making the SWF > > > move the playhead back to the first frame and start playing it > > > again. --peter > > > > > > --- In flexcoders@yahoogroups.com, "kenny14390" > > > 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. > > > > > > > > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Replaying an Embedding SWF
I didn't make it but I have the .FLA file. The first frame is just a movie clip with a button in it. When the button is pressed, the movie clip plays. Do I need to set the movie clips timeline to 1? How can I access this specific component? I tried to embed the symbol using... [Embed(source="assets/Tile_Flip_Front.swf", symbol="button_mc_break")] ...but I get a couple of errors. Is there a valid way to do this? --- In flexcoders@yahoogroups.com, "Battershall, Jeff" <[EMAIL PROTECTED]> wrote: > > Do you know if the animation is in fact done via timeline? If it is > not, gotoAndPlay(1) isn't going to do you much good. > > Jeff > > -Original Message- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of kenny14390 > Sent: Thursday, May 29, 2008 2:23 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Replaying an Embedding SWF > > > I got the AS: > > (tileFront.content as MovieClip).gotoAndPlay(1); > > However, the SWF is still not visible after it has already run. > > > --- In flexcoders@yahoogroups.com, "kenny14390" wrote: > > > > I searched this topic and actually found your blog post about it. It's > > > still a bit unclear how to access the timeline. Do you get the content > > > property of the SWFLoader instance, cast that to a MovieClip, then > > access the MC's root property? I cannot access the timeline in this > > way. > > > > --- In flexcoders@yahoogroups.com, "peterent" wrote: > > > > > > Once the SWF has been loaded you can access its root timeline > > through the loader's content. > > > Having the root timeline will let you execute the function: > > gotoAndPlay(1) - making the SWF > > > move the playhead back to the first frame and start playing it > > > again. --peter > > > > > > --- In flexcoders@yahoogroups.com, "kenny14390" 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. > > > > > > > > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links >
RE: [flexcoders] Re: Replaying an Embedding SWF
Do you know if the animation is in fact done via timeline? If it is not, gotoAndPlay(1) isn't going to do you much good. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kenny14390 Sent: Thursday, May 29, 2008 2:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Replaying an Embedding SWF I got the AS: (tileFront.content as MovieClip).gotoAndPlay(1); However, the SWF is still not visible after it has already run. --- In flexcoders@yahoogroups.com, "kenny14390" <[EMAIL PROTECTED]> wrote: > > I searched this topic and actually found your blog post about it. It's > still a bit unclear how to access the timeline. Do you get the content > property of the SWFLoader instance, cast that to a MovieClip, then > access the MC's root property? I cannot access the timeline in this > way. > > --- In flexcoders@yahoogroups.com, "peterent" wrote: > > > > Once the SWF has been loaded you can access its root timeline > through the loader's content. > > Having the root timeline will let you execute the function: > gotoAndPlay(1) - making the SWF > > move the playhead back to the first frame and start playing it > > again. --peter > > > > --- In flexcoders@yahoogroups.com, "kenny14390" 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. > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Replaying an Embedding SWF
I got the AS: (tileFront.content as MovieClip).gotoAndPlay(1); However, the SWF is still not visible after it has already run. --- In flexcoders@yahoogroups.com, "kenny14390" <[EMAIL PROTECTED]> wrote: > > I searched this topic and actually found your blog post about it. It's > still a bit unclear how to access the timeline. Do you get the content > property of the SWFLoader instance, cast that to a MovieClip, then > access the MC's root property? I cannot access the timeline in this way. > > --- In flexcoders@yahoogroups.com, "peterent" wrote: > > > > Once the SWF has been loaded you can access its root timeline > through the loader's content. > > Having the root timeline will let you execute the function: > gotoAndPlay(1) - making the SWF > > move the playhead back to the first frame and start playing it again. > > --peter > > > > --- In flexcoders@yahoogroups.com, "kenny14390" 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. > > > > > >
[flexcoders] Re: Replaying an Embedding SWF
I searched this topic and actually found your blog post about it. It's still a bit unclear how to access the timeline. Do you get the content property of the SWFLoader instance, cast that to a MovieClip, then access the MC's root property? I cannot access the timeline in this way. --- In flexcoders@yahoogroups.com, "peterent" <[EMAIL PROTECTED]> wrote: > > Once the SWF has been loaded you can access its root timeline through the loader's content. > Having the root timeline will let you execute the function: gotoAndPlay(1) - making the SWF > move the playhead back to the first frame and start playing it again. > --peter > > --- In flexcoders@yahoogroups.com, "kenny14390" 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. > > >
[flexcoders] Re: Replaying an Embedding SWF
Once the SWF has been loaded you can access its root timeline through the loader's content. Having the root timeline will let you execute the function: gotoAndPlay(1) - making the SWF move the playhead back to the first frame and start playing it again. --peter --- In flexcoders@yahoogroups.com, "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. >