Hello guys, my first post here
Here i am helping out a friend with a website. I’m Designing a website completely made of flash (customer request ). There is a part at the bottom of the screen thats like a tab. I want to move the whole tab (and a wider box attached to it too) a little up everytime the mouse rolls over it.
Looking at various tutorials I’ve found one that seems to suit me. It basicly moves the movie clip (the whole thing at the bottom the tab + the bottom box is converted to a movie clip for this) in incriments. It needs a yTarget{instancedname} variable. For example if i give the movie clip an instance name of MC the variable would be yTargetMC and the number i associte it with is where the movie clip moves to.
So i can make a button that has :
on (rollOver) {
yTargetMC = 50;
}
on (rollOut) {
yTargetMC = 100;
}
It works as long as the movie clip and button are on the same “stage”. I want the movie clip to move up on mouse over so i palce the button inside the movie clip but when i do this the yTargetMC is useless coz it wont change the variable in the main stage (i’m assuming this)thus wont work. Is there a way that i can make the button inside the movie clip assign the variable change to the main scene? Maybe a script code that makes the button work like it was NOT inside the movie?
I’m kinda lost here and i hope i managed to explain this properly. Any help would be welcome - i’m ok with rebuilding this too if there is a more easier and logical way too. As i said i’m learning and helping at the same time so hence i’m a newbie yet again
Thanks in advance,
Osman
Edit : here’s the code for the movie itself (that is moved)
onClipEvent (enterFrame) {
yMC = getProperty(_root.MC, _y);
moveMC = _root.yTargetMC - yMC;
setProperty(_root.MC, _y, yMC + (moveMC/10));
}