Tuesday, April 5, 2011

image loading problem in swf file.

firstly i select an image clicking on a buttom. Then when i click into another button to show some text there also the image appear. This widget is built on AcrionScript 3.

From stackoverflow
  • You can create buttons by extending SimpleButton (see below for reference and examples). At some other point in your program you need to "listen" for clicks:

    myButton = new MyButton();
    myButton.addEventListener( MouseEvent.CLICK, myButtonClicked, false, 0, true );
    

    To download imagess you need to use the Loader class:

    var load:Loader = new Loader();
    load.contentLoaderInfo.addEventListener( Event.COMPLETE, done, false, 0, true );
    load.load( new URLRequest( "myImage.jpg" ) );
    

    ActionScript 3.0 Reference

0 comments:

Post a Comment