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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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
Ayman_fmaAuthor Commented:
Can you explain in more details ?
dgofmanCommented:
did you check a video?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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

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
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)
Ayman_fmaAuthor Commented:
I tybed this code
one.onRelease = function()
{
_root.main_1.gotoAndStop(1);
}
snap-3.gif
Ayman_fmaAuthor Commented:
And I tryed this code
on (release)
{
_root.main_1.gotoAndStop(1);
}


Im using Adobe flash cs3
Ayman_fmaAuthor Commented:
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


dgofmanCommented:
Ayman_fma,
Why you don't want to submit your FLA in CS4 format?
We can check and fix your file
Ayman_fmaAuthor Commented:
Thanks For The Good Efforts
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.