View Full Version : Sliding Menu
clash_laine
05-31-2007, 04:31 PM
I am looking for a way to slide the flash across and back on the click of a button. For an example http://www.bu.edu/. When you click on a word, it slide all to the left across and keeps the remaining on the right, click it again it sends it back. I haven't found a tutorial on any site that really adressed this action. Any ideas?
Terumi
06-01-2007, 12:04 AM
ok... press F1 and read about tweens...
When you master that you can put an onRelease event to each button along with a "flag" variable check in order to see the current button position. If the flag is "left" you should go right and so on...
say ...
var is_the_button_left:Bollean = true;
button1.onRelease = function()
{
if (is_the_button_left == true)
{
// tween the button to the right
is_the_button_left = false;
}
else
{
// tween the button to the left
s_the_button_left = true;
}
}
I assume that you must tween, along with the buttons, some masks in order to hide or show the various elements and some other buttons too..
Cheers,
Terumi
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.