Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Advance RollOver question

Posted on 2007-04-03
6
Medium Priority
?
226 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:Brian Lin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 2000 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 2000 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:Brian Lin
ID: 18856223
Thank you, Annesh
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18856290
welcome,

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

:)

0
 

Author Comment

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

Thanks, Aneesh
0
 

Author Comment

by:Brian Lin
ID: 18856376
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

618 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