PDA

View Full Version : Functions going nuts, or, playhead breaks.


sinewave
02-01-2006, 08:10 PM
So,

I have this movie clip ( just a white box). On this movie clip are some scripts for easing: _xscale, _yscale, _x, _y, and _alpha.

I have a menu with buttons that tell the movie to gotoAndStop at certain keyframes where the actions layer sends variables to the white box so that it's size can change.

This works smoothly and looks good.

However...
Where the problems starts:

This white box is where I'd like my content to load. My idea of doing this was to put on the keyframes an if statement that would wait until the box has reached the correct size and load it's content something like this:
// content load //
loader = setInterval(capabilities, 10);
function capabilities() {
if (wBox._yscale>=475 && wBox._yscale<=477) {
gotoAndStop(11);
clearInterval(loader);
}
}

Frame 11 of course has a layer with a text box with sample content. If I start spamming menu buttons as if I were a typical impatient user, the playhead gets stuck on frame 11 (at least that's what bandwidth profiler tells me), and the text box stays there, even though the variables from other key frames are modifying the white box size and position. Why is this happening?

sinewave
02-01-2006, 08:59 PM
After a few searches I found this thread:
http://www.forumweaver.com/thread313803.html

This sounds alot like the problem I'm having. I made an invisible button that lives on the frame before the content is loaded. It's not a fix per se, but it prevents the user from spamming the menu buttons and breaking it.

I'm still very interested in knowing what the cause of this problem is, since the post I linked didn't have a real solution, it was more of a cheap hack.