Saturday, April 15, 2006

(16:12-4/14/06)Finally i compiled ActionScript code under linux

(16:12-4/14/06)Finally i compiled ActionScript code under linux without ever touch flashIDE i passed this command to mtasc where the "'main" flag seem to be cause of success this way:


mtasc test.as -swf /home/rah/workspace/FlashOS/build/test.swf -cp /usr/local/bin/MTasc/std -main

note: "-swf" flag- test.swf is a compiled flash file of your choice used by MTASC to "frame" the class "-cp" flag- class path means path to standard core macromedia classes(choose std or std8 for flashMX or Flash8 respectively) "-main" flag- will automaticaly call static function main once all classes are registered.


I copy the test.as actionscript code as future reference and for its simplicity as example:
* @author rah:test.as */
test {
private var scopeRef:MovieClip;
test(scope:MovieClip){
scopeRef = scope;
scopeRef.createTextField("tf",0,100,100,800,600);
scopeRef.tf.text = "Hello world!!"; }
static function main(){
var test:test = new test(_root); }

No comments:

Post a Comment