Hello,
I have problem that I just can't figure out and was for some help or guidance.
So this is what I'm trying to do: I have 2 blocks on stage (will have more later) and when I mouse over one I want it to grow and the other to shrink. But here's my problem; How do I get all the movieclips on stage instance names, pass the one that was rolled over to the function, and make the rollover function in the root instead of being on each button to get the current MC it's over and it's instance name (if possible)?
right now this is what I have:
on(
grow = 0.09;
function myFucntion(Oro:MovieClip) {
onEnterFrame = function(){
trace(Oro);
blueblock._width += blueblock._width * grow;
blueblock._height += blueblock._height * grow;
greenblock._width -= greenblock._width * grow;
greenblock._height -= greenblock._height * grow;
}
}
function stopEnterFrame(){
delete this.onEnterFrame;
}
- on(
- grow = 0.09;
- function myFucntion(Oro:MovieClip) {
-
- onEnterFrame = function(){
- trace(Oro);
- blueblock._width += blueblock._width * grow;
- blueblock._height += blueblock._height * grow;
-
- greenblock._width -= greenblock._width * grow;
- greenblock._height -= greenblock._height * grow;
- }
- }
- function stopEnterFrame(){
- delete this.onEnterFrame;
- }
On the MC I have:
on(rollOver){
_root.myFucntion(_name);
}
on(rollOut){
_root.stopEnterFrame();
}
- on(rollOver){
- _root.myFucntion(_name);
- }
- on(rollOut){
- _root.stopEnterFrame();
- }
Another little problem is that I pass the instance name on rollover to the root function and it works in a trace but when I try to use the passed value to manipulate size it doesn't work.
Any help would be much appreciated.