A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: LocalConnection

  1. #1
    Member
    Join Date
    Oct 2006
    Posts
    36

    LocalConnection

    Does anyone know where i can see example code of an AS3 swf receiving variables from AS2 swf using LocalConnection.

    http://www.kirupa.com/forum/showthre...50#post1964550
    is not helping as this is vice versa.
    Last edited by 0gani; 10-13-2006 at 10:05 AM.

  2. #2
    Member
    Join Date
    Oct 2006
    Posts
    36
    AS3
    Code:
    import flash.external.ExternalInterface;
    import flash.net.*;
    var AVM_lc:LocalConnection = new LocalConnection();
    AVM_lc.connect("thisconnection");
    
    AVM_lc.showalert= function()
    {
    ExternalInterface.call("alert", "hey it worked");
    }


    AS2
    Code:
    var AVM_lc:LocalConnection = new LocalConnection();
    AVM_lc.send("thisconnection", "showalert");

    What's wrong with this code?

  3. #3
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Before using externalinterface, which you can only test on the server, why don't you test a simple trace action or something in a textfield and see what you get.
    - The right of the People to create Flash movies shall not be infringed. -

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