Tech Support > Computers & Technology > Graphics & Designing > flash/ javascript problem - missing frames from end of movie
flash/ javascript problem - missing frames from end of movie
Posted by purpleKateHooper@googlemail.com on February 20th, 2008


Hi,
I'm new to flash. I've got a flash movie that I'm editing, which views
photos 18 in total, the user presses '>>' '<<' arrows to move through
the sequence of photos.

Originally there were 16 photos, and I've added 2 more. I copied and
pasted 2 more frames and added the 2 new photos path. Now when I run
the movie only 16 are displayed, it seems to have knocked off the last
2 frames. This is the action script I've used/edited:

stop();
loadMovie("photos/bread.jpg", photoholderMC);

interval_photoloadcheck = setInterval(photoloadcheck, 30);
function photoloadcheck() {
Vpercent=Math.round((photoholderMC._root.getBytesL oaded
)/photoholderMC._root.getBytesTotal())*100)
if (Vpercent>=100) {
clearInterval(interval_photoloadcheck)
_parent.photoloader._xscale = 100
} else {
_parent.photoloader._xscale = Vpercent;
}
}

I think I must be going mad trying to find out why 2 frames are
missing. The javascript is the same for all 18 frames, obviously the
only differnce in them all is the photo filename.
Am I looking in the wrong place? could they be anywhere that sets how
many frames are displayed?

I would be very greatful to anyone who can shed any light on this
problem.

Kate

Posted by SpaceGirl on February 28th, 2008


On Feb 20, 2:28 pm, purpleKateHoo...@googlemail.com wrote:
Did you fix this Kate?

Flash doesn't use JavaScript BTW, it's a language called ActionScript.

setInterval isn't guaranteed - depending how fast the computer is the
movie is running on it may not fire. I really don't know AS2 (the
language you're coding in), but I'd suggest using AS3 in Flash 9. It's
*much* easier to do these preloaders.


Similar Posts