Solved

Advance RollOver question

Posted on 2007-04-03
6
212 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
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!

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
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 how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

730 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