A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: a silly enough mc onRelease question...

  1. #1
    user in A minor
    Join Date
    Jan 2005
    Location
    finland
    Posts
    121

    a silly enough mc onRelease question...

    i used to be able to make it work. now i fail to see the error... help!
    very simply i want the following: when a mc (instance name 'mc') is clicked in a certain frame, the main timeline should jump into another frame. i try with this code on the mc:

    mc.onRelease=function(){
    gotoAndPlay("anotherframe");
    }

    ...but i get an error message:
    blabla...Statement must appear within on/onClipEvent handler
    photo.onRelease=function(){ blabla...

    how come? i've tried putting the code into the frame in question, tried all i can think of... and i've used the same code earlier without problems. must be this cold, head full of snot and a terrible cough: i can't figure out the mistake myself.

    please? help?

  2. #2
    Senior Member
    Join Date
    Nov 2004
    Posts
    928
    you are attaching the code to the movieClip - what you need to do is create a new layer and put the code in a new frame. and give your movieclip the instance name mc

  3. #3
    user in A minor
    Join Date
    Jan 2005
    Location
    finland
    Posts
    121
    aaaah, live and learn! it works. thank you!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center