I’m trying to make some expanding boxes using actionscript. I have it working great for a single box, but as soon as I get two boxes on the screen, whether or not they are from the same library item, they begin to get a bit funky.
I uploaded the files to: http://www.before-reality.net/ul/expander/
By going to http://www.before-reality.net/ul/expander/tst.swf and letting one of the bars expand for a bit (by hovering over it) then going to another of the bars and hovering over that one, you will notice that it will “jump” to the size of the other bar, and then continue on it’s merry way properly.
I need to figure out what is causing that jump. My actionscript is below:
//Function, located in frame 1 of movie
function expand(instance)
{
setProperty(instance, _width, _width + 1);
}
//leftSide3's as
on (rollOver)
{
btn3Int = setInterval(_root.expand, 1, "_root.leftSide3");
}
on (rollOut)
{
clearInterval(btn3Int);
}
//lefSide4's as
on (rollOver)
{
btn4Int = setInterval(_root.expand, 10, "_root.leftSide4");
}
on (rollOut)
{
clearInterval(btn4Int);
}
Any help would be geatly appreciated! Thanks.
PS Using Flash 8, not sure if that changes anything.