Copy link to clipboard
Copied
Hello,
I created a little application using AS3. This app allows a person to select the language of choice (french or english) of a video.
In order to do this, I have established one main timeline with 3 key frames: Frame 1 is Home page with buttons "french" and "english". Key frame 5 is a movieclip with the french movie and key frame 10 is the other movieclip with the movie in english.
Everything woks perfectly except when "english" button is selected, the video plays the french and english audio tracks simultaneously (unusual). On the other hand, when "french" button is selected, only the french audio plays (as expected).
As you would understand from this, I cannot use the "stop all sound" command cause the english audio has to play.
My AS3 session is super clean, I have no idea why the SWF file export this way.
If someone could help I would be very grateful!
Thanks in advance,
Karol
remove the french sound layer in video.fr.
in your library assign the french mp3 a linkage of French.
in frame 1 of video.fr, use:
var french:French=new French();
french.play();
Copy link to clipboard
Copied
there should be an empty keyframe in frame 6 on the layer with the french video.
Copy link to clipboard
Copied
I've looked around but I cannot find any empty keyframes, either on the main timeline or Inside both MovieClips.
Copy link to clipboard
Copied
you need to create that. ie, on your main timeline's frame 6 you should insert that empty keyframe (right click frame 6, correct layer, click insert blank keyframe).
Copy link to clipboard
Copied
I inserted a blank keyframe at frame 6 on the maintime line, saved and exported the swf file; I still have the same problem. Would you have an other suggestion?
Copy link to clipboard
Copied
you're doing something wrong.
does your timeline look something like this (notice french video layer does not extend to frame 10 where the english video is located):
Copy link to clipboard
Copied
Here is my main timeline:
and here is one of the movieClip timeline:
Copy link to clipboard
Copied
that looks problematic.
save with a new name in a new directory. delete the french folder (and its layer). test your english button to see if it works the way you expect.
Copy link to clipboard
Copied
Yes, having followed your instructions, the result is the English video playing with the English audio (no french audio just as wanted). In that case, how should I include the french video + audio wthout it overlapping on the english movieClip?
Copy link to clipboard
Copied
upload your fla to a server and post a link.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
remove the french sound layer in video.fr.
in your library assign the french mp3 a linkage of French.
in frame 1 of video.fr, use:
var french:French=new French();
french.play();
Copy link to clipboard
Copied
I've deleted the sound layer of the french movieClip and inserted the code you suggested to frame 1.
Then, to assign a linkage; doe's that mean I must rename my file to "French.mp3" in order for the code you suggested to call and play the french sound file?
Copy link to clipboard
Copied
no.
in your library, each object has a symbol name and can have a linkage assigned. double click in the linkage column of your french mp3 and you'll be able to type a linkage name.
Copy link to clipboard
Copied
That's amazing it works, Thank you for guiding me !!
Copy link to clipboard
Copied
you're welcome.
p.s. i believe the problem is an animate bug caused by the length of the french movieclip timeline. though it's about 1/2 the max 16000 frames, it still is problematic.