PDA

View Full Version : sprite behavior


dsdsdsdsd
01-29-2005, 03:49 PM
hello;

I have a cast member; I click on it in the cast and then click on the script icon;

I write this script:
on beginsprite
put "hello"
end beginsprite

I then drag the cast member onto the stage;

play the movie, but do not get a "hello" in the message window;

any thoughts?

thanks
Shannon Burnett
Asheville NC USA

MentalFish
01-31-2005, 10:56 AM
That is because the script isnt attached to the sprite the cast member represents. When you click the script button, you only create a script, you do not attach it to anything, until you drag and drop it onto the sprite (not the cast member, but the sprite it represents on the stage).

Be sure to set the script as a behaviour script (not movie or parent script) before you drag it onto the sprite.

dsdsdsdsd
01-31-2005, 11:16 AM
Petterns , thanks for your response;;

I have re-written the script as a behavior script - everything works;

thanks
Shannon Burnett
Asheville NC USA