Sometimes you just want to be very modern about your website. And how better to show people how cool you are as a flash programmer than to make them experience it themselves? In this tutorial I will show you how to create a modern menu with spring-like buttons. We’ll even make it customizable from xml!
Preview
Let’s take a quick look at what we’re working towards:
Step 1: Preparing the document
Create a new ActionScript 3 flash file and set the dimensions to 600 x 200 pixels. We’re setting these dimensions in order to have space for the buttons to follow the mouse. Set the framerate to 25 and the DocumentClass to ElasticMenu, a class which we will create after the design.

Let’s make a background gradient which will be the base for our button. Create a rectangle and make it 150 x 40px. The size doesn’t matter at this time, because we will resize the rectangle to match the text size of the button.

I can hear you asking: why not create a rectangle programatically with Sprite.graphics.drawRectangle()? I’ll show you why I chose this path. The reason behind making a movieclip on the stage is that we can actually cut through the rectangle to create a cool cut-out button like in this preview:
I’m not going into how to make this example here, but this method’s better in case you want to spice up the background of the button. That’s just a tip.
Step 2: Creating the Background Movieclip
Select the rectangle you just created and press F8 (Modify > Convert to Symbol) to make the background graphic and check Export for ActionScript. Give this movieclip the class name “GradBackground”. We will use this class name from ActionScript.

Step 3: The XML File
Now we’ll create the xml file to hold our configuration. From this file the flash movie will get the button name, the link location and the color. Create a new file next to the .fla source and name it menu.xml with the following:
<?xml version="1.0" encoding="utf-8"?>
<menu>
<button>
<name>Home</name>
<url>http://flash.tutsplus.com</url>
<color>0xff0000</color>
</button>
<button>
<name>About us</name>
<url>http://net.tutsplus.com</url>
<color>0xccff00</color>
</button>
<button>
<name>Projects</name>
<url>http://vector.tutsplus.com</url>
<color>0x446677</color>
</button>
<button>
<name>News</name>
<url>http://psd.tutsplus.com</url>
<color>0x004488</color>
</button>
<button>
<name>Forum</name>
<url>http://photo.tutsplus.com</url>
<color>0x2244ff</color>
</button>
<button>
<name>Contact</name>
<url>http://audio.tutsplus.com</url>
<color>0x232323</color>
</button>
</menu>
What happens here? We’re creating a <button> node for every button. You can add as many as you need, but not too many because they won’t have space to “be elastic” :) In every button node there is a name tag, a url tag and a color tag, pretty basic.
Step 4: Begin the Programming
Now let’s get to building the actual flash menu. Create a new ActionScript file and name it ElasticMenu.as. For speed I have used the wildcard * to import all the classes in the package. After you finish the flash menu, you can modifiy the imports to only include what you need, to make the filesize smaller. Create the usual package and class name ElasticMenu with the required variables:
package {
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.events.*;
import flash.utils.Timer;
public class ElasticMenu extends MovieClip {
var xml:XML;
var buttons:Array;
var tm:Timer;
var maxdist:Number = 50;
}
}
The xml variable will hold the actual xml loaded from the menu.xml file. The buttons variable is an array that will hold the button references.
The tm is a timer that will take care of the actual check for distance.
The maxdist variable will define at what distance the button will break from the mouse and return to its place.
Step 5: XML Loading and Handling
Ok, let’s create the constructor function, add the load operations and process the xml:
public function ElasticMenu(){
var req = new URLLoader();
req.addEventListener( Event.COMPLETE, xml_loaded );
req.load( new URLRequest('menu.xml') );
buttons = new Array();
tm = new Timer( 40 );
tm.addEventListener( TimerEvent.TIMER, check_buttons );
}
private function xml_loaded( e:Event ){
xml = XML( e.target.data );
createButtons();
}
What’s happening here? We create a URLRequest object and add a complete event handler that will trigger the xml_loaded function when the xml is loaded.
We initialize the buttons array and the timer, and we tie the TIMER event to the check_buttons() function. This is the function that will check for the distance of the buttons. Once the xml is loaded, we pass it to the xml variable and build the buttons with the createButtons() function, which we will create next.
Step 6: The createButtons Function
Continue by creating the buttons and position them on the stage programtically:
public function createButtons(){
var sectw = (stage.stageWidth/(xml..button.length()+1) );
for( var i=0; i< xml..button.length(); i++){
var m = new ElasticButton();
m.x = sectw + (sectw*i);
m.y = stage.stageHeight/2;
m.init( xml..button[i] );
addChild( m );
buttons.push( m );
}
tm.start();
}
Ok, so we are defining the sectw variable, which is the stage split into the number of buttons plus one. Why? Because we will arrange the buttons to be exacly the same distance from each other and occupy all the stage width. To better understand this, look at the following image:

Because we are centering the buttons on x and y axis, they will end up being at equal distances from one another. Then we are creating a for loop, insidew which we define every button as a new ElasticButton class, which we will code shortly. We place every button at sectw distance from one another and set their y to half the stage to center them. Then we add them to the stage and push them into the buttons array, for later use. But there is another function we call on the button which we’ll define in the ElasticButton class, which we pass the current xml button node.
Step 7: The checkButtons Function
Let’s continue with the main function triggered every 40 miliseconds by the timer:
private function check_buttons( e:TimerEvent ){
for( var b in buttons ){
if( buttons[b].dragging ){
buttons[b].x = mouseX;
buttons[b].y = mouseY;
if( buttons[b].getDistance() > maxdist ){
buttons[b].reset();
}
}
}
}
Ok, let’s quickly explain what’s going on here so we can move on to the ElasticButton class:
First of all, we loop through all the buttons in the array and for each one we check if they have a dragging property with the value “true”. Basically if the mouse is over the button and if “yes”, we check if the getDistance() method of the ElasticButton class is higher than the maxdist variable. If it is higher, we call a reset() function on the button. We don’t know anything yet about these functions.
Step 8: Making the ElasticButton Class
OK, finally the class we have all been waiting for, the button class. This is where all the important things happen: finding out the distance, creating the text, background and calling reset() to return the button to its location.
package {
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.events.*;
import flash.geom.ColorTransform;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
import fl.motion.Color;
public class ElasticButton extends MovieClip {
var origin:Object;
var textfield:TextField;
var tf:TextFormat;
var dragging:Boolean = false;
var bg:Sprite;
var url:String;
var twx:Tween;
var twy:Tween;
var padding:Number = 8;
var color:uint;
var msk:Sprite;
public function ElasticButton(){
//do nothing
}
}
}
Let me explain the lines:
You’ll find that apart from importing the normal classes, we also import fl.transitions.Tween and TweenEvent, easing and the fl.motion.Color classes. We need the tween classes to tween the movie back to its origin and the color class to tint the background to the color in the xml.
We have a couple of variables here:
The origin object is an object which will hold the x and y position of the button. I could have made it a flash.geom.Point object but I’m too lazy to include another class for 2 variables!
We have a textfield variable which will hold the button label textfield, the tf variable which is a TextFormat object for text styling, the known dragging propery, a bg var which will be the background movieclip, a string with the url for the button, two variables to hold the tweens, a padding variable which will make the button a bit bigger, the color object and a msk var which will be a mask for the movieclip. We need this to make the rounded corner you saw in the preview!
Step 9: init() Function
Let’s do the init function, triggered by our parent class:
public function init( node ){
textfield = new TextField();
tf = new TextFormat();
tf.size = 14;
tf.font = '_sans';
tf.bold = true;
tf.color = 0xffffff;
tf.align = TextFormatAlign.CENTER;
textfield.defaultTextFormat = tf;
textfield.text = node..name;
textfield.width = 65;
textfield.height = 20;
textfield.x = -(textfield.width / 2 );
textfield.y = -(textfield.height / 2 );
textfield.mouseEnabled = false;
addChild( textfield );
origin = new Object();
origin.x = this.x;
origin.y = this.y;
color = node..color;
createBG();
url = node..url;
dragging = false;
this.buttonMode = true;
this.addEventListener( MouseEvent.MOUSE_OVER, mouse_over );
this.addEventListener( MouseEvent.CLICK, mouse_click );
}
There is a lot already!
We create the textfield, assign it a textformat with certain properties (I won’t get into details here), set the colour to white, because the backgrounds will tend to be darker, we give it the text from the node passed as a parameter. Pretty standard.
It’s best to create a width and align the text to center so that different words will be beautifully aligned. You just have to make sure not to include a very long word, or the button will look ugly!
Next we have an interesting positioning of the textfield. We set the x to minus half the width and the y to minus half the height of the textfield, thus aligning the textfield exactly in the center. We need this in order to have a uniform calculation of maximum distance.
We set mouseEnabled to false for the textfield, to disable the mouse rolling off the button. I looked for this property for a whole day when I first started AS3 :)
The origin object is initialized next and we create x and y properties with the x and y of the current movieclip (the ElasticButton class). When the button goes beyond the maxdist, we will return the button to these origin points.
There are a couple of more things going on here: We hold the color from the xml node in the color var, we hold the url of the button in the url var amd we call a createBG() function which we are yet to code.
We set dragging to false, buttonMode for the current ElasticButton to true and create the mouse over and click handlers.
Step 10: createBG Function
This function will take care of making the background and tint it according to the color in the xml:
public function createBG(){
bg = new GradBackground();
var dbpad = padding*2;
bg.width = textfield.width+dbpad;
bg.height = textfield.height+dbpad;
bg.x = -( (textfield.width+dbpad)/2);
bg.y = -( (textfield.height+dbpad)/2);
addChild(bg);
var col = new Color(1,1,1,1);
col.setTint( color, 0.4 );
bg.transform.colorTransform = col;
setChildIndex( bg, 0 );
}
Here we make a GradBackground class, which is the movieclip we created in the fla source and give it the class name GradBackground. We set the width and height of the movieclip to the textfield width plus a variable dbpad. You’ll notice that I defined this variable for speed, so that I don’t type (padding * 2). Defining a new variable with the precomputed double padding is faster than calling this operation many times. We have to take care of the CPU too!
Why am I adding a padding variable? So that the button is bigger than the textfield. Look at this image to get a better understanding:

I am also centering the bg movieclip like I did with the textfield: I set the x to minus half the height and minus half the width of the bg movieclip.
Next I create a new Color with default attributes (rgb and alpha 1) and later use the setTint() function to make it a shade of the xml color. Because the Color class is a subclass of ColorTransform class, we can pass this colour directly to the movieclip transform.colorTransform object.
Lastly, we set the bg movieclip the depth 0, so everything will be above the background.
Step 11: Event Handlers
I’ll quickly go through the event handlers:
private function mouse_over( e:MouseEvent ){
dragging = true;
}
private function mouse_click( e:MouseEvent ){
navigateToURL( new URLRequest( url ) );
}
The event handlers are pretty simple: I set the dragging to true when the mouse hovers over the button. For the click handler I use the navigateToURL() function to go to the url requested. If you are building a flash site, this is where the action for page change would go.
Step 12: The getDistance Function
This is the most important function in the menu. Remember, we’re calling the getDistance function to see if it’s bigger than the maxdist var so we can reset the button. We’re using the algebraic equation of Pitagora to find the distance between 2 points:

public function getDistance(){
return Math.sqrt( (this.x-origin.x)*(this.x-origin.x) + (this.y-origin.y)*(this.y-origin.y) );
}
This will give us the distance between the button x and y and the origin x and y. That’s why we hold the origin variable.
Step 13: The Reset Function
This function is triggered when the distance from the origin is too high. At that point we tween the button back to its origin:
public function reset(){
dragging = false;
twx = new Tween( this, 'x', Elastic.easeOut, this.x, origin.x, 0.4, true );
twy = new Tween( this, 'y', Elastic.easeOut, this.y, origin.y, 0.4, true );
}
We set the dragging to false and create two tweens; one for the x and one for the y. We could have used another tweening library, used only one tween and passed an array to the tweening function, but the built-in Tween class from AS3 doesn’t support multiple properties, as far as I’m aware.
Step 14: Rounding the Buttons
Let me show you, as a bonus, how to make the first and last button round, like you saw in the preview. We create a new function makeStartButton() where we will build the rounded mask:
public function makeStartButton(){
msk = new Sprite();
msk.graphics.beginFill(0x000000,1);
msk.graphics.moveTo( 0, padding );
msk.graphics.curveTo( 0, 0, padding, 0 );
msk.graphics.lineTo( (padding*2)+textfield.width, 0 );
msk.graphics.lineTo( (padding*2)+textfield.width, (padding*2)+textfield.height );
msk.graphics.lineTo( 0, (padding*2)+textfield.height );
msk.graphics.lineTo( 0, padding );
msk.graphics.endFill();
msk.x = bg.x;
msk.y = bg.y;
addChild( msk );
bg.mask = msk;
}
Ok, this has to be explained:
We create a new Sprite and use the graphic’s class beginFill() to make a fill, the colour doesn’t matter. In order to understand what is going on let’s look at this image:

We construct the rounded background mask and add it to the displayList, setting it as a mask for the bg movieclip
Step 15: Rounding the Second Button
We use the same procedure, now with the curve on the right:
public function makeEndButton(){
var dbpad = padding*2;
msk = new Sprite();
msk.graphics.beginFill(0x000000,1);
msk.graphics.lineTo( textfield.width + padding, 0 );
msk.graphics.curveTo( textfield.width + dbpad, 0, textfield.width + dbpad, padding );
msk.graphics.lineTo( dbpad + textfield.width, dbpad + textfield.height );
msk.graphics.lineTo( 0, dbpad + textfield.height );
msk.graphics.lineTo( 0, padding );
msk.graphics.endFill();
msk.x = bg.x;
msk.y = bg.y;
addChild( msk );
bg.mask = msk;
}
You’ll see that it’s the same technique, we just make the curve on the right and we add the mask to the bg movieclip.
Step 16: The Final Touch
We need to modify the ElasticMenu class to call these two functions on the first and the last buttons. In the createButtons() we make the following modifications (lines 8 – 13):
public function createButtons(){
var sectw = (stage.stageWidth/(xml..button.length()+1) );
for( var i=0; i< xml..button.length(); i++){
var m = new ElasticButton();
m.x = sectw + (sectw*i);
m.y = stage.stageHeight/2;
m.init( xml..button[i] );
if( i == 0 ){
m.makeStartButton();
}
if( i == xml..button.length()-1){
m.makeEndButton();
}
addChild( m );
buttons.push( m );
}
tm.start();
}
So if the variable i is 0 (if it’s the first button) or if i is the xml..button.length() – 1 (if it’s the last) we call the respective function.
Just remember, if you encounter any error, that the functions we call from the parent class, ElasticMenu have to be public in the ElasticButton class, otherwise you will get an error that the function does not exist!
That’s it! This is the whole code for the ElasticMenu class:
package {
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.events.*;
import flash.utils.Timer;
public class ElasticMenu extends MovieClip {
var xml:XML;
var buttons:Array;
var tm:Timer;
var maxdist:Number = 50;
var line:Sprite;
public function ElasticMenu(){
var req = new URLLoader();
req.addEventListener( Event.COMPLETE, xml_loaded );
req.load( new URLRequest('menu.xml') );
buttons = new Array();
tm = new Timer( 40 );
tm.addEventListener( TimerEvent.TIMER, check_buttons );
}
private function xml_loaded( e:Event ){
xml = XML( e.target.data );
createButtons();
}
public function createButtons(){
var sectw = (stage.stageWidth/(xml..button.length()+1) );
for( var i=0; i< xml..button.length(); i++){
var m = new ElasticButton();
m.x = sectw + (sectw*i);
m.y = stage.stageHeight/2;
m.init( xml..button[i] );
if( i == 0 ){
m.makeStartButton();
}
if( i == xml..button.length()-1){
m.makeEndButton();
}
addChild( m );
buttons.push( m );
}
tm.start();
}
private function check_buttons( e:TimerEvent ){
for( var b in buttons ){
if( buttons[b].dragging ){
buttons[b].x = mouseX;
buttons[b].y = mouseY;
if( buttons[b].getDistance() > maxdist ){
buttons[b].reset();
}
}
}
}
}
}
And for the ElasticButton class:
package {
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.events.*;
import flash.geom.ColorTransform;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
import fl.motion.Color;
public class ElasticButton extends MovieClip {
var origin:Object;
var textfield:TextField;
var tf:TextFormat;
var dragging:Boolean = false;
var bg:Sprite;
var url:String;
var twx:Tween;
var twy:Tween;
var padding:Number = 8;
var color:uint;
var msk:Sprite;
public function ElasticButton(){
//do nothing
}
public function init( node ){
textfield = new TextField();
tf = new TextFormat();
tf.size = 14;
tf.font = '_sans';
tf.bold = true;
tf.color = 0xffffff;
tf.align = TextFormatAlign.CENTER;
textfield.defaultTextFormat = tf;
textfield.text = node..name;
textfield.width = 65;
textfield.height = 20;
textfield.x = -(textfield.width / 2 );
textfield.y = -(textfield.height / 2 );
textfield.mouseEnabled = false;
addChild( textfield );
origin = new Object();
origin.x = this.x;
origin.y = this.y;
color = node..color;
createBG();
url = node..url;
dragging = false;
this.buttonMode = true;
this.addEventListener( MouseEvent.MOUSE_OVER, mouse_over );
this.addEventListener( MouseEvent.CLICK, mouse_click );
}
public function createBG(){
bg = new GradBackground();
var dbpad = padding*2;
bg.width = textfield.width+dbpad;
bg.height = textfield.height+dbpad;
bg.x = -( (textfield.width+dbpad)/2);
bg.y = -( (textfield.height+dbpad)/2);
addChild(bg);
var col = new Color(1,1,1,1);
col.setTint( color, 0.4 );
bg.transform.colorTransform = col;
setChildIndex( bg, 0 );
}
public function getDistance(){
return Math.sqrt( (this.x-origin.x)*(this.x-origin.x) + (this.y-origin.y)*(this.y-origin.y) );
}
public function reset(){
dragging = false;
twx = new Tween( this, 'x', Elastic.easeOut, this.x, origin.x, 0.4, true );
twy = new Tween( this, 'y', Elastic.easeOut, this.y, origin.y, 0.4, true );
}
private function mouse_over( e:MouseEvent ){
dragging = true;
}
private function mouse_click( e:MouseEvent ){
navigateToURL( new URLRequest( this.url ) );
}
public function makeStartButton(){
msk = new Sprite();
msk.graphics.beginFill(0x000000,1);
msk.graphics.moveTo( 0, padding );
msk.graphics.curveTo( 0, 0, padding, 0 );
msk.graphics.lineTo( (padding*2)+textfield.width, 0 );
msk.graphics.lineTo( (padding*2)+textfield.width, (padding*2)+textfield.height );
msk.graphics.lineTo( 0, (padding*2)+textfield.height );
msk.graphics.lineTo( 0, padding );
msk.graphics.endFill();
msk.x = bg.x;
msk.y = bg.y;
addChild( msk );
bg.mask = msk;
}
public function makeEndButton(){
var dbpad = padding*2;
msk = new Sprite();
msk.graphics.beginFill(0x000000,1);
msk.graphics.lineTo( textfield.width + padding, 0 );
msk.graphics.curveTo( textfield.width + dbpad, 0, textfield.width + dbpad, padding );
msk.graphics.lineTo( dbpad + textfield.width, dbpad + textfield.height );
msk.graphics.lineTo( 0, dbpad + textfield.height );
msk.graphics.lineTo( 0, padding );
msk.graphics.endFill();
msk.x = bg.x;
msk.y = bg.y;
addChild( msk );
bg.mask = msk;
}
}
}
Conclusion
Now, that was a pretty long tutorial! I hope I didn’t bore anybody. If you have any ideas about how we could improve the menu, add them to the comments.
Thank you for reading!

hi
thats very nice only got a question can u do this in z space?
and a little less var from its center point?
srry for bad english
grz ray
How is this at all usable? It looks like it breaks as soon as you attempt to use it. Navigations built in Flash is probably the worst idea I’ve ever heard as, for one, you’re throwing accessibility right out of the window without any care at all.
Absolutely shocking that this would make it past approval and get published.
Agree
Yeah, I agree too. There are at least some good concepts that you can take from this one.
Agreed. This is a usability mess.
I agree with the usable part. But don’t bash on someone so hard. If you don’t like it, don’t use it! Some people might be inspired by this to build something cool that will be usable using these same concepts. Try helping people instead of bringing them down. At least they are trying.
Sorry but i disagree, this kind of work is to use with a 100% flash site, not a simple menu for a html site, also if you really care about your precious accessibility you can put a hidden menubar in html in your site with the same links… the point of this tutorial is to show how to create a magnetic elastic menu, the rest are just example.
Today, the flash technology are getting about 98% (see adobe.com) of the internet users, also the search engines are even getting better the flash contents to index it, also if you know how to use some DeepLink in flash you can improve the accessibility of your site… so flash is becoming a very accessible technology
Really nice, thanks a lot
Sorry, but this is a terrible looking menu and feels horrible to use IMHO
Granted the management by XML is good info, but the UX is something that would of been done in the boom of DHTML
Hi Great post!
One question: Why did you use as a base class MovieClip?
If you do not use the Timeline, you might want to use the Sprite class to extend.
It’s lighter.
Att.
You’re right, I could use the Sprite class, I was lazy :)
I love how it says
Let’s take a quick look at what we’re working towards:
and you think, why in the world would I want to work towards something like that, hehe
Can I see the live demo? Looks cool in the pictures.
Demo is in the window below src files.
This is a well written tutorial, however the result looks terrible, sorry to say.
Just keep up the writing skills, and I hope to see a nicer looking end-result in your next tutorial ;-)
I agree the result is hardly usable ^^ But the differents techniques used in this tutorial are really great.
Thanks !!
R.
(remember i’m french and my langage maybe need a translation from froggy land :D )
I’m sorry, why would anyone want to do this elastic effect ?
This is not “super modern”, this is super bad unergonomic menu.
Hate to be a broken record but, this is an awful menu.
I think the idea is original, the as3 is good, but forget about putting that on a live website, please!!!
good techniques but as Kaelig said its unergonomic ..
It´s not really bealtiful, but i liked the technique, using the code with some better design, and maybe improving the code, you can get very nice results, a good example would be a photo gallery using this… anyone thought about it before telling “it´s ugly”??
Thanks again Sebastian!
I think this link shows an example of using something very much like what you said: http://theflashblog.com/?p=413
The code is cleaner.
Perhaps using a different type of tween the effect can be more fun or cool.
Not really beautiful and pretty buggy. I would never use that kind of menu.
In the preview swf all the buttons are jammed together in the top left corner and it’s basically unusable… FF 3.5.5 Mac FP 10.0.32.18
Kind of a weird nav I could see this technique being used for something else though pretty good tutorial!
I’m not sure how ‘Super Modern’ the twitching is, but it’s pretty cool. Nice Tut!
Thank you for those who defended me. It’s true, the menu isn’t that beautiful, but it was never intended to be ‘production’. It’s only supposed to show you HOW to build such a thing. Of course you may not build this inside html, but as André pointed out, it could be used in a fullflash website.
I really am not interested in showing off, you I wanted to blow people off, I would have built something with Papervision like a spiral menu ( anywone want that ? ), so thank you but I beleve the techniques shown here are very important. ( Oop access modifiers, xml processing, rounded masking )
I am not interested in giving people free production stuff, there are a lot of websites outhere, I want people to learn to extend it themselves.
Well, at least this tut has generated a bit of discussion! The menu may not be to anyone’s taste, but it remains a well written tutorial. Clearly explained and technically beneficial to those who read it.
There are definitely valuable lessons to take away from this one.
Thanks for the comments folks, and Bratu, let’s have a look at your PV3D menu then :)
Sorry for my grammar mistakes, I am at an internet cafe :)
Here’s another example of this technique http://theflashblog.com/?p=413
Seriously???? I mean sure, if you want to learn AS this may be “fun” but come on?
“Super Modern”? If I saw this on a website I’d want to throw a ninja star at the screen and track down the dev that built it.
Thanks for the tutorial. It help me in my AS3 learning.
thank
awful. you give flash a bad name
did you hack active to put your tut on here. lolz
Yeah, I hacked active tuts for you guys !
Actually in that preview swf there is a so ( Shared Object ) that secretly stores a piece of code, so that when you run flash on every page, it invokes a secret magic keyword that takes away 1 volt from any computer in the world and deposits it in my secret Actionscript laboratory, thus powering my Christmas lights. How’s that sounds ?
Anyway thank you for the comments…
yerr give us the tutorial for that ! i didn’t knew that as3 could make this !
…
Nice tutorial Sebastian, thank you.
This is cool keep up the good work , Personaly I think that every designer has the right to express him / her self with the projects they createing.
I could not disagree more with all the negative comments being thrown your way! I loved your tutorial!
Maybe that is because I took it in the spirit it was given …i.e. to teach and inspire.
I personally learned a lot from this tutorial which is why I take tutorials…i.e. to be tutored. If I already knew and understood these techniques I would not have bothered reading it and would have simply passed it by.
I would suggest to all the other negative commentators out there to do the same…and if you happen to know it all…it begs the question…why are you on a tutorial site at all?
As for the creative design aspects of the menu looking so rudimentary, I believe they are inconsequential, as that’s what we designers are for…i.e to design.
Otherwise, if we solely rely on other designers creativity to do it all for us, we are not designers but copycats.
horrible menu! buggy stuff…
Create a Super ANNOYING! Elastic Menu in AS3
<>
Love what you have to say. Check out my site http://www.home2000.com. I have a Navigaition that is on the left side of site that is Java. I want it to be flash.
1. My problem is it’s slow
2. Can’t use bold or color.
Note. I have a lower TV Display that I like.
I’m looking for someone that likes a challenge and I can afford.
How can you make it a “_self” target with these
How would I put frame numbers into the buttons instead of using urls? I get that you put it in the XML but how do implement that in the actionscript?
Any help with this would be appretiated
Thanks
I don’t know what you are trying to achieve, but to navigate you can simply do:
gotoAndPlay( frame number ); instead of navigateToURL in the mouse_click function. But you need to target the main movieclip. I hope it helps, if not, send me the source and I could try to help you, in my spare time, if it’s a 1 minute fix.
Please need help to open window in self page
A few years ago I’d have to pay someone for this inrfomtiaon.
I just need make this page open in self window
http://www.emergenciavip.com.br
anyone can help me =(
looks complicated but just what i am looking for:) cheers
Wow…so many negative comments! To each his/her own–we’re all given the right to share our opinions, but, geez, let’s lighten up on the author! Regardless of the design/effect, the approach used is valid and I’m going to bookmark this!
Thanks Sebastian for providing this tutorial!
good one !! thanks..!!!
hi there..,
it’s a great idea yet if i could poorly written tuts..,
i mean you just use whatever name you like for the variable wether then the self explainatory name for variable..,
definetly not using good code practices..,
but as i say it is a grat idea especialy for the button graphic/modern button and the spring effect..,
yet i just apologize me for my limited AS knowledge but what does “..” double dot mean in your example??
and also what does really b reffer to in :
if ( buttons[b].dragging )
{
buttons[b].x = mouseX;
buttons[b].y = mouseY;
if ( buttons[b].getDistance() > maxdistance )
{
buttons[b].reset();
}
}
??
thank you and keep up the good and fresh idea..,