A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Movie Clip Button problem

  1. #1
    Senior Member
    Join Date
    Feb 2002
    Location
    Sydney - Australia
    Posts
    167

    resolved

    Hi
    I'm using the following code

    portfolio_mc.onRelease=function(){
    portfolio_mc.gotoAndStop(10);
    }

    and I keep getting the message

    Scene=Scene 1, Layer=backdrop, Frame=1: Line 1: Statement must appear within on/onClipEvent handler
    portfolio_mc.onRelease=function(){

    but I can not figure out whats wrong, i have given the clip an instance name

    thanks in advance

  2. #2
    Danny Gomez Creations ® cosmiceye's Avatar
    Join Date
    Mar 2002
    Location
    under a palmtree in Jamaica waiting for psytopia 2005 to begin
    Posts
    982
    the onRelease command is for button instances! What u can do is to place an invisible button (only hitarea) inside the mc, and give that button , lets say, the instancename "myButton". Then It should work like this:

    portfolio_mc.myButton.onRelease=function(){
    portfolio_mc.gotoAndStop(10);
    }

  3. #3
    Senior Member
    Join Date
    Feb 2002
    Location
    Sydney - Australia
    Posts
    167
    Originally posted by cosmiceye
    the onRelease command is for button instances! What u can do is to place an invisible button (only hitarea) inside the mc, and give that button , lets say, the instancename "myButton". Then It should work like this:

    portfolio_mc.myButton.onRelease=function(){
    portfolio_mc.gotoAndStop(10);
    }
    Cosmiceye thankyou so much for that

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