Success!

Note

Error

Session expiration Your session is going to expireClick here to extend

Budget:

Small project <800

Posted on

4/17/13 5:57 PM

Buyer:

Han***

This project has expired

Why don't you register anyway? We are sure that you will find many similar projects out of the thousands waiting for you!

Post similar project now

Description

This is an interactive kiosk programmed with Flash CS5, Actionscript 3.

There is a main menu with 7 main topics linked to 7 swf files that are loaded externally into the main flash file. Each of the seven swf external swf files contain a Flash FLV video.

WHAT NEEDS TO BE FIXED:

I need the actionscript code for:

At the end of each swf video file I want to automatically jump back to the main menu without pressing a button. I already have a main menu button that does this correctly upon clicking it.

But I also need code to have each video automatically go back to the main menu at the end of each video.

The main flash file is set up in 9 scenes:

  1. Introduction
  2. Main menu
  3. Video 1 (All videos called from main menu – externally loaded swf files)
  4. Video2
  5. Video3
  6. Video4
  7. Video5
  8. Video6
  9. Video7

 

Here is my actionscript 3 code to load the external video files:

import flash.events.MouseEvent;

//(optional) load a second external SWF file

var my2ndLoader:Loader = new Loader();

var url2:URLRequest = new URLRequest("2-video-stores-sold.swf");

my2ndLoader.load(url2);

addChild(my2ndLoader);  

// (optional)

my2ndLoader.x = 426;                                        // move the loaded SWF 10 pixels to the right (from the left edge)   

my2ndLoader.y = 175;                                       // move the loaded SWF 175 pixels down from the top

 

/* Click to Go to Scene and Play

Clicking on the specified symbol instance plays the movie from the specified scene and frame.

 

Instructions:

1. Replace "Scene 3" with the name of the scene you would like play.

2. Replace 1 with the frame number you would like the movie to play from in the specified scene.

*/

menu.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_62);

function fl_ClickToGoToScene_62(event:MouseEvent):void

{

                MovieClip(this.root).gotoAndPlay(1, "main menu");

}

menu.addEventListener(MouseEvent.CLICK,unloadSwf2);

function unloadSwf2(e:MouseEvent):void {

my2ndLoader.unload();

my2ndLoader.unloadAndStop();

import flash.media.SoundMixer;

SoundMixer.stopAll();

}

 

I have this actionscript code at the end of the video. The sound stops but the swf file ends at the end frame of video and just sits there and does not go back to main menu.

 

import flash.media.SoundMixer;

SoundMixer.stopAll();

 

import flash.media.Video;

 

/* Remove Instance from Stage

Removes the specified symbol instance from the stage.

*/

{gotoAndPlay(1, "main menu");

}

removeChild(my2ndLoader);

 

What actionscript code do I need to automatically go back to the main menu at the end of each flv video (playing in each of the 7 external swf files) without clicking any buttons?