How to detect the end of a loaded swf file

Hello Guys
This is my first time on this forum, come here with a great
hope
I have loaded a picture file (jpeg) and a video file (swf)
into the main flash file using xml
on frame 3, I load the picture and on frame 7, I load the
video, there is a stop action on frame 6
Now when the flash is executed the picture is displayed ( it
says "Click here to view the video")
when the user click the picture , the video is loaded and
starts to play ---- so far everything is working fine
now what I want to do is, once the video finishes playing (
not stoped) I want to display the picture again
can you tell me how to detect the end of an external loaded
swf files,
Please help me
Thanking You
Shriram

Similar Messages

  • How to detect the end of an external swf loaded into a container

    Hi,
    I'm having trouble finding a solution for this problem, can somebody help me?
    I have a main swf that will load external swfs into a container. I need to detect the end of the loaded external swf in order to start to load and play a new one into the same container.
    The problem is that i do not know what the length of the external swfs will be, and will have no control over the development of them, so i cannot place a variable at the end of their animation which would allow me to detect from the main movie its end.
    I also cannot rely on the _totalFrames property because the loaded swf might not have all the animation inside its main timeline.
    Is there any way to achieve this goal?
    Thx

    Ok... Its as i thought... unfortunatly...
    Gonna mark your latest post again as possible solution, just in case someone comes with any sort of out of the box thing...
    Thx for your help Kglad

  • How to detect the end of a movie clip:  what eventListener to use?

    I'm doing a rather fancy button with up,down,rollover,rollout,and static states, something the standard flash button structure isn't capable of as far as I can tell, and believe me, I've tried it.
    Here's the setup:  My main timeline has a series of frames with stop(): scripts, and each frame has a movie clip representing what should happen during that state:  still, rollover, rollout, mousedown, mouseup
    I can't get the mouseup event  to work.
    Here's what I've tried so far that doesn't work:
    1. in the imbedded movieclip, no script at the end.  Result: This just loops the embedded clip.
    2. in the imbedded movieciip, put gotoAndPlay("NextFrame"), where "NextFrame" is the label in the root movie where I want to go. result: loops clip
    3. in the imbedded movieciip, put root.gotoAndPlay("NextFrame"), where "NextFrame" is the label in the root movie where I want to go. result: error
    I think what I need to do is write an eventListener for the root actionscript, but I don't know what event to listen for. 
    What event is thrown when a movieclip finishes playing?
    :<)McFrisco

    You have to create your own mechanism(s) for detecting the end of a movieclip being reached.  You can either build code into the end of the clip itself, possibly dispatching an event that is being listened for by a containing timeline, or you could continuously monitor the currentFrame of the clip to see if it equals the totalFrames value.

  • How to keep the ending silence of a music file?

    I am fed up...
    iTunes just always clips the ending silence of all my music. This is SO annoying, if you i.e. listen to a classic piece of music, Beethoven, Bach etc. ALWAYS iTunes bombs in the next title on the playlist milliseconds after the previous title has ended.
    I do not know, which "60 beats a second" kid has programmed such a senseless feature....?
    Of course I browsed the Internet, of course I used the search function in this forum.
    It seems really many people have the same problem, but the only solutions are like adding silent 2 seconds mp3 files into the playlist.
    This iTunes is really not a very well programmed software, if users needs these awkward workarounds...
    Is there any smart solution to this problem? Help is really appreciated.

    iTunes doesn't do anything with the "ending silence of a music file".  If you have crossfading turned on (see previous comment) each track will start playing, with a predetermined fade in, before the previous one ends.  You definitely want have that disabled.  Otherwise, each track plays through to the end and the next one starts immediately - there is no "gap".  However, you would normally expect that last few seconds of the track itself to be "silent" so that you hear a gap between each piece of music - just as you would when listening to a CD.  Are you perceiving something different?  There are a couple of somewhat obscure scenarios where the end of a track could be truncated.  One involves a very specific error that could occur if your music has been imported from CD outside iTunes and then transferred to it - but that would require a very deliberate action with certain tools used for this purpose.  In technical terms, the import ignores the "pre-gap" that may precede a track on a CD (you'd see this on some CD players as a brief - usually two second - countdown after the end of one track and before the start of the next.  Most software, iTunes included, normally treats this pre-gap as part of the preceding track.
    The other possibility is that the metadata associated with some tracks has been altered such that playback terminates before the actual end of the track.  However, it requires a specific user action for this to happen - I can't think of a way it could happen accidentally.
    Bottom line is that - unless you've hit one of these unlikely scenarios, or found a previously unreported bug (either in iTunes itself or in its interaction with audio drivers), or have that ghastly crossfade function turned on, you are hearing the music as recorded and mastered.  The only other exception is the case where you are hearing the end of one album/disc immediately followed by the start of the next.  Depending on how its been mastered, there could be a "shorter than expected" gap between them.

  • Help, How to detect the end of sentence in a plain text

    Hi, Everyboday
    I really don't know how to use ArrayList and endsWith to realize detecting the following question. Could you give me some help? Thank you!
    1. find the end of the sentence. that means that we print it out if you meet "!" or "." .....
    2. calculating the frequency of the key word in the whole text. maybe using IDF..
    import java.io.*;
    class SearchEnd{
         public static void main (String[] args){
              try{
                   File myFile = new File("Test.txt");
                   FileReader fileReader = new FileReader(myFile);
                   BufferedReader reader = new BufferedReader(fileReader);
                   String line = null;
                   while ((line = reader.readLine()) != null){
                        System.out.println(line);
                   reader.close();
                   }catch (FileNotFoundException exception){
                   System.err.println("File not found");
                   }catch(IOException exception){
                   System.err.println("IO Error");
    }

    Checkout this thread about how to use these forums effectively. Particularly with College home type questions, expected to be taught how to find the answer rather than be given it outright.
    http://forum.java.sun.com/thread.jsp?forum=54&thread=190747
    -- Question ---
    There are lots of ways to do this, check out the API documentation http://java.sun.com/j2se/1.4.2/docs/api/
    Your sample shows you can iterate the string so checkout these three classes.
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html

  • How to detect the content of a Loader?

    I would like to create a text field for the user to input the
    img URL which will be put into the contentPath of a Loader.
    I have a question that how to detect when the user entered a
    invalid URL and the loader will load the default image??
    Thanks so much

    well if you are using the MCL you can set up a function to
    handle the loadError event and trap the error and print it out or
    stick a default image in it's place. read up on the moviecliploader
    class

  • Moving the timeline from a loaded swf file

    Hi,
    I have been at this problem for awhile now.
    I have a two swf files, whic are loaded using ths code as an example:
    stop();
    var req:URLRequest = new URLRequest("Enchilada_A.swf");
    var loader:Loader = new Loader();
    function imageLoaded(event:Event):void {
        ldContainerB.addChild(loader);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
    loader.load(req);
    The first one is triggerrd by a MC button that is on the timeline.
    That first swf loads fine.
    At the end of that file(which is short animation)
    I have code that says:
    MovieClip(parent).gotoAndStop("frameThree");
    I have also tried:
    MovieClip(root) and
    if (movie Clip is parent) {
    MovieClip(parent).gotoAndStop("frameThree");
    and/MovieClip(parent).nextFrame();
    I have also tried placing this. or root. into the code.
    I am not talking to the timeline from this swf file.
    Once the timeline moves to the next Frame the new swf file can load.
    My solution was to combine both swf files into one, which loads from the timeline button.
    It works and I can gt by but I really woud like to learn how to load a swf and talk to the timeline fro more flexibilty.
    I'm out of strategies.
    Is my code in the wrong place(at the last frame of the animation?
    Should it be written on the timeline by creating a new var that has a function once the animation is completed.
    Any suggestions and/or commens would be greatly appreciated.
    Thanks.

    Thanks,
    I finally had a chance to get back to this project and used your suggestions, whichare definitiley helpful. I also, created a new and very basic version of the project so I could easily see what was happening.
    This is the code that works:
    stop();
    MovieClip(parent.parent).nextFrame();
    trace(container_mc);
    I'm still trying to understand how the child parent relationship is working but this will get me going in the right direction.

  • How to get the link report of a swf file to the set of clases

    He  But How to get the link Report of the SwF File

    Here are some links with additional information:
    http://stackoverflow.com/questions/185252/optimizing-flex-when-multiple-modules-are-used
    http://livedocs.adobe.com/flex/3/html/help.html?content=modular_4.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html
    If this post answers your question or helps, please mark it as such.

  • Is there a way to detect the end of a video?

    Is there a way to detect the end of a video.. .mp4 or youtube? I want to be able to detect the end of a video and then have it do something...ie play on timeline or go to and play symbol.

    For youtube the code would be something like this:
    view-source:calkaweb.herobo.com/video.html
    for HTML5 videos for youtube replace &version=3 with &html5=1 in the youtube URL
    I have no idea how to impletent the youtube code into Edge tho other than an iframe but that wouldn't work I've tried :
    http://forums.adobe.com/thread/1285212
    You would need to place all of the youtube codes into edge in order for it to work but I duno how to do that and no1 answered the question in the thread I made about it.
    as for MP4/HTML5 video you can use
    var video = document.getElementsByTagName('video')[0];
        video.onended = function(e) {
          /*Do Something*/

  • Detecting the end of an flv in ac 2

    I have a custom player i built. How do i detect the end of
    the flv so i can prompt an action, like go to another frame for
    instance or loop or call another flv. Have been struggling to find
    a solution online and keep hitting dead ends..
    Thanks in advance if someone can help... need this in
    actionscript 2

    unsure...
    I was just using keyframes on a timeline to play different
    flvplayers, brought in through import. I have used netstream
    successfully but i lose the player controls...

  • Detect the end of flvplayback

    i have an flvplayback component on stage, named the instance flvPlayer and added this code to frame 1, so a video loads in it.
    flvPlayer.source = "clip1.flv";
    the videos plays from the local folder perfectly.
    I need a code that when the video ends, it jumps and stop to frame 1 of scene2.
    something like:
    scene 1, Frame 1:
    stop();
    flvPlayer.source = "clip1.flv";
    // code for detecting the end of the video and jumping
    when flvPlayer completed
        MovieClip(this.root).gotoAndStop(1, "Scene 2");

    i have "Scene 1" and "Scene 2".
    i have the flvPlayback component on the stage of scene 1. i chose flvPlayer for the instance name.
    and added this code to frame 1 of scene 1:
    stop();
    flvPlayer.source = "clip1.flv";
    flvPlayer.addEventListener(VideoEvent.COMPLETE, completeHandler);
    function completeHandler(event:VideoEvent):void
        MovieClip(this.root).gotoAndStop(1, "Scene 2");
    and i have scene 2 with a stop action on it's 1st frame.
    when i try to test the file, i get this error message in compile error section:

  • How to get the end time of an Interface?

    How to get the end time of an Interface?

    Hi,
    As per your reuirement. I will suggest to use IKM SQL to SQL append. and Before Insert statement in IKM u need to add one more step i.e update. Your update should be like this
    command on sourse.
    <%for (int i=0; i < odiRef.getDataSetCount(); i++){%>
    <%=odiRef.getDataSet(i, "Operator")%>
    select      <%=odiRef.getPop("DISTINCT_ROWS")%>
         <%=odiRef.getColList(i,"", "[EXPRESSION]\t[ALIAS_SEP] [CX_COL_NAME]", ",\n\t", "", "((INS and !TRG) and REW)")%>
    from     <%=odiRef.getFrom(i)%>
    where     <% if (odiRef.getDataSet(i, "HAS_JRN").equals("1")) { %>
         JRN_FLAG <> 'D'
         <%} else {%>
         (1=1)     
         <% } %>
    <%=odiRef.getJoin(i)%>
    <%=odiRef.getFilter(i)%>
    <%=odiRef.getJrnFilter(i)%>
    <%=odiRef.getGrpBy(i)%>
    <%=odiRef.getHaving(i)%>
    <%}%>
    Command on target..
    UPDATE <%=odiRef.getTable("L", "TARG_NAME", "A")%> T
    set <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD2)")%> ='N',
    <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD1)")%> =SYSDATE
    where (<%=odiRef.getColList("","T.[COL_NAME]", ", ", "", "UK")%>)
    in(<%=snpRef.getColList("", ":[CX_COL_NAME]", ", ", "", "UK")%>) and <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD2)")%> <> 'N'
    check UD1 and UD2 columns.
    Hope this will help you.
    Regards
    Saurabh

  • How to detect the Acrobat Browser Plug-in version installed on a users system for non-IE browsers?

    How to detect the *Acrobat Browser Plug-in version* installed on a users system, on Firefox, Safari, Opera, etc?
    Or one script for detecting Plug-in version for major browsers. Need full example code.

    Wrote an article on this with code samples (Javascript + HTML) - basically there are differences between IE and other browsers. Chrome natively comes with the Chrome PDF Viewer so I've incorporated that in my detection script.
    The script detects the browser type, and the installed acrobat version...
    Have a look here:
    Detect the Adobe Reader Plugin

  • How to detect the path of Temp directory

    I am writing a class library which allows users to manipulate a database in the web server java applications/applets. In my logic the Application/Applet communicate with a CGI script/Servlet in the server and that do all the database handling. My objective is to make the Client independant from the Database Drivers, and to some restrictions and possible security threats that can arrice when accessing the database directly.
    99% of the work is done and now I am doing the fine tuning.
    My Problem:
    When the user downloading a blob object from the server database. each time the program read the blob it will get a new copy from the server. This is not good if the blob is large (few 100 megs) . So I am going to implement a cache system. but the problem is If I am caching in the memory it will not support large objects (Memory is a limited factor). So the preferance is use the Temperary files but I do not know how to detect the path to temperary folder.
    And my 2nd questions is are the applets allowed to write and read in temperary folder.

    The Java default temporary file path can be determined with
    System.getProperty("java.io.tmpdir")This is typically the same value as the os environment variable

  • How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?

    How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?
    I have a HTML extension running in In-design CC 2014 version.
    I want to perform some required set of actions before my extension window is closed(by clicking on the cross button on top right corner).
    Does In-design throws any event for it? Or can we capture it using C++ plugin in some way?

    Naah.......haven't got any event for that yet.
    Although, since HTML extensions are using chromium browser,  as a workaround, u can attach listener to HTML onClose event, but it won't solve any purpose if you
    are looking to logout session or do some business login in your code.

Maybe you are looking for