Im trying to figure out how I can have a tween at the end of an action.
For example, If I had a flash site divided up into scenes with a navigation bar runing throught the whole site. How could I get the page or item on the stage tween (fade out for example) before it entered the next page?
You’ll have to excuse me, ive only been using Flash for a year or so and done know all the terminology. ;>)
Surely there is an easier way of advancing the playhead at the end of an action. otherwise you would have to create a seperate scene for every button on every page to just to put the root in?
If I have a scene that is 60 frames long. There is animation for the first 50 frames and the playhead stops on frame 50. On the press of a button I want the playhead to move over the tweens between frame 50 and 60, and on frame 60 go to another scene. If I have 5 buttons on my navigation the action above wont work as the other buttons will follow the same root.
There must be some actionscript that can be assigned to a button to advance the playhead 10 frames and then move to a specific frame all in one script.
I think thats correct, unless Im confused as hell! ;>)
Well, I certainly am, but that is more to do with the fact that I don’t usually work in scenes, so let me ask you a couple of Q’s
Is what takes place between frame50 and 60 a kind of “outro”?
Is everything that is happening on the main timeline ?
If so, on your button you just need a play(); action, on frame60 you can put ( for tidyness and efficiency)
[AS] nextFrame();
// or
gotoAndPlay(“nextscenename”,1);
[/AS]
In reality you could leave frame 60 blank as the playhead will automatically go to the next frame anyway (which is frame1 of the next scene - right ?).
Still confused - if so and you cannot get it to work post your fla and i will take a look
Hi,
I think you may be overcomplicating a bit - unless I have completely misunderstood. If you want to play frames 50 - 60 before you go to the next scene, then your buttons ( all of them)only need to have:
[AS]on(release){
play();
}
//and your last frame (60) needs
nextFrame();[/AS]
Unless of course you are usinng the buttons to do something else
Are you ?
okay, so how do you get each button to point to a specific scene (or frame). The above action seems good for a button that tells the playhead to advance but if you assigned this to five buttons, theyd each do the same thing would then not?
Do you know a script to assign to a button in frame 50 (as my e.g.) to advance X amount of frames and then play to a specific scene or frame?
There must be no root actions in the last frame as this would upset the root of the button?
Hi adfox
We are going around in circle here methinks (lol!!)
First of, you do not need to point your buttons any where IF after frame 60 you want the playhead to go somewhere else !
Actions in the _root timeline will not affect your button at all !
I can explain it easier if I have an fla to look at
Hummm, unfortunately i dont have a .fla cus im still planning what to do! If you want take a look at my web site www.adfox.co.uk and imagine that it is a complete flash site…
If I wanted each page to fade out before it went to the next one im not sure you could just use
on(release){
play();
// or
gotoAndPlay(“nextscenename”,1);
Hi,
Just a thought, I may have been over simplyfying things,if you have five buttons, one for each scene and you want the user to be able to go to a scene in any order then all you need to do is set a variable on the _root like this:
[AS]//frame 1 of the _root
var count
play();
//frame50
stop();
//frame60
gotoAndPlay(“scene” + count,1);[/AS]
Then on each button your code would like this
[AS]
on(release){
count = 1;
play();
}
//on button2
on(release){
count = 2;
play();
}
//and so on[/AS]
This assumes that your scenes are called "scene1, “scene2” and so on, so if you have different names for your scenes make sure you call all the scenes the same thing and put a number on the end of the name and change “scene” in frame 60 to that name.
This means that the user can view different scenes in any order and can jump back as well as forward