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

Audio track starts without command

Community Beginner ,
Jun 03, 2019 Jun 03, 2019

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

548
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

correct answers 1 Correct answer

Community Expert , Jun 05, 2019 Jun 05, 2019

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();

Translate
Community Expert ,
Jun 04, 2019 Jun 04, 2019

there should be an empty keyframe in frame 6 on the layer with the french video.

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
Community Beginner ,
Jun 04, 2019 Jun 04, 2019

I've looked around but I cannot find any empty keyframes, either on the main timeline or Inside both MovieClips.

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
Community Expert ,
Jun 04, 2019 Jun 04, 2019

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).

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
Community Beginner ,
Jun 05, 2019 Jun 05, 2019

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?

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
Community Expert ,
Jun 05, 2019 Jun 05, 2019

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):

Screenshot - 6_5_2019 , 8_07_56 AM.png

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
Community Beginner ,
Jun 05, 2019 Jun 05, 2019

Here is my main timeline:
sessionAS3.JPG
and here is one of the movieClip timeline:
sessionAS3_2.JPG

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
Community Expert ,
Jun 05, 2019 Jun 05, 2019

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.

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
Community Beginner ,
Jun 05, 2019 Jun 05, 2019

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?

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
Community Expert ,
Jun 05, 2019 Jun 05, 2019

upload your fla to a server and post a link.

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
Community Beginner ,
Jun 05, 2019 Jun 05, 2019

Here is a link to the .FLA file:

audioSartsWithoutCommand - Google Drive

Thanks alot for your help!

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
Community Expert ,
Jun 05, 2019 Jun 05, 2019

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();

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
Community Beginner ,
Jun 06, 2019 Jun 06, 2019

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?

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
Community Expert ,
Jun 06, 2019 Jun 06, 2019

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.

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
Community Beginner ,
Jun 06, 2019 Jun 06, 2019

That's amazing it works, Thank you for guiding me !!

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
Community Expert ,
Jun 06, 2019 Jun 06, 2019
LATEST

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.

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