i suck at flash

Out of context: Reply #4

  • Started
  • Last post
  • 6 Responses
  • fyoucher10

    1. Give movieclip an instance name. Go to the "Properties Inspector" (the same GUI panel where you change Alpha, Tint, etc). There's a text input field where you enter a movieclip "instance name".

    2. On a separate layer in the same timeline AND on a frame that the movieclip (i.e. if your movieclip doesn't appear until frame 50, then your script should be on frame 51 or higher. If your movieclip appears in the very first frame, then you can add code in the very first frame.).

    3. Then add feels code, replacing "movieclipInstanceName" with the name of your movieclip:
    Actionscript 2.0 example:
    movieClipInstanceName.onRelease = function ():Void {
    getURL("www.google.com", "_blank");
    }

    Actionscript 3.0 example:

    myButton.addEventListener
    (MouseEvent.CLICK, myButtonFunction);
    function myButtonFunction (event: MouseEvent) {
    var myUrl:URLRequest = new URLRequest ("http://www.google.com");
    navigateToURL(mUrl);
    }

    • *** FYI, I added extra line breaks and extra spaces so code wouldn't get cut off in herefyoucher1

View thread