SWFLoader : stop/ pause / play features ?

hi,
I am using the SWFLoader component to play Flash files (with SWF extension).
<mx:SWFLoader id="animation_toto" x="24" y="36" source= "toto.swf" autoLoad="true" width="657" height="164"/>
I am able to control the start of the animation with the load() method.
animation_toto.load();
However, I do not see stop / pause methods to stop / pause the animation.
(But they exist in the VideoDisplay component.)
How do i do that ? Is there a way ?
Thanks a lot for helping.

Hello Zen,
Thanks for the RecursiveStop() function tip. I tried this out in my Flex application where I have to play one movie clip after another but without success. Here is the scenario: I am using a SWFLoader class on the main application form and have set a swf path. On application initialization, I call the stop() method to the MovieClip that is loaded in my SWFLoader object.
MovieClip(Application.application.mySwfLoader.content).stop(); // THIS WORKS
Later on click of a button, I dynamically store the paths of the swf files that I want to play one after another into an ArrayCollection and call a function to play the first item in the ArrayCollection.
myArrayCollection.addItem("assets/beginning_swfs/0114INSTR.swf");
myArrayCollection.addItem("assets/beginning_swfs/0111INSTR.swf");
myArrayCollection.addItem("assets/beginning_swfs/0201INSTR.swf");
myArrayCollection.addItem("assets/beginning_swfs/0202INSTR.swf");
setTimeout(PlayMovieClip, 1000);
In the PlayMovieClip() function, I set the path of the first item (swf file) as the source of the SWFLoader object in my application, again assign the content of the SWFLoader object to a MovieClip object and add an eventlistener - Event.ENTER_FRAME along with the method checkFrame() that will be invoked when the EVENT_FRAME event is raised. After this I call the MovieClip.play() function.
if (myArrayCollection.length == 0)
return;
path=String(myArrayCollection.getItemAt(0));
trace("Starting movie: " + String(myArrayCollection.getItemAt(0)));
Application.application.mySwfLoader.source = path;
flashMovie=Application.application.mySwfLoader.content as MovieClip
flashMovie.addEventListener(Event.ENTER_FRAME, checkFrame);
flashMovie.play();
Now once in the checkFrame() method, I determine if the end of the MovieClip has been reached. Stop the movie if the end frame has been reached.
if (event.target.currentFrame == event.target.totalFrames)
     trace("Stopping movie: " + String(myArrayCollection.getItemAt(0)));
     // stop the movie, call the RecursiveStop function.
     RecursiveStop(MovieClip(event.target)); //event.target cast to MovieClip
     event.target.removeEventListener(Event.ENTER_FRAME, checkFrame);
     // Check if the array has elements in it.
     if (myArrayCollection.length != 0)
          // Remove the top most one.
          myArrayCollection.removeItemAt(0);
     // Check if there are more items in the array.
     if (myArrayCollection.length != 0)
          // Play the next file
          PlayMovieClip();
I expect the MovieClip files (SWF) to play one after another but there is an overlap and the movies do not stop playing.
Any help pointing what I am doing wrong or a push in the right direction is highly appreciated. I've spent at least 3 days now trying to solve this issue without success.

Similar Messages

  • Stopping/Pausing SWFLoader

    Is there a way to stop or pause a SWF loaded through an
    SWFLoader component?
    Thanks,
    John

    Following sample code will embed "somesymbol" (movieclip
    symbol) of "somefile.swf" and this is declared as myClass. Loading
    this in "Image" component and using stopmc method I can able to
    pause & play the loaded movie clip. I hope the same will work
    for SWF Loader as well as embedding the whole swf file.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" width="800" height="600">
    <mx:Script>
    <![CDATA[
    [Embed(source="somefile.swf", symbol="somesymbol")]
    [Bindable]
    public var myClass:Class;
    public function stopmc():void {
    var mc:MovieClip = MovieClip(Q01.content)
    if (playstop.label == "Stop") {
    mc.stop();
    playstop.label = "Play";
    else {
    mc.play();
    playstop.label = "Stop";
    ]]>
    </mx:Script>
    <mx:HBox>
    <mx:Button id="playstop" label="Stop"
    click="stopmc();"/>
    <mx:Image id="Q01" source="{myClass}"/>
    </mx:HBox>
    </mx:Application>
    Hope this helps.

  • HT5295 How can I stop the auto play feature automatically playing/streaming the next podcast?

    How can I stop the auto play feature automatically playing/streaming the next podcast?

    Hi there.
    I listened to podcast there were two things I found that helped me out. Both we're in the podcast app itself.
    Firstly change the default sorting order. When looking at the list off episodes a available on your ios device tap on the description part at the top, this will bring up the settings for that podcast (subscribe mark as played etc) scroll to the Bottom and select oldest first. This will mean that if you are listening to the latest download it will stop at the end as there will be no more to play.
    Secondly, and useful if listening to older podcasts in the list, you can use the timer to stop once the current episode has ended. To do this when you are in the podcast playback screen slide the "album artwork" up, revealing the playback options and nifty tape playing animation this is where you adjust playback speed and set a timer. The timer has a number of options to set playback to stop after set amount of time. However one of these options is to stop once the current episode you are listening to ends. This can also be current chapter if the podcast you are listening to supports chapters.
    Hope this helps, if not clear let me know

  • Why "stop download video" feature not show when playing video

    why "stop download video" feature not show when playing video,, i hope you can give me Solution for this problem because when i using 3g internet, it downlaod the video Quickly ,,, so it consume the Balance

    Do you have Flash installed?   Check HD > Library > Internet Plug-Ins
    If the Flash Player app is not in the Internet Plug-ins folder, download and install from here.
    When you post for help, please state which OS X is installed.
    If you aren't sure, click About this Mac from your Apple menu 
    Troubleshooting advice can depend on that information.

  • Embedded media player controls (play, stop, pause, etc.) on multiple sites will not respond in FireFox 12.0 or will only respond after multiple clicks

    I go to multiple websites that contain embedded media, such as billburr.com, tunein.com, and forums where members embed media from sites like YouTube. When attempting to access or use that media, using the available play, stop, pause, and volume control buttons, FireFox doesn't respond. For example, If I'm on billburr.com and attempt to play the podcast, I can click the play button over and over again and nothing will happen. The play button lights up like the site realizes I'm clicking it, but the media will not play, at least not the first time. I might get it to work after several fast clicks. However, if I need to pause it, I have the same trouble. These sites work perfectly in IE 9. I've already started FireFox in safe mode, but encountered the same problem. Has anyone seen this?

    That is a Flash player on the billburr<i></i>.com site.
    You can try to install the 32 bit Flash player for Firefox from this page.
    *http://www.adobe.com/special/products/flashplayer/fp_distribution3.html
    For Firefox on 64 bit Windows, you need the 32 bit Flash version version because Firefox is a 32 bit application.

  • My Bose SIE2i volume control does not work. (pause/play does work). This is the secone set - the apple store in Sydney replaced the firsat set that had the same problem. It was working OK and has stopped.

    My Bose SIE2i volume control does not work. (pause/play does work). This is the second set - the apple store in Sydney replaced the first set that had the same problem. It was working OK and has stopped.

    Thanks again V.K. I did check the layout, and it was listed as alphabet when I inputted the password. So that doesn't seems to the the issue.
    Just finished a truly mystifying experiment, but I put in a shorter password in the way mentioned earlier and it worked. I then systematically kept increasing the characters of that password and it seems that if the password starts to exceed about 16, it stops recognizing it. I am fairly sure it is not the password itself since it never gives an error when typing in the verification password. So unless I systematically make the exact mistake twice at the setup screen, and then don't or make a different mistake every time at the login screen, I don't think its my typing skill.
    So problem solved for now, but I am still a bit worried. Maybe I should completely reinstall and use a shorter password.
    Is there supposed to be a length limit?

  • Won't pause, play, stop, or skip when minimized.

    Whenever I minimized iTunes, I can't pause, play, stop, or skip.
    Is this because of the new iTunes update?

    Recent crashes of certain multimedia contents (this includes Youtube videos, certain flash games and other applications) in conjunction with Firefox are most probably caused by a recent Flash 11.3 update and/or a malfunctioning Real Player browser plugin.
    In order to remedy the problem, please perform the steps mentioned in these Knowledge Base articles:
    [[Flash Plugin - Keep it up to date and troubleshoot problems]]
    [[Flash 11.3 crashes]]
    [[Flash 11.3 doesn't load video in Firefox]]
    Other, more technical information about these issues can be found under these Links:
    http://forums.adobe.com/thread/1018071?tstart=0
    http://blogs.adobe.com/asset/2012/06/inside-flash-player-protected-mode-for-firefox.html
    Please tell us if this helped!

  • Satellite A200-1TW using buttons (play, stop, pause) with other player

    Hey all,
    I was wondering, is it possible to change the thing the buttons on the top of the keyboard? Because I use a nice media player now, embedded in the vista sidebar. However, the buttons like next song and pause/play do not work on this one. And there is no option in the play itself, so is there some other way?
    Thanks in advance :)

    The Media keys send standard Keyboard Media Messages to your programs.
    If your program (your nice media player) is not designed to receive these standard media key messages, the program wont recognize the media key messages.
    You need to change the keyboard options in your nice media player. If you cannot find these options, you'll need to use another media player, such as WinAmp.

  • ITunes missing pause/play/ / buttons

    For the past month (I believe sometime around the time I updated itunes to iTunes 11) I have been missing the section on my iTunes window that has the pause, play, >>, and << buttons and shows the status of the song (time wise).  I am also missing the red, yellow, and green buttons on the upper left hand side and I am unable to click and drag the window around at all.  I have googled this problem for hours and come up with nothing.  Hoping someone here can help because for a long time the only way to stop a song from playing once it started was the quit iTunes.  Now, just today I figured out that I can open the miniplayer on top of my iTunes window and that is better than having to close out of iTunes altogether, but I'd still like the features that are in the miniplayer to be available to me on my screen all the time like they always were in the past.

    Hello 3isenuf,
    Thanks for using Apple Support Communities.
    I'd like you to please reinstall iTunes by following the steps below.
    Download the latest installer
    Open Safari or another web browser.
    Go to the iTunes download webpage and click the Free Download button.
    Make sure that the Mac OS X version is selected on that page.
    Click the Download button to start the download.
    Once the file is downloaded, a new Finder window appears containing two items (below). If a Finder window doesn't appear, locate the iTunesX.dmg file (where X is the iTunes version number) on the desktop (or wherever your downloads go) and double-click it to display these items:
    A "Read Before You Install iTunes" file. This document contains the system requirements for the version of iTunes, and may contain other useful information about installing.
    An iTunes.mpkg file (this is the installer file itself)
    Install iTunes
    Quit iTunes if it is currently open.
    Double-click the iTunes.mpkg file. This opens the Installer application in Mac OS X.
    Follow the instructions in the installer screens. If all of the installation components appear unchecked and dimmed (unavailable, and therefore not installable), refer to Mac OS X iTunes installer components are disabled.
    After the installation has completed, quit the Installer and restart the computer. The new version of iTunes appears on your hard disk in your Applications folder.
    Opening iTunes
    It's possible that clicking the iTunes icon in your Dock or double-clicking an iTunes icon on your desktop could open an older version of iTunes. Open iTunes from the Applications folder to be sure you are opening the right version:
    Double-click your hard disk.
    Double-click the Applications folder.
    Double-click the iTunes icon.
    If you notice another copy of iTunes in the Dock after following these steps, here's a way to take care of that:
    Quit iTunes.
    Drag the iTunes icon out of the Dock.
    Drag the iTunes icon from the Applications folder to the Dock.
    Troubleshooting iTunes installation on Mac OS X
    http://support.apple.com/kb/HT2311
    Take care,
    Alex H.

  • Can You Get iPod To Stop/Pause At The End Of Each Track

    I really need my iPod to stop/pause at the end of each track/song, but it insists on playing right through a playlist one song after another. Does anybody know if there is a way of achieving this, there doesn't seem to be anything in the manuals about this. My iPod is new and is the 60GB color screen model. Any help would be much appreciated.
    Thanks, Peter.

    Hi boaster, is this an apple accessory, or where else will I find one? When you say there will be some manual intervention, I presume you have to press the button to actually stop it at the end of each track??
    Dave W. I've tried your suggestion and it works fine. Its also good because it keeps iPod within the correct playlist. The original suggestion of one track per playlist also works, but unfortuanatly iPod defaults to go back to the main menu at the end of every playlist so you then have to navigate back to where you need to be. Dave, it looks like your suggestion is the answer at the moment, many thanks, although would like to know more about this 'airclick' remote please. Cheers.

  • ITunes 11 will no longer rewind in stop/pause mode !

    iTunes used to be able to rewind while in stop/pause mode : alt cmd arrow left would rewind 5 seconds.
    I use it on a daily basis for transcribing music.
    Now, I suppose because of iTunes 11 (or is it Mountain Lion..?)  rewind is only possible in play mode !! (while the song is playing..)
    Is there anyone who can help me , or has a solution to fix this problem ?
    Thanks !
    Carlo

    Here is the log. Looks like its QT is crashing it. So, again, its either QT, or one of the Vista updates. I haven't tried to watch a movie on the computer in awhile so I have no idea what update in the past few months is causing the problem.
    Log Name: Application
    Source: Application Error
    Date: 2/11/2009 4:08:29 PM
    Event ID: 1000
    Task Category: (100)
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: OU812
    Description:
    Faulting application iTunes.exe, version 8.0.2.20, time stamp 0x4925c4fe, faulting module QuickTimeH264.qtx, version 7.55.90.70, time stamp 0x49011c68, exception code 0xc0000005, fault offset 0x00073570, process id 0x159c, application start time 0x01c98c8ac9ea815b.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2009-02-11T21:08:29.000Z" />
    <EventRecordID>17730</EventRecordID>
    <Channel>Application</Channel>
    <Computer>OU812</Computer>
    <Security />
    </System>
    <EventData>
    <Data>iTunes.exe</Data>
    <Data>8.0.2.20</Data>
    <Data>4925c4fe</Data>
    <Data>QuickTimeH264.qtx</Data>
    <Data>7.55.90.70</Data>
    <Data>49011c68</Data>
    <Data>c0000005</Data>
    <Data>00073570</Data>
    <Data>159c</Data>
    <Data>01c98c8ac9ea815b</Data>
    </EventData>
    </Event>

  • ITunes & Windows Live Messenger (MSN) - Now Playing Feature.

    Hey Guys!
    I'm a lover of iTunes over Windows Media Player and made the switch approximately a year and a half ago when I bought my iPod. At first I was upset I would lose the "Now Playing" feature of my Messenger and said the pros were far more beneficial. However after a month or two I noticed that suddenly it worked and all was well...
    However, Just recently, I believe when I bought an iPod Nano recently and synced it for the first time. It has stopped working and no longer displays no matter what I've tried... now before you go tell me something you'd tell a noobie, Let me first say... Yes, "Show What I'm Listening To" is checked... and I've tried those stupid little work arounds that make no sense such as the option of iTunes not being minimised to the system tray and Messenger being the main window...
    Why did it work before and why did it stop, was it the new iPod syncing causing iTunes to malfunction? I've uninstalled and reinstalled both to no fix... Please help!

    Okay... I've solved my issue using a work-around. the iTunes code for broadcasting these things definintely needs to be looked into. Its pretty trivial that syncing an iPod that doesn't have the "manual ejection" option ticked could cause a detrimental issue such as this.
    As Hinted, to fix the issue. Make sure the iPod is set to be 'manually ejected' once its finished syncing. This means you will effectively have to eject it yourself using iTunes once you've synced it.
    The steps I did was...
    *1. Set iPod to be 'manually ejected' once synced and hit apply.*
    *2. Sync iPod... again, for good measure.*
    *3. Restart the computer.*
    *4. Start iTunes with the iPod still connected, Sync it again.*
    *5. Open Windows Live Messenger and make sure 'show what im listening to' is ticked.*
    *6. Play a song in iTunes and see if it worked.*
    *Please post if this helped you.* Im sure a few of those steps like re-syncing aren't neccesary, then again it's "Apple" iTunes so it's best to be safe then sorry.
    Currently, the wonderful world of iTunes (7.7) is saying I don't have permission to set it as my default audio player, and im the friggin Admin...
    *Bravo! Apple Team, Bravo!*

  • Keynote stops when playing and won't continue to next slide?

    Keynote stops when playing and won't continue to next slide?

    Hello, welcome to the user forum,
    It would help if you told which version of Captivate you are using. Since you are talking about 'multiple actions', I suppose it is Captivate 4, because that feature was abandoned in Captivate 5 and even for CP4 it was not very recommendable, I always replaced it by an Advanced action.
    I blog a lot about advanced actions, and also posted articles in the knowledgebase of CP-Help. A complete list of those articles are found as a link in this blog post:
    Articles on Advanced Actions
    It is a list published on acrobat.com; updated it yesterday with latest article.
    If you are totally new to Advanced Actions, I could offer an example of the code you'll need, but want to know first if you are using CP4 or CP5.
    Lilybiri

  • Pause & Play Animation When i'm using movie clips- filters

    Pause & Play Animation When i am using movie clips-
    filters
    Graphic and movieclips are using for my animation
    When i Press the pause the movieclip animation not stopped.
    Any way to apply the filters on graphic
    I want to apply the filters for particular graphics or movie
    clips. with navigational button working.
    Please help me.
    Thanks
    S.Satheesh Kumar

    Audio on the timeline, especially stream, tends to play very reliably. Is this project under any NDA or can you provide a FLA to examine? Let me know if you want to private message it and I'll shoot you a message.
    What version of Flash Player are you targeting and is this AS2 or AS3?

  • Pause/Play button on toolbar

    When running a captivate slide show, and using the pause/play
    button on the customisable toolbar, we have noticed that when
    clicked this button does not pause any audio that may be currently
    running on the slide, therefore making the facility partly
    nonsensical. Is this a feature of Captivate 3.0, or is it just me
    not embedding the sound in the correct place????
    Please help.

    Hi Kate,
    My instincts tell me that you are experiencing a change in
    focus, but I'll tell you what I mean, and you can decide if that
    may be the problem. Assuming you are publishing to SWF/HTM output
    ... when your movie starts, what is actually happening is, you are
    opening a HTML document, and the movie (the SWF document) is
    "called" (commanded to open) by that (HTM) document. Therefore,
    when it is first begun, the computer's "focus" is on the HTM, not
    the SWF contained in it.
    Keeping that in mind, the first time you click (an object in
    the movie itself), the Windows operating system must change the
    focus
    from the HTM document
    to the SWF movie, which accounts for the first "click". The
    second time you click, the SWF document makes the correct
    assumption that the "click" is meant to be interpreted as a command
    intended for the object in the SWF movie.
    This behavior may vary, depending on the browser being used,
    and perhaps even the operating system (I'm guessing here, because I
    don't know how Windows Vista might treat the action of clicking in
    a browser window as opposed to the way Windows XP handles the same
    command-action).
    Another possible cause might be the mouse itself, or its
    software. You can check this easily enough, by seeing if the
    failure to function always occurs on the same machine, and if it
    changes when you install a different pointing device. I know from
    personal experience that sometimes I have to click really firmly,
    and sometimes not. I use a battery powered optical mouse, and its
    behavior is subject to change as the batteries get older.
    I don't know if there is any help in my comments ... I
    certainly hope so. Let us know, because sometimes when one member
    "hits a wall" in offering solutions, another member "sees a light"
    and a difficut problem ends up having a simple solution.
    All the best,
    Larry

Maybe you are looking for

  • What went wrong? can someone help?

    ok here is a question,i do not know what went wrong,but one day i plug in my ipod,and you know how it say do not disconnect right?Well my will say that untill the battery goes dead, and this here is a problem i have been dealing with for a long time!

  • Need to add one field in standard structure???

    Hi Experts, I wanted to add one Z-field in standard structure. Anybody will suggest me how to do that step by step??

  • Any way to sample segment length longer than loop iterations w/o shift registers?

    Hi all, My loop iterates approx every 0.06s and now i've been asked to add to the program a function which will sample the most recent 3s of data and return the max/min value for two of the signals.  I can think of a programmatically clumsy way to do

  • RoboHelp 9

    Hello everyone, I was wondering if there is talk of a RoboHelp 9 -- and, if so, when it is expected to be released?

  • Windows 7 boot camp install on 2012 MacBook Pro with retina display

    I'm having trouble installing Windows 7 in a boot camp partition on my MBP. When I select the boot camp partition and then format it, the partition is not recognized in the next step. Does any know a way around this? Thanks. Esau