|  | Simple stop script refuses to work - sometimes.. |  | |
| | | Inspectorjimb |  |
| Posted: Thu Jul 10, 2008 5:21 pm Post subject: Simple stop script refuses to work - sometimes.. |  |
| |  | |
So I have a couple of flash banners that I'm making, they are different sizes of the exact same thing. I used this script to stop all the animation inside a movie clip called main_ufo on the main timeline: _root.main_ufo.stop(); _root.main_ufo.door.gotoAndStop(89); _root.main_ufo.outterlights.stop(); _root.main_ufo.lights.stop();
This works on one of the sizes, but will not work on another size. I checked and double checked the publish settings (both are set to player 6, actionscript 2.0), made sure all the movie clips were named correctly and present at the time of the script, and I went into every single movie clip to make sure there were no conflicting scripts inside them. Still nothing. I even copied the ufo clip directly from the working banner and pasted it into the non-working banner and replaced it in the library. I tried changing all the _root.'s to this. I've run out of ideas. It works on my 120x600 banner and doesn't on the 728x90. If I had hair I would officially be pulling it out. Open to any ideas/suggestions at all. |
| |
| | | kglad |  |
| Posted: Thu Jul 10, 2008 5:42 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
below your stop code, what's the following show:
for(obj in _root.main_ufo){ trace(_root.main_ufo[obj]); } |
| |
| | | Inspectorjimb |  |
| Posted: Thu Jul 10, 2008 5:48 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
On the one banner where it's working it traces: _level0.main_ufo.lights _level0.main_ufo.door _level0.main_ufo.outterlights
On the other banners it doesn't respond. |
| |
| | | kglad |  |
| Posted: Thu Jul 10, 2008 5:54 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
| any banner swf where you fail to see trace output has no movieclip named main_ufo and its _root timeline. you can expect those banner swf's to not respond to your stop() methods. |
| |
| | | Inspectorjimb |  |
| Posted: Thu Jul 10, 2008 6:02 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
LINK
Soo....... Are we talking a bug here then? Please note this is working in the other banner. This screenshot is taken from the exact frame that the actions are on. |
| |
| | | kglad |  |
| Posted: Thu Jul 10, 2008 6:28 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
the chances of this being a user error are overwhelming.
place a trace("HI") below that for-loop with trace statements to ensure your frame is being played and check that you're not doing something screwy with main_ufo (like tweening it and messing up its instance name). |
| |
| | | Inspectorjimb |  |
| Posted: Thu Jul 10, 2008 7:08 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
Yeah, I agree. So I traced hi after the loop and it came up in the output window on the file that isn't registering a main_ufo clip. So it is getting to that frame with the script. I made sure the movieclip didn't have a tween on it on that frame. I've tried it with no keyframe for the movieclip on that frame (the one with the script) and with an added keyframe there (both times double checking to make sure the instance is named main_ufo) and neither worked. I listed the objects in the debug window and it's showing up as _level0.instance31. |
| |
| | | kglad |  |
| Posted: Thu Jul 10, 2008 7:50 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
if main_ufo was your movieclip's instance name it wouldn't be listed as _level0.instance31.
post a link to your fla and specify the frame that contains main_ufo, if it's not obvious. |
| |
| | | Inspectorjimb |  |
| Posted: Thu Jul 10, 2008 8:13 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
LINK
It's frame 265 that the script is supposed to stop everything. There's a button that goes to 266 on rollover and back to 265 on rollout. So the animation can start back up on rollover and then stop again on rollout. Thanks |
| |
| | | kglad |  |
| Posted: Thu Jul 10, 2008 9:04 pm Post subject: Re: Simple stop script refuses to work - sometimes.. |  |
here's your corrected file: LINK
you were using the same instance name main_ufo on frame 190 at the end of a tween. |
| |
| Page 1 of 2 .:. Goto page 1, 2 Next | |
|
|