turtle bacon and 41 unknown users

 Word :   Username :  
 
Bottom
Author
 Thread :

[Flash CS4] Next and Back Buttons

 
n°11467
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-21-2009 at 11:24:37 PM  
 

Hi all  :hello:
 
how do you make next and back buttons in flash CS4, im doing animation for an assessment and id like it to be 'pages' as such
 
Cheers  T


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
mood
GoogleAds
profil
Posted on 05-21-2009 at 11:24:37 PM  
 

answer
n°11468
uttaresh
The Penguin Master
Profil: Penguin Pro
Avatar
profil
Posted on 05-21-2009 at 11:31:04 PM  
 

What I did was first stop playback, and then use goTo(x) or goToAndStop(x) or whatever, where x denotes the frame number of the target frame(page). ;)


Message edited by uttaresh on 05-21-2009 at 11:31:24 PM

---------------
Glomping the internet populace.
http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif
One forum at a time.

answer
n°11469
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-22-2009 at 09:23:03 AM  
 

ok, but how do you do it in a button?


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11470
Gruzz
Profil: Moderator
Avatar
profil
Posted on 05-22-2009 at 09:35:57 AM  
 

You've to give the button an instance name. Then you've to call to that instance name in the Action Script. I've only used AS2, but here's an example.

 

key1_btn.onPress = function() {
 object1_mc.gotoAndPlay(2);
}

 

key1_btn = instance name
object1_mc = the object you want to move to frame 2
gotoAndPlay(2) = it'll play from frame 2 (perhaps you need gotoAndStop)


Message edited by Gruzz on 05-22-2009 at 09:36:13 AM
answer
n°11471
truth
-------------------------
Profil: Big Penguin
Avatar
profil
Posted on 05-22-2009 at 12:03:26 PM  
 

1. do you want to goto next/previous frame with the button, and you
have placed some thing in each frame to show? (like a slideshow)
 
or.
 
2. you have this many different animations(movieclips) and want  
the next/previous one to play on next/previous button press ?


---------------
http://img504.imageshack.us/img504/108/sigglassms3.png
answer
n°11472
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-22-2009 at 10:18:18 PM  
 

Both in one an animation is played then the next button appears and when you press it you go to the next page and the animation is played
 
I hope it's not too complex :D
 
(thanks anyway Gruzz!! :d )


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11473
truth
-------------------------
Profil: Big Penguin
Avatar
profil
Posted on 05-23-2009 at 12:22:12 AM  
 

1.create all the needed animations, and store them as movie clips in library.
 
2. create two buttons, btnPrev and btnNext. and place them on stage. instance names "btnPrev" and "btnNext".
 
3.create a new layer, insert keyframes for 2,3,4... frames, and place 1 animation on stage for each frame.
 
4.add necessary frames to buttons layer, to make it visible.
 
5 code:
 

Code :
  1. this.stop();
  2. import flash.events.MouseEvent;
  3. this.addEventListener(MouseEvent.CLICK, onMouseClick);
  4. function onMouseClick(evt:MouseEvent):void {
  5. switch (evt.target.name) {
  6.  case "btnPrev" :
  7.  this.prevFrame();
  8.  break;
  9.  case "btnNext" :
  10.  this.nextFrame();
  11.  break;
  12. }
  13. }



---------------
http://img504.imageshack.us/img504/108/sigglassms3.png
answer
n°11480
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-25-2009 at 03:32:09 PM  
 

i just tryed it but i didnt get too far...

 

i get a load of animations all playing at the same time with 2 buttons

 

what layer do i put the actions in (the buttons layer?) and how to i make it so only 1 movie of picture is on at a time?

 

T

 

EDIT: i got it working!!

 


Message edited by thetmyster on 05-25-2009 at 03:59:37 PM

---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11482
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-25-2009 at 10:43:41 PM  
 

Links :
 
FLA: http://stor.thetmyster.com//files/ [...] mation.fla
 

SWF file


 
SWF: http://stor.thetmyster.com//files/ [...] 20back.swf


Message edited by thetmyster on 05-25-2009 at 10:44:52 PM

---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11483
ghostnatyphon
To die would be a great adventure.
Profil: Penguin Pro
Avatar
profil
Posted on 05-25-2009 at 11:53:10 PM  
 

Well... it wrote war and peace, then stopped on the war and peace text (presumably it doesn't loop then?)
 
Pressing the buttons doesn't do anything... except pressing the back button eventually makes the buttons vanish :p


---------------
There is a God :ar: www.ie6nomore.com
Glomping the internet populace http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif One forum at a time.
answer
n°11484
uttaresh
The Penguin Master
Profil: Penguin Pro
Avatar
profil
Posted on 05-26-2009 at 12:10:41 AM  
 

I want to read War and Peace, though I want to finish Crime and Punishment first ...
 
Oh, by the way .... your SWF does not work. :/


---------------
Glomping the internet populace.
http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif
One forum at a time.

answer
n°11486
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-26-2009 at 11:03:26 AM  
 

uttaresh wrote :

I want to read War and Peace, though I want to finish Crime and Punishment first ...
 
Oh, by the way .... your SWF does not work. :/


 
You need Flash 10,  
 
the butons have no programed content,
 
take a look at the flash file (CS4 Only  :winktongue:  )  
 
i put in a few keyframes so it would stay there its no supposed to loop if i remove the keyframes and just have one with a  animation on then im good to go :D


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11487
uttaresh
The Penguin Master
Profil: Penguin Pro
Avatar
profil
Posted on 05-26-2009 at 02:07:06 PM  
 

No, I mean your next and back buttons don't work ... which is the entire purpose of this thread, is it not?


---------------
Glomping the internet populace.
http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif
One forum at a time.

answer
n°11488
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-26-2009 at 09:05:59 PM  
 

Uh the button  do work :D

 

http://stor.thetmyster.com//files/ [...] %21%21.swf

 

Or  

SWF file

+

 

when i get to the end of the content i need to make it popup and say finished or somthing ill do that later


Message edited by thetmyster on 05-26-2009 at 09:38:20 PM

---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11489
ghostnatyphon
To die would be a great adventure.
Profil: Penguin Pro
Avatar
profil
Posted on 05-26-2009 at 09:18:07 PM  
 

And when I click back first, instead of next, the buttons vanish. Arghh!


---------------
There is a God :ar: www.ie6nomore.com
Glomping the internet populace http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif One forum at a time.
answer
n°11490
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-26-2009 at 09:38:26 PM  
 

i know  i forgot to fix that :P  
 
Fixed :D
 
 

SWF file


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11491
ghostnatyphon
To die would be a great adventure.
Profil: Penguin Pro
Avatar
profil
Posted on 05-26-2009 at 09:43:42 PM  
 

Pressing back still makes the buttons vanish...


---------------
There is a God :ar: www.ie6nomore.com
Glomping the internet populace http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif One forum at a time.
answer
n°11492
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-26-2009 at 10:14:56 PM  
 

not for me i press back and then the back button diasppears press next and it will appear  
 
what flash vertion are you using?
 
its fine for me
 
at first there is next (click next)
 
now next and back
 
(Clicks back)
 
back button disapears  
 
its suppposed to so they dont all disapear :D


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11493
ghostnatyphon
To die would be a great adventure.
Profil: Penguin Pro
Avatar
profil
Posted on 05-26-2009 at 10:18:37 PM  
 

Whatever the latest version is.
 
At first there is a back and a next button, and the "war and peace" animation.
 
clicking next goes to the whole Uttaresh business, etc.
 
Clicking back makes the next and the back button completely dissapear.
 


---------------
There is a God :ar: www.ie6nomore.com
Glomping the internet populace http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif One forum at a time.
answer
n°11494
Gruzz
Profil: Moderator
Avatar
profil
Posted on 05-26-2009 at 10:21:11 PM  
 

I can see the confusion here. The back button only causes the screen to go black when you are at the very fist 'slide'.

answer
n°11495
ghostnatyphon
To die would be a great adventure.
Profil: Penguin Pro
Avatar
profil
Posted on 05-26-2009 at 10:22:34 PM  
 

Yea, though the "war and peace" is still there...
 
Anyway, yea, clickign Back on the first slide causes the buttons to vanish :(


---------------
There is a God :ar: www.ie6nomore.com
Glomping the internet populace http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif One forum at a time.
answer
n°11496
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-26-2009 at 11:13:52 PM  
 

both or only the back button?


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11497
ghostnatyphon
To die would be a great adventure.
Profil: Penguin Pro
Avatar
profil
Posted on 05-26-2009 at 11:18:30 PM  
 

Both.


---------------
There is a God :ar: www.ie6nomore.com
Glomping the internet populace http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif One forum at a time.
answer
n°11521
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-29-2009 at 06:38:46 PM  
 

ok ive makde an animation in another flash document but every time i import to my main fla(as3 with buttons) it treats each frame as a slide not an animation how do i fix this ?
 
:D


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer

Go to:
Add a reply