Skip navigation
trigger1337
Currently Being Moderated

Onclick event help

Apr 29, 2012 5:22 PM

Hi,

 

 

How should i code a onclick event to activate something on the timeline?

 

So basiclly when the user clicks something, i want the time line to play what i have put in there

 

Any info would be great thanks

 
Replies
  • Currently Being Moderated
    Apr 29, 2012 5:42 PM   in reply to trigger1337

    something.addEventListener(MouseEvent.CLICK, activateSomething);

     

    function activateSomething(evt:MouseEvent):void {

         // whatever you mean by play what you have put in the timeline

    }

     

    where "Something" is the instance name of the thing you click

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 30, 2012 10:17 AM   in reply to trigger1337

    That is what that code does.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 30, 2012 10:41 AM   in reply to trigger1337

    Have you tried putting a stop(); command in the timeline to keep it from moving?

     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2012 5:29 AM   in reply to trigger1337

    Up to this point you haven't shown any code at all. Show what code you are using and maybe someone can help.

     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2012 8:09 AM   in reply to trigger1337

    Up to this point you haven't shown any code at all. Show what code you are using and maybe someone can help.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points