Question:

In Flash ActionScript, what is the correct way to write the OnMouseOver script?

by Guest62753  |  earlier

0 LIKES UnLike

In my Actionscript panel, I begin with

OnMouseOver {

I also found through search that it might be

on (RollOver) {

Neither of these work, I keep getting errors for those specific lines. I've been searching all over for the simple answer... but couldn't find anything.

Please help me. I just want to know how to correctly write the mouseover script :/

 Tags:

   Report

4 ANSWERS


  1. in case of CS3 (as3)

    // my_MovieClip is ur MovieClip on the stage

    // dont select your MC to write script

    // just enter this script in the first frame

    // you dont need to select any object on the stage

    my_MovieClip. addEventListener (MouseEvent. MOUSE_OVER, MouseOverHandler);

    function MouseOverHandler (e: MouseEvent) : void {

    trace (" working ");

    }

    Anil

    anilkumarnd@gmail.com


  2. When asking an Actionscript question, please state which Actionscript because there are three different versions. Usually, people consider Actionscript as Actionscript 1.0.


  3. This code goes on a BUTTON:

    on(rollOver){

    "do what ever you want to do";

    }

    It's case sensitive.

  4. movieclip.onRollover

    Replace movieclip with the name of your mc.

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions