-
[CS3] movieclip plays slower when imported with loadClip [AS2]
I have a site, which I load into placeholder .swf, so that the loading bar is more accurate.
however, when I do this, my menu suddenly seems to go really slow.
http://toddish.co.uk/beta - click on the monitor, and move over the thumbnails. notice how it scrolls slowly?
http://toddish.co.uk/beta/index.swf - do the same here, notice how it is quicker?
I've no idea why it does this. both frame rates are fine, and I'm loading it into root, so nothing should change.
the code for the menu is here:
Code:
function thumbScroll(){
_root.onEnterFrame = function(){
//Checks if the mouse is in the correct positon
if ((_root.mc_workL._xmouse >= _root.mc_workL.mc_mask._x) &&
(_root.mc_workL._xmouse <= _root.mc_workL.mc_mask._x + _root.mc_workL.mc_mask._width) &&
(_root.mc_workL._ymouse >= _root.mc_workL.mc_mask._y) &&
(_root.mc_workL._ymouse <= _root.mc_workL.mc_mask._y + _root.mc_workL.mc_mask._height)){
//tween pointer to move
var pointerTween:Tween = new Tween(_root.mc_workL.mc_pointer, "_y", Strong.easeOut, _root.mc_workL.mc_pointer._y, _root.mc_workL.mc_mask._ymouse+_root.mc_workL.mc_mask._y, 0.5, true);
//get % rolled over
var percent:Number = Math.floor((_root.mc_workL.mc_mask._ymouse / _root.mc_workL.mc_mask._height) * 100);
//convert percentage to actual number
var goto:Number = -(((_root.mc_workL.mc_thumbnail._height - _root.mc_workL.mc_mask._height) / 100) * percent);
//tween menu
var scrollerTween:Tween = new Tween(_root.mc_workL.mc_thumbnail, "_y", Strong.easeOut, _root.mc_workL.mc_thumbnail._y, goto+_root.mc_workL.mc_mask._y, 0.5, true);
}else{
delete _root.onEnterFrame;
}
}
}
the function is called onRollOver of the thumbnail image. I wrote it ages ago, so it probably could be optimised, and put in a better onEnterFrame. I could even scrap the loading into a placeholder swf for the loading bar, as I load it into root level, and lose the mask I had planned. Descisions. It also does this by the way if I create and empty movieclip to place the on enterframe into, not sure how that might be connected though.
I'm still curious as to why it messes up though, anyone have any idea?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|