Solved

Advance RollOver question

Posted on 2007-04-03
6
202 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

777 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