ActiveDen

As3.0 Jump to frame of button click demo

904 posts
  • Has been a member for 4-5 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

Hi all, I am looking to buy a file that I can use in all my new as3.0 projects. I would like a file that I could use to Jump to a Frame Label on a button click. a ideal solution would allow me to have many buttons on the screen at all times that could take me to various frame labels across my flash timeline.

I can not for the life of me find a tutorial or a file that will do this for me. I hope to use this file in all of my new as3.0 project. I just need a way to navigate across the timeline on basic button clicks. I will buy files from anyone who can help with this or I will consider buying the solution through paypall if the price is fair. thanks for any time and help anyone has time to offer. Sincerely,

ps I think this file would sell well. because alot of people have a hard time with the basics of as3.o

UR23

Posted 3 years ago Permalink
2309 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Envato Staff
  • Reviewer
  • Exclusive Author
  • Beta Tester
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • United States
  • Referred between 10 and 49 users
theflyingtinman says

Here is a quick example I threw together:

gotoFrameLabel

You can download the source fla here but basically all it is is a timeline with 3 layers :

timeline snapshot

The Frames layer has the named frames (named “one”, “tow”, etc) The Buttons layer has five buttons, instance names btn1, btn2, etc, visicle across all layers.

The Actions Layer has the following code:

stop();

//for simple button function (single statement) you can use:
btn1.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "one" )});
btn2.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "two" )});
btn3.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "three" )});
btn4.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "four" )});
btn5.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "five" )});

/*
or for more complex functions use :

btn1.addEventListener(MouseEvent.CLICK, btn1Funtion );
btn2.addEventListener(MouseEvent.CLICK, btn2Funtion );
...etc

funtion btn1Funtion()
{
    gotoAndStop("one")
    ...
    etc
}

funtion btn2Funtion()
{
    gotoAndStop("two")
    ...
    etc
}

...etc

*/
Posted 3 years ago Permalink
theflyingtinman is an Envato staff member
904 posts
  • Has been a member for 4-5 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

u da man flying tin man. Thank you sooo much for doing this work for me. I will be getting your webcam file as soon as I up my credits. Gotta love flashden. thanks again for all your time and help. this means alot to me.

sincerely, Jared

Posted 3 years ago Permalink
904 posts
  • Has been a member for 4-5 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

wow I really like the way you used the components for buttons. i did not know you could do that. cool

Posted 3 years ago Permalink
3856 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Author had a Free File of the Month
  • Exclusive Author
  • Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Bought between 100 and 499 items
  • United Kingdom
  • Referred between 200 and 499 users
flashjunkie says

Cant beat the community spirit around here, nice on Tinman :)

Posted 3 years ago Permalink
no-thumbnail

davinciwatergarden Recent Posts
Threads Started

1 post
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
davinciwatergarden says

Thanks tinman…

How would you write a ‘more complex’ function that first faded the existing content (two movie clips) on a frame before running the gotoAndStop , and then fading in the new frame in a similar, but reversed, manner?

Thanks (again) for the much needed help

Posted 3 years ago Permalink
1 post
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
wickman says

Wonderful.

I love the simplicity of this. Thanks tinman.

Posted 3 years ago Permalink
1 post
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
glenforest says
Here is a quick example I threw together: gotoFrameLabel You can download the source fla here but basically all it is is a timeline with 3 layers : timeline snapshot The Frames layer has the named frames (named “one”, “tow”, etc) The Buttons layer has five buttons, instance names btn1, btn2, etc, visicle across all layers. The Actions Layer has the following code:
 stop(); //for simple button function (single statement) you can use: btn1.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "one" )}); btn2.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "two" )}); btn3.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "three" )}); btn4.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "four" )}); btn5.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "five" )}); /* or for more complex functions use : btn1.addEventListener(MouseEvent.CLICK, btn1Funtion ); btn2.addEventListener(MouseEvent.CLICK, btn2Funtion ); ...etc funtion btn1Funtion() { gotoAndStop("one") ... etc } funtion btn2Funtion() { gotoAndStop("two") ... etc } ...etc */ 

I tried this, but got the following error:

1071: Syntax error: expected a definition keyword (such as function) after attribute funtion, not btn1Funtion.

Any ideas?

-toecutter

Posted 3 years ago Permalink
567 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Ireland
  • Referred between 10 and 49 users
iamdok says

ToeCutter

The word function is spelled incorrectly in his pasted code, at btn1Function, change that and you’ll be set.

Donagh

Posted 3 years ago Permalink
80 posts
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 10 and 49 items
Pumi says

i think its because it should be function and not funtion in:

function btn1Funtion()
{
gotoAndStop(“one” )
...
etc
}

@iamdok You are faster then me :P

Posted 3 years ago Permalink
by
by
by
by
by