PDA

View Full Version : An object inside and object inside...won't work


Kixxe
10-20-2005, 08:00 PM
Well, im making a picture slideshow, whitch works kinda like this.
First, we have a object called "Pictures", that contains "Picture_collection" witch is tweend acros the screen. When you hold over the "Picture_collection" the tween-motion stops, and it resumes when you stop holding the mouse over it.
on (rollOver){
_this.play();
}
on (rollOut){
_this.stop();
}
Well, this part WORKS.
Anyway, inside the picture collection, there are 2 more objects. Ignoring the RIGHT one, the LEFT one("Picture_1") contains yet another object(That has no name, but it would contain the acual picture otherwise), that can be tweened acroos the screen on command.
"on the "Picture_1" object"
on (rollOver){
_this.play();
}
on (rollOut){
_this.stop();
}

Now, this script dosen't work. This script controlls the animation inside "Picture_1".

I tried using _root before, but that did'nt work, and a freind tipped of a .this... and it worked on the normal, but not the sqware.

Here is the source if it became messy...

http://www.filespace.org.nyud.net:8090/Kixxe/Will_not_work.zip

sophistikat
10-24-2005, 06:32 PM
your link is taking forever to connect too, just post the zip onto this thread
look for 'Attach Files' inside 'Additional Options'

Kixxe
10-24-2005, 09:48 PM
Heh, handy.

sophistikat
10-24-2005, 10:54 PM
okay Kixxe i'm sorry but i'm having a hard time following your problem so tell me if i got this right:

- when the movie starts, the two squares start animating
- when you rollover any of them, both squares stop
- once they've stopped, the square you're one animates to a bigger square

is that correct??

Kixxe
10-25-2005, 05:35 PM
Correct. When your mouse is on one of em, it should become bigger, but right now it just becomes bigger or smaller and i can't stop it.

sophistikat
10-25-2005, 05:50 PM
you don't have a stop action in your movieclip and you don't stop them using actionscript on the root, i'll open up your file add these stops()s and i'll post your file.

sophistikat
10-25-2005, 11:04 PM
basically i removed all the onClipEvents you had, there were too many.
all you need for your site is this onClipEvent on your picture movieclipon (rollOver){
// stop main animation at its currentframe frame
_parent._parent.gotoAndStop(_parent._parent._curre ntframe);
// play this movieclip's animation
this.gotoAndPlay(2);
}
on (rollOut){
// continue playing the main animation from its last point
_parent._parent.gotoAndPlay(_parent._parent._curre ntframe);
// go back to its normal state
this.gotoAndStop(1);
}

ps:
the first _parent. gets out from your current movieclip and the second _parent. goes out to the main movieclip

good luck on your project