Question : Changing dynamic text from a button rollover

I want to create an area on my Flash animation that viewers can roll over with the mouse and see a context explanations pop up to explain what's happening in that area.  I believe one way to do this is with dynamic text changed by ActionScript that handles the rollover button event, but I'm having trouble getting the ActionScript to compile. With the button selected I've entered the following in the Actions panel:

on (rollOver) =function() {
      text_1.text = "Look at this!  We're making the turn.";
}
on (rollOut) = function() {
      text_1.text ="";
}

and the errors I get after a Ctrl Enter  are:

    **Error** Scene=Scene_1, layer=hot buttons, frame=1:Line 1: '{' expected
     on (rollOver) =function() {

**Error** Scene=Scene_1, layer=hot buttons, frame=1:Line 4: '{' expected
     on (rollOut) = function() {

Total ActionScript Errors: 2        Reported Errors: 2

text_1 is the var for the dynamic text field I'm trying to change.

Thanks for any help.
Steve

Answer : Changing dynamic text from a button rollover

yes layers of acetate is a good description.

make it a hotspot button
just define the 'hit' area (last frame of the button).. with a shape.
and leave the first 3 frames (up,over,hit).. blank

you will see it in authoring as a turquoise colour.. this doesn't show at runtime...
so you have an invisible button.

put this on a layer above your animation

Z


Random Solutions  
 
programming4us programming4us