oddsocks
06-27-2004, 08:18 AM
I have come across a really weird problem so I am hoping someone can explain. I have a movieclip on stage called symbol_mc. When it loads I want to check its width. If I was doing things the Flash 5 way I would use onClipEvent(load){trace(this._width)}
I am now trying to assign this code from the main timeline instead.
symbol_mc.onLoad = function() {
trace("The movie clip is loaded");
}
symbol_mc.onEnterFrame = function(){
trace("hi");
}
The onEnterFrame works fine, but the onLoad does not work UNLESS I put some code on the clip. Even putting a comment on the clip will make it work!!! I read about this here http://www.actionscript.org/forums/showthread.php3?t=13830&page=1&pp=15&highlight=onLoad
This seems like a stupid fix. Is there a better workaround?
I am now trying to assign this code from the main timeline instead.
symbol_mc.onLoad = function() {
trace("The movie clip is loaded");
}
symbol_mc.onEnterFrame = function(){
trace("hi");
}
The onEnterFrame works fine, but the onLoad does not work UNLESS I put some code on the clip. Even putting a comment on the clip will make it work!!! I read about this here http://www.actionscript.org/forums/showthread.php3?t=13830&page=1&pp=15&highlight=onLoad
This seems like a stupid fix. Is there a better workaround?