A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS3 to AS2

  1. #1
    Junior Member
    Join Date
    Jun 2006
    Posts
    4

    AS3 to AS2

    Hello,

    I'm not so good at ActionScript. Yet I have this AS3 snippet of code that I need to turn into AS2. Can anyone help?

    Actionscript Code:
    import flash.external.ExternalInterface;

    //Adds the CLICK eventlistener to the button btn1
    btn1.addEventListener(MouseEvent.CLICK,openColorBox)

    //Launches the JS function that we created earlier.
    function openColorBox(e:MouseEvent){
    ExternalInterface.call("launchColorBox","http://www.designfission.com/");
    }

    Thanks!

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    maybe this:

    actionscript Code:
    import flash.external.ExternalInterface;

    //Adds the CLICK eventlistener to the button btn1
    btn1.onPress = function(){
        openColorBox();
    }

    //Launches the JS function that we created earlier.
    function openColorBox(){
    ExternalInterface.call("launchColorBox","http://www.designfission.com/");
    }

Tags for this Thread

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