Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var textBox = this.attachMovie("textbox", "textbox", 100, {_x:Stage.width/2, _y:Stage.height/2 -118});
- var home:MovieClip = this;
- var xml:XML = new XML();
- xml.ignoreWhite = true;
- xml.onLoad = function(){
- var nodes = this.firstChild.childNodes;
- var margin = (900 - (BUTTON.width * nodes.length)) / (nodes.length - 1);
- for(var i = 0;i < nodes.length; i++){
- var button = home.attachMovie("item","item"+i,i);
- button.icon.loadMovie(nodes[i].attributes.image);
- button._x = (BUTTON.width/2) + i * (BUTTON.width + margin) +48;
- button._y = (Stage.height / 2) + 60;
- button._alpha = 35;
- button.onRollOver = function(){
- this.tween1 = new Tween(this, "_xscale", Strong.easeOut, 100, 120, 0.5, true);
- this.tween2 = new Tween(this, "_yscale", Strong.easeOut, 100, 120, 0.5, true);
- this.tween3 = new Tween(this, "_alpha", Strong.easeOut, 35, 100, 0.5, true);
- textBox.text = nodes[i].attributes.text;
- };
Add Comment
Please, Sign In to add comment