Skip to main content
mdgani11
Participant
July 24, 2015
Answered

Problem in sound.

  • July 24, 2015
  • 1 reply
  • 469 views

I have 3 frames in flash as3.

First Frame is a movie clip and it contains logo music

Second Frame is a button, if we click, it goes to 3rd frame,

Third Frame is a back button and if we click, it back to 2nd Frame.

The problem is when i click the back button, logo music is played in the 2nd Frame. I dont know what the problem is? So please help me to what's wrong goes here.

The below link is the source file.

https://www.sendspace.com/file/r3wjia

Sorry for my poor english.

Thank You.

This topic has been closed for replies.
Correct answer kglad

don't attach sound to timelines (especially nested ones).

use the flash sound class to play sounds by assigning your sound a class (eg, Music) and using:

var music:Music=new Music();

music.play();

1 reply

kglad
Community Expert
Community Expert
July 24, 2015

assign your music's sync sound property (in the properties panel) to start in frame 1 and assign it to stop in frame 2 (if that's what you want).  or in frame 1 assign its sync property to event if you want it to play to completion and not replay unless frame 1 is reenetered.

mdgani11
mdgani11Author
Participant
July 24, 2015

First frame is movie clip (not audio), and it contains sound and in sounds property panel, i set it to stream, and at at the  end of sound ("which means last frame of this movie clip") i use the action script ''stop();

MovieClip(parent).nextFrame();"

so the play button comes.(2nd Frame)

if we click play button, it goes 3rd frame.

3rd frame is back button.

if we click back button, it goes to 2nd frame(play button). But the movieclip sound play here. iam not extend the movie clip in frame 2. But i dont know how it is played.

Please download the source from the below link and tell me what the problem is.

https://www.sendspace.com/file/r3wjia

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
July 24, 2015

don't attach sound to timelines (especially nested ones).

use the flash sound class to play sounds by assigning your sound a class (eg, Music) and using:

var music:Music=new Music();

music.play();