Hi,

I wrote a simple Flash object using ActionScript and MTASC, and I've
been doing interop with Javascript using ExternalInterface. Now I'm
trying to switch from ExternalInterface to the older style interop
method: TCallLabel.

>From my (little) understanding of SWF, what I need to do is create
some labelled frames and associate actions/methods with these frames.
Then I can call TCallLabel("/", "frame1_label") to trigger the action
for frame1.

Is that correct and could you provide some pointers for doing this in SWFML?

Also, I'm a bit confused about the right steps for compiling the
thing. Here's what I tried doing so far:
- compile the SWFML into a SWF, with swfmill
- compile the AS file into the same SWF using mtasc
Is that the right way?

Below is the code (stripped from irrelevant parts) and SWFML. I'm
trying to call into the "ping" method.

Thanks,
Julien




// ----------------------- SWFML File ---------------------------------
<?xml version="1.0" encoding="iso-8859-1" ?>
        
<movie version="8" width="138" height="215" framerate="12">
  <background color="#ffffff"/>
  <frame name="firstFrame"/>
  <frame name="secondFrame"/>
</movie>



// ---------------------- AS File ------------------------------------------
class Storage {
            static var app : Storage;

            function Storage() {
                        _root.createTextField("tf",0,0,0,215,138);

                        _root.tf.text = "Local storage initialized.\n" +
                                    "Running Flash version: " + getVersion();
            }

            static function main(mc) {
                        app = new Storage();
                        Log("Storage created");
            }

            static public function Log(input:String)
            {
                        _root.tf.text = input + "\r" + _root.tf.text;
            }

           static public function ping():String {
                        Storage.Log("ping");
                        return "pong";
            }
}

_______________________________________________
swfmill mailing list
[email protected]
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Reply via email to