Solved

Advance RollOver question

Posted on 2007-04-03
6
179 Views
Last Modified: 2012-05-05
Hi, experts

I have a script that works and i try to make each images button becomes large after roll over. Roll over part of code is not working. Please let me know how to fix it.

Thanks

Example http://www.brianlinstudio.com/testingExample.zip

------------- Roll over part code ----------------

///////////////////\\\\\\\\\\\\\\\\\\/////////////\\\\\\\\\\\\\\
function buttonOver() {
      _loc1 = this._parent._parent;
      trace("which one is roll over now --  "+this._parent);
      this._parent.gotoAndStop(6);
      _loc1.myName = _loc1.projects[i];
      //_loc1["button"+i].gotoAndStop(1);
      mc = _loc1["myTarget"+this._parent.i];
      mc._xscale = mc._yscale=120;
      prev_width = this._parent._width;
      this._parent._xscale = this._parent._yscale=120;
      after_width = this._parent._width;
      this._parent.buffer = (after_width-prev_width)/2;
      this._parent._x -= this._parent.buffer;
      this._parent._y -= this._parent.buffer;
      mc._x -= this._parent.buffer;
      mc._y -= this._parent.buffer;
      mc.swapDepths(120);
      this._parent.swapDepths(121);
}
///////////////////\\\\\\\\\\\\\\\\\\/////////////\\\\\\\\\\\\\\
0
Comment
Question by:mingchih
  • 3
  • 3
6 Comments
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 500 total points
ID: 18856155
You need to do this changes to make button rollover work:
-------------
remove following code completely from button movieclip first frame:
----------
//remove it completely
btn.onRollOut = _parent.buttonOut;  //remove it
btn.onRollOver = _parent.buttonOver;  // remove it
btn.onRelease = _parent.buttonClick; //remove it
--------------

add following code just below this line:
----------
mc = ScrollMovie.attachMovie("button", "button"+i, 50+i);
//add following code here:
mc.btn.onRollOut = buttonOut;
mc.btn.onRollOver = buttonOver;
mc.btn.onRelease = buttonClick;
//---------------------

- Aneesh Chopra


0
 
LVL 34

Assisted Solution

by:Aneesh Chopra
Aneesh Chopra earned 500 total points
ID: 18856198
Uploaded the fixed version here for ur reference:
http://www.4shared.com/file/13517357/bd97c773/netblue.html

zip contains only updated FLA, because changes are in FLA only..
replace ur FLA with this FLA and compile it to see the results

- Aneesh Chopra
0
 

Author Comment

by:mingchih
ID: 18856223
Thank you, Annesh
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18856290
welcome,

Plz spell my name correctly,
it is 'Aneesh' not 'Annesh'  

:)

0
 

Author Comment

by:mingchih
ID: 18856311
Opoos, sorry, by the way, I got one last small question on the function buttonClick()...

Thanks, Aneesh
0
 

Author Comment

by:mingchih
ID: 18856376
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now