Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

on release

New Here ,
Jun 14, 2013 Jun 14, 2013

My script is not working from within a movie clip.... what should i do for this please help me...

my script is--

on(release){

    gotoAndPlay(5);

}

TOPICS
ActionScript
498
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 14, 2013 Jun 14, 2013

What is the script supposed to be doing that it is not doing - which timeline is supposed to go to frame 5 and play?

You should avoid placing code "on" objects and put it in the timeline instead.  The timeline version of the code would be...

objectName.onRelease = function(){

      gotoAndPlay(5);

}

where objectName is replaced with the instance name of whatever object is being clicked.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 14, 2013 Jun 14, 2013

"statement must appear within on handler" error occurs

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 14, 2013 Jun 14, 2013
LATEST

That indicates you are trying to place the code on the object.  The code I provided goes in the timeline where it is easier to find.  Select the frame in the timeline and enter the code in the Actions panel.

You should answer the questions I asked in case the code needs adjusting anyways.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines