Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Flash MX 2004 back and next button and bg sound

Posted on 2005-03-25
Medium Priority
Last Modified: 2012-06-21
I have a little problem with using "back" and next" buttons and background music.

#######  Actionscript for "Next" button  ################

######### Actionscript for "Back" button  ############
prev_btn.onRelease=function() {

###########  The end of scripts ##############
I arranged layers as follows:
Action (to stop movie at frame 1)
Back (for "Back" button")
Next (for "Next" button)
Content (to place images every five frames)
Content container mov (a movie to be used as background of the images)
sound (mp3)
background (overall background)

The problem is that the "Back" button does not work when it is moved right to begin at frame 5 (it works fine when it starts at frame 1).  I got an error message saying, "Statement must appear within on handler
     next_btn.onRelease=function(){ ".

Another problem is that when I used "Back" button ("Back" button works when it begins at frame 1), the background music restarts in addition to the original flow of music, and when I pressed "Back" button several times, the background music turns into a total noise. Is there anyway to keep the use of "Back" button from disrupting the background music?

Hope to hear your geniuses' valuable advice and suggestions!

Friday, March 25, 2005, at 1:14 pm

Question by:duta1
  • 2

Accepted Solution

sokhodom earned 2000 total points
ID: 13633223
>>The problem is that the "Back" button does not work
You can solve it by attached the actionscript directly to the button, like this:

On Prev_btn
on (release) {

On next_btn
on (release) {

Delete those actionscript you wrote in the main time line. Then make sure that the above scripts are attached to the button ON EVERY Keyframe (sometimes you forget to put it in some keyframes and it wont work)

>>the background music turns into a total noise
You solve this by:
- click on sound (mp3) Layer (i suppose you attached the mp3 by moving it from library to the main stage)
- Open the Property Inspector by pressing CTRL + F3
- Change the SYNC variable to "Start" instead of "Event"

Author Comment

ID: 13633329
Dear Sokhodom:

Thank you so much for your very, kind, super help.

Your suggestions worked great.

I am a very beginner in Flash, and I expect and hope to get more wonderful help from you genius.

Thanks again!

Friday at 3:13 pm (March 25, 2005)

Expert Comment

ID: 13635042
You are welcome duta1 :)
Here is a great source to learn,


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question