A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [F8] Need Help from Actionscript Superhero!!!

  1. #1
    Senior Member caroach's Avatar
    Join Date
    Nov 2002
    Chicago, IL

    [F8] Need Help from Actionscript Superhero!!!

    I have a script that I am using to attach menu buttons to a menu. As you can see it is a simple "for" statement. And an array for the button text.

    The issue: I have the buttons scaling on rollOver and rollOut (5 total). I want the other four button to scale down when one button scales up. How can I (if possible) add the script to my script?
    var MenuBtns:Array = new Array();
    MenuBtns[0] = "text 01";
    MenuBtns[1] = "text 02";
    MenuBtns[2] = "text 03";
    MenuBtns[3] = "text 04";
    MenuBtns[4] = "text 05";
    for (var i:Number = 0; i<MenuBtns.length; i++) {
    	newY = 45+(28*i);
    	this.attachMovie("MC_MenuButton","Menu"+i+"_mc",i,{_x:40, _y:newY});
    	this["Menu"+i+"_mc"].onRollOver = function() {
    		this._xscale = 110;
    		this._yscale = 110;
    		this.onRollOut = function() {
    			this._xscale = 100;
    			this._yscale = 100;
    			this._x = 40;
    Please help if you have any ideas or suggestions!
    Thank you!!

  2. #2
    http://pat.theorigin.net cresquin's Avatar
    Join Date
    Jun 2003
    Los Angeles, CA
    you'll need to scale ALL your buttons down to whatever you want them to scale down to, then scale the active one back up. kind of like a reset switch.

  3. #3
    Senior Member caroach's Avatar
    Join Date
    Nov 2002
    Chicago, IL
    thanks for the reply cresquin. I figured that would be the deal, but using the "for" statement, how can I apply an action to each MC in the array?

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center