Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Playing multiple videos

New Here ,
Jun 05, 2013 Jun 05, 2013

Hello,

I'm new to Flash Professional and Actionscripts trying to figure out how I can play two videos in a way that will make the 1st stop at a certian point then the 2nd comes to the screan and starts playing then go back to the 1st video where I stopped ( not from the beginning again) here is the script I got off the internet and was working on it for a while I got rid of all the errors I had but now it doesn't give me an error instead when I try playing it, it doesn't play the videos and gives me the screen in the 3rd pic down.

Here are the videos I'm using:

Capture1.PNG

The script I'm working on:

Capture2.PNG

the screen it shows me when I click Ctrl+Enter:

Capture3.PNG

Thank you guys in advance for the help

TOPICS
ActionScript
589
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2013 Jun 21, 2013

After working on it for a while I got one of the videos to open (the 1st one) and when I click enter it replays the 1st video again without going to the second.

I kind of commented out the lines that didn't make any difference when I commneted them to know what thier job is. 

Here is the edited code now:

import fl.video.*;

// import fl.video.MetadataEvent;

//player.addEventListener(MetadataEvent.CUE_POINT, cp_listener);

function cp_listener(eventObject:MetadataEvent):void{

// trace("Hit cuePoint event for player: "+eventObject.vp);

     if (eventObject.vp == 0) {

          player.pause();        // pause the first FLV file

          player1.activeVideoPlayerIndex = 1;    // make the 2nd player active

          player1.visibleVideoPlayerIndex = 1;   // make the 2nd player visible

          player1.play();    // begin playing the new FLV player

     }else if (eventObject.vp ==1){

          player1.pause();    // pause the 2nd FLV

          player.activeVideoPlayerIndex = 0; // make the 1st player active

          player.visibleVideoPlayerIndex = 0;  // make the 1st player visible

          player.play();   // begin playing the 1st player

      }
}

player1.addEvnetListener(VideoEvent.COMPLETE, complete_listener);

function complete_listener(eventObject:VideoEvent):void{

       // trace ("Hit complete event for player: "+eventObject.vp);

      if (eventObject.vp == 0){

          player1.activeVideoPlayerIndex = 1;

          player1.visibleVideoPlayerIndex = 1;

          player1.play();

      } else {

          player.closeVideoPlayer(1);

          }

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 01, 2013 Jul 01, 2013

Looks like you have the video components on different frames, put them both on the same frame but seperate layers and reduce the timeline to only one frame.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2013 Jul 09, 2013
LATEST

Thank you I'll try that

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines