Results 1 to 4 of 4

Thread: Going to frame 1 after external .flv has finished playing

  1. #1
    Registered
    Join Date
    Nov 2009
    Location
    Brussels
    Posts
    2
    Rep Power
    0

    Unhappy Going to frame 1 after external .flv has finished playing

    I got Flash 10.0 (CS4).

    I got a banner with in import movie in .flv.
    The is a still image at frame 1, with a button and a STOP action. When you click the button, you go to frame 2, with an istance of the external histed .flv, so that the movie start playing in streaming.

    I need the banner to get back to frame 1 when the .flv has finished playing.

    Now, I read this thread, and I thought I had the solution from Guy: http://forums.powweb.com/showthread.php?t=81207

    But, I just can't make it work.
    To follow Guy's instructions, I called the instance for the .flv movie in my.fla: vid
    And called the cue point: cue1

    I've put the code in frame 2 (actions).
    It just doesn't work. When he says name the component "vid", does he mean the external file? Like vid.flv? Or the internal instance of that file? (What I did).

    Is there any other way to do so?
    Do I need to load a special component for the code to work?

    Thanks for the help.
    I need to get this figured out by tomorrow morning.

  2. #2
    A little light reading--- Guy's Avatar
    Join Date
    Mar 2003
    Location
    CA
    Posts
    169
    Rep Power
    15
    Gian-ava-

    Name the player vid

    also are you using actionscript 2 or 3?

    The code you are looking at is for actionscript 2, if you are using A3 change the word Void to void
    (no cap) in the code and it should work fine.


    Guy
    Last edited by Guy; 11-18-09 at 06:31 PM. Reason: more info
    G.Lee

  3. #3
    Registered
    Join Date
    Nov 2009
    Location
    Brussels
    Posts
    2
    Rep Power
    0
    Guy, thanks for getting back to me.

    Don't know what's wrong in the process. I'll describe what I did, so that you may spot some mistakes.

    I am using Actionscript 2.

    1) The external movie file that is on the server is called: 3289-4-20FR.flv

    2) I imported this file (instance) into Flash (placed it in frame 2). It's called: vid (it's this the "component" you are referring to?).

    3) I selected and went into Components Inspector and selected Cue Points. I set that so that I have: Name: cue1 / Time: 00:00:20.000 / Type: Actionscript

    4) I've put this code into an action on frame 2:

    //code
    stop();
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    // Put any code you like here
    trace("Cue point name: " + eventObject.info.name);
    trace("Cue point type: " + eventObject.info.type);
    if(eventObject.info.name=="cue1"){
    gotoAndStop(1);
    }
    }
    vid.addEventListener("cuePoint", listenerObject);

    Is there something I should have done while converting the original movie into the .flv, by any chance?

    Because other than that, I can see what' wrong with the process. Do you?

    I tried as a test to set the time to 5 secs in order to see if after 5 secs that the movie started, the timeline would go to frame 1 and stop. But nothing. The movie keeps going, it ends and the timeline doesn't go to frame 1. As I axplained I need to show the movie screenshot when the movie ends.

    Many thanks for taking your time for this.

  4. #4
    A little light reading--- Guy's Avatar
    Join Date
    Mar 2003
    Location
    CA
    Posts
    169
    Rep Power
    15
    See if you can zip it up so I can download it, and Ill take a look at it

    Guy
    G.Lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •