how to move to specific frame in “snap_1?

I  create flash file for my company . how to move to specific frame in “snap_1” ,I create four buttons in four layers and another layer called “pages” inside this layer I create a movie clip inside this movie there four frames”snap_2” I want to know how to move to frame one when I click the button “one”, and how to frame 2 when I click button “two” , and how to frame 3 when I click button 3 and and how to frame 4when I click button “Four” ? snapshot 1Im using ActionScript 1.0 & 2.0
snap-2.gif
Ayman_fmaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dgofmanCommented:
You need to use on(press) and gotoAndPlay

I found a good tutorial on youtube

http://www.youtube.com/watch?v=3HoLUMVtOVw
0
Ayman_fmaAuthor Commented:
Can you explain in more details ?
0
dgofmanCommented:
did you check a video?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Ayman_fmaAuthor Commented:
Yes thanks in advance but I have a simple Question,
The frame that I wanna to reach is in another movie clip in another layer
0
blue-genieCommented:
the layers don't matter, you simply need to give your movieclip an instance name (look in the properties window)

You have 2 options
1. put the code directly on the button
or
2. give the button an instance name as well and put the code on the timeline.

if you do the first

on (release)
{
_root.otherMovieclipInstanceName.gotoAndStop(whicheverFrameYouwant);
}

option 2

buttonInstanceName.onRelease = function()
{
_root.otherMovieclipInstanceName.gotoAndStop(whicheverFrameYouwant);
}

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ayman_fmaAuthor Commented:
Thanks blue-genie but I tried both of them but it’s not working
0
blue-genieCommented:
do you get errors? what's happening?
which version of Flash (IDE) are you using?
it' a bit difficult to help you if we can't see what you're doing.

can you paste the code that you used here and also say where you put that code (screenshot would work)
0
Ayman_fmaAuthor Commented:
I tybed this code
one.onRelease = function()
{
_root.main_1.gotoAndStop(1);
}
snap-3.gif
0
Ayman_fmaAuthor Commented:
And I tryed this code
on (release)
{
_root.main_1.gotoAndStop(1);
}


Im using Adobe flash cs3
0
Ayman_fmaAuthor Commented:
0
blue-genieCommented:
okay some quick flash 101

if you look at your actions panel (where you put the code) - you'll notice it says Actions - Button or Actions
this tells you where you're currently trying to place your code.

if you're do this

on (release)
//do something etc;
}
it has to go on the button - that's why you get the "Statement bust appear within on handler" error message.

do the
one.onRelease  = function() { one but make sure you're in the Actions for the frame - ie. click the frame where the button is - don't select the button, it should just say Actions or Actions - Frame


0
dgofmanCommented:
Ayman_fma,
Why you don't want to submit your FLA in CS4 format?
We can check and fix your file
0
Ayman_fmaAuthor Commented:
Thanks For The Good Efforts
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.