1 (edited by 9072997 2010-12-27 14:15:49)

Topic: making a button in actionscript2

I need to create a button in actionscript 2 (just a square with text would be good). i dont own flash (the official ide) and every tutorial i have looked at uses the official flash ide. i am using mtasc to compile it. my end goal is to have about 4 buttons that call a URL that would trigger scripts on my web server.

thanks

<update>
class Tuto {

    static var app : Tuto;

    function Tuto() {

_root.createEmptyMovieClip("square_mc", _root.getNextHighestDepth());
_root.square_mc.lineStyle(5, 0xff00ff, 100, true, "none", "round", "miter", 1);
_root.square_mc.beginFill(0xFF0000);
_root.square_mc.moveTo(10, 10);
_root.square_mc.lineTo(100, 10);
_root.square_mc.lineTo(100, 100);
_root.square_mc.lineTo(10, 100);
_root.square_mc.lineTo(10, 10);
_root.square_mc.endFill();
_root.square_mc.onPress = function() {
        // creates a 'tf' TextField size 360x240 at pos 0,0
        _root.createTextField("tf",0,0,0,360,240);
        // write some text into it
        _root.tf.text = "Hello world !!";
}
    }

    // entry point
    static function main(mc) {
        app = new Tuto();
    }
}




my compilation of 3 toutoriald on as2 worked nevermind
</update>