Guest User

Untitled

a guest
May 24th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. var textBox = this.attachMovie("textbox", "textbox", 100, {_x:Stage.width/2, _y:Stage.height/2 -118});
  2.  
  3. var home:MovieClip = this;
  4. var xml:XML = new XML();
  5. xml.ignoreWhite = true;
  6. xml.onLoad = function(){
  7. var nodes = this.firstChild.childNodes;
  8. var margin = (900 - (BUTTON.width * nodes.length)) / (nodes.length - 1);
  9.  
  10. for(var i = 0;i < nodes.length; i++){
  11. var button = home.attachMovie("item","item"+i,i);
  12.  
  13. button.icon.loadMovie(nodes[i].attributes.image);
  14.  
  15. button._x = (BUTTON.width/2) + i * (BUTTON.width + margin) +48;
  16. button._y = (Stage.height / 2) + 60;
  17. button._alpha = 35;
  18. button.onRollOver = function(){
  19. this.tween1 = new Tween(this, "_xscale", Strong.easeOut, 100, 120, 0.5, true);
  20. this.tween2 = new Tween(this, "_yscale", Strong.easeOut, 100, 120, 0.5, true);
  21. this.tween3 = new Tween(this, "_alpha", Strong.easeOut, 35, 100, 0.5, true);
  22. textBox.text = nodes[i].attributes.text;
  23.  
  24. };
Add Comment
Please, Sign In to add comment