A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Can anyone help with click tag buttons in Actionscript 3?

  1. #1
    Registered User
    Join Date
    Mar 2014
    Posts
    1

    Can anyone help with click tag buttons in Actionscript 3?

    Hi All.

    Im new to flash and have created a set of banner ads that i am happy with. I have created a clicktage button with the following code in the button:

    MyClickTagButton.addEventListener(
    MouseEvent.CLICK,
    function():void {
    if (root.loaderInfo.parameters.clickTAG.substr(0,5) == "http:") {
    navigateToURL(
    new URLRequest(root.loaderInfo.parameters.clickTAG), "_blank"
    );
    }
    }
    );


    Does anyone know how you can test to see if you button works? I appreciate that there is no link at the mo, so the code maybe have to be changes to something like:

    MyClickTagButton.addEventListener(
    MouseEvent.CLICK,
    function():void {
    if (root.loaderInfo.parameters.clickTAG.substr(0,5) == "https://www.facebook.com") {
    navigateToURL(
    new URLRequest(root.loaderInfo.parameters.clickTAG), "_blank"
    );
    }
    }
    );

    I am also getting two error mesages that say:

    1:

    Warning: 5004: The file '/Applications/Adobe Flash CC/Adobe Flash CC.app/Contents/Common/Configuration/ActionScript 3.0/FP10.1/playerglobal.swc', which is required for typechecking ActionScript 3.0, could not be found. You may need to reinstall Flash.
    2:
    Scene 1 1017: The definition of base class MovieClip was not found.

    Id really appreciate it if anyone can guide me through this
    Many thanks

  2. #2
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    post your .fla and the loadable .swf's .fla. The issue surely is there. I tested your script and it's working, just that i don't have the loaded .swf to test the clickTAG
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

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