Groups | Blog | Home
all groups > flash actionscript > february 2005 >

flash actionscript : Local Wierdness


designdog
2/21/2005 10:30:27 PM
Make a new Flash document. Draw a red ball. Convert it to a movie symbol called
'ball.' Give it an instance name: 'ball'. Add a layer on top. In it write this
script: this.ball.onLoad = function() { trace('Hello'); } Test the movie.
Nothing happens. Select the ball symbol on the stage. Hit F9. Type in: stop();
(or any other AS). Comment it out. Test the movie. It works. Why?
designdog
2/21/2005 10:36:08 PM
I should add that it is important to put the script on the selected symbol, not on the layer it is on. For some reason it doesn't work that way...

AddThis Social Bookmark Button