levTextSpace from [URL=“http://www.levitated.net”]www.levitated.net It´s one of my favourite Flash animations, I’ve been having a look at it and I wonder how to make those buttons usefull. The debug code is huge and when I find the instance name for each button, I realize that those are only variables. Has anybody a clue??
take a look, may be you did it, inside the SpaceWord MC, in the SpaceWord function - onPress put this:
trace(this._parent._name)
This way you will know the name of the item you are pressing. Names go form “word” to “word(number of items on the array)” ok?
If you want to make diferent links (getURLS) to the items, you could do this in the _root of the movie:
Look now inside the “for”:
nombre = "word"+String(depth++);
You realise this is the way the items are named (nombre in spanish is name)
So, if you want the “word” link to “http://www.kirupa.com”??? and so on with the others items…
Add a variable in the root (outside the for!!) like this:
word_link = "http://www.kirupa.com"
And add inside the SpaceWord MC this in the "this.btnSquare.onPress = function()"
trace(_root[this._parent._name+"_link"]);
getURL(_root[this._parent._name+"_link"], _blank);
The link is defined in the “_root”, “this._parent._name” is the name of the item pressed, and “_link” is the rest of the name of the variable definde in the _root as i said first.
Add as many links or what you want depending the numbers of the intems in the array:
word1.link = "http://www.kirupa.com"
word2.link = "http://www.kirupa.com"
word2.link = "http://www.kirupa.com"
.
.
.
.
Good luck