LocalConnection between AS3 App into Loaded AS2

So I have an app that loads an AS2 Compiled SWF into it.
The Main App (AS3)
// the SWFLoader loads the ChildSWF, and on (Event.COMPLETE, openLocalConn);
private function openLocalConn(e:Event):void {
   my_send_lc = new LocalConnection();
   my_send_lc.send("ConnCountryList", "publicMethod", "jo");
   my_send_lc.addEventListener(StatusEvent.STATUS, onStatus);
private function onStatus(event:StatusEvent):void {
   switch (event.level) {
     case "status":
        trace("**** LocalConnection.send() SUCCESS ****" + event.toString());
        break;
     case "error":
        trace("**** LocalConnection.send() FAILED ****");
        break;
Loaded SWFChild (AS2)
trace ("Loaded Child SWF");
var getArray_lc : LocalConnection = new LocalConnection();
    getArray_lc.client = this;
    getArray_lc.connect("ConnCountryList");
    getArray_lc.allowDomain('*');
function publicMethod(jo:String) {
    trace('Eureka');
So When I run the MainApp, The ChildSWF gets Loaded (traceout: Loaded Child SWF, it's calls the openLocalConn(), it Gives me another traceout: **** LocalConnection.send() SUCCESS ****,
BUT I GET no traceout for the called publicMethod() in the ChildSWF in which I am supposed to see: Eureka

LocalConnection will only work between two applications running on the same machine.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/LocalConnecti on.html
"LocalConnection objects can communicate only among files that are running on the same client computer, but they can be running in different applications — for example, a file running in a browser and a SWF file running in Adobe AIR."
If you need to communicate between an app running on an iOS device and a swf in a browser on a computer look into the ServerSocket Class:
http://help.adobe.com/en_US/air/reference/html/flash/net/ServerSocket.html
Works a little differently than LocalConnection but will allow connections between two different physical devices (ie: 2 computers, a computer and a mobile device, 2 mobile devices, etc).  Since the iOS device uses the air runtime stuff it should have access to the ServerSocket Class while the browser swf can use a standard Socket to connect to the iOS device.

Similar Messages

  • Embed AS3 swf into a AS2 FLA?

    HI, I have a flash site designed in AS2 and want to embed a
    AS3 video player in it. If I republish the AS2 site to AS3 the
    website doesnt function, and if I load the AS3 swf into the
    website, the Player doesnt function.
    I need the AS2 functionality on the website and I need the
    advanced AS3 functionality on the video Player.
    Is there any way to get these two guys to talk to each
    other?

    Creating a 3rd fla, to load the AS2 Fla and the AS3 FLA just
    aint gonna fly. This website is updated daily and its just too much
    of a maintenance nightmare.
    However, I do want to use Wabbits suggestion but I dont know
    how to create a web object.
    The GetURL function opens the swf on its own, which I dont
    want to do. I want it to open the AS3 SWF in a small window within
    the page.
    Can someone help please? Thanks in advance,

  • Load AS2 swf into AS3 swf problem

    I have a flash with AS3 and inside this swf i load in a AS2 swf.
    to load swf works just fine, but the problem is when i load this i want to go to
    a specific part of it, for example i want to go to frame 3 in the loaded swf.
    i must control this from the AS3 swf, does someone know if this is possible?
    thanks in advance

    so can i do like this then to go to frame 3 in my loaded swf?
    MovieClip(ldr.content).gotoAndStop(3); ?
    sorry for being such an airhead
    thanks for helping me out =)
    Date: Sun, 7 Jun 2009 10:25:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: load AS2 swf into AS3 swf problem
    no.
    if, in your loaded swf, you have a function f1() on the loaded swf's main timeline and you load that swf using a loader (say ldr), use:
    MovieClip(ldr.content).f1();   // to call f1() in the loaded swf
    >

  • Problems with loading AS2 assets into AS3 container

    Hello,
    in a Project I use the AS3 Loader Class to load
    AS2-swf-files. The swf-files are placed into different subfolders,
    since they're using the same filenames and subfoldernames for
    config-files etc.
    The Problem is: Whatever swf-file I load first, it is
    working, but every swf-file after that fails. It seems to be
    loaded, but it's not working correctly.
    I'm using the attached code (easy as it seems) to unload the
    present content and then loading the new one. But also using a
    separated second loader to load the second file is not working.
    I made some kind of testcase (a loader with 2 content
    swf-files) for you, so you can understand what I'm talking about.
    Here you can download the
    testcase (28
    MB).
    It seems like there is a bug in the flash player 9 that
    prevents the AS2-content from being unloaded correctly from an AS3
    file. Can you confirm that there is such a bug? Or do you have an
    explanation for this behavior? Or even better: a solution or
    workaround?
    Thanks a lot!

    Thanks for your help, but as said ("But also using a
    separated second loader to load the second file is not working.")
    even when using a second loader (with a different name) the second
    file loaded will not work.
    I'm removing any EventListener from the first loader,
    unloading and then nulling it.
    But to me it seems, that the first content is not garbage
    collected and because of that, even when loaded with an other
    loader the first loaded swf-file interferes with the second.
    I came to this conclusion, because the first loaded swf-file
    is still working after trying to load the second file. And just
    more weird: the first loaded file is in the same state and also
    after closing the Flash-Player.
    You can see it for yourself: download the testcase. Start the
    testcase.swf. Load a contentfile. Skip a few pages. Quit the Flash
    Player. Start the testcase.swf again and load the same contentfile.
    You will see it's at the same position like before quiting the
    Player.
    And I can't help, but that seems like a bug to me...

  • Nest AS3 swf into AS2 swf

    I purchased a flash template written in AS2, i have all files needed to customize this site, .fla, psd's you name it. I also purchased a photo gallery that is written in AS3 (did not know it was AS3 when purchased) . My question: is there any way to embed/nest the AS3 photo gallery, which i the swf file for, into my AS2 website?

    Per AS3 documentation:
    A single SWF file cannot combine ActionScript 1.0 or 2.0 code with ActionScript 3.0 code.
    SWF files written in ActionScript 1.0 or 2.0 cannot load SWF files written in ActionScript 3.0. This means that SWF files authored in Flash 8 or Flex Builder 1.5 or earlier versions cannot load ActionScript 3.0 SWF files.
    The only exception to this rule is that an ActionScript 2.0 SWF file can replace itself with an ActionScript 3.0 SWF file, as long as the ActionScript 2.0 SWF file hasn't previously loaded anything into any of its levels.

  • Load as2 swf in as3 swf

    Hi All,
    I am new to this forum.
    Can anyone tell me how to load as2 swf in as3?
    If this is possible,can anyone give me some sample example?
    Thanks
    Harshal

    You can talk to loaded AVM1 (AS1/2) SWF using LocalConnection. I used Grant Skinner's SWFBridge class in the past and worked very well:
    http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • Load as2 inside as3

    hi,
    I came a cross a strange problem while trying to load (using Loader Class) an as2 swf inside an as3 swf.
    I'm not sure that it matters but the as2 size is bigger.
    when i load the as2 file (even without addChild ) the overall swf that I run suddenly becomes larger and i guess getting the size of the as2 so it will fit.
    I want the parent as3 swf to keep its same size(scale).
    does anyone know how to fix this problem?
    *When i loaded an as3 instead of an as2, it worked like it should. That's why I know the as2 is the source of the problem.
    Thank you

    scale your loader so it fits the way you want.  ie, if your loaded swf is 800x600 (with nothing on the back-stage) and you're loading into a 350x375 swf, after loading is complete, use:
    loader.width *= 350/800;
    loader.height *= 375/600;

  • Loading Flash AS3/XML into Flex 3

    I'm seriously at a loss.
    I'm loading a Flash AS3 SWF into Flex via SWFloader and it
    will not load the xml data the file normally loads. The Flash file
    is fairly basic and loads XML data from a local file.
    I've tried all sorts of scoping within the Flash file
    pointing to the xml file just in case but still nothing. What do I
    need to do to get this file to read the XML through Flex 3?
    <mx:SWFLoader x="9" y="14" width="140" height="90"
    source="swfs/sponsors/top_sponsors.swf"/>
    The xml file is in the same directory.

    The migration of this file to proper AS3 is brutal. It would
    be easier to just rewrite the whole thing in flex. Screw it.

  • TS1702 how do you load apps into Passport

    how do you load apps into passport

    You need to download apps that are compatible with passbook.  There are less than 20 available right now I'd say
    Such as:
    Target
    American Airlines
    Fandango
    Ticket Master
    If you click the link to the app store through passbook and get an error, use this article to fix it: http://www.macworld.com/article/2010185/fix-passbooks-app-store-error-in-ios-6.h tml
    You can also use this site: http://www.passsource.com/ to create your own cards such as Blockbuster card, petco card, petsmart card, etc
    So if you have the target app you need to go into the target app > my target> mobile coupons > scroll to bottom of page  and click "add to passbook"
    My assumption is that you need to add things to passbook through the target app or american airlines app and so on.

  • Loading an existing app into XCODE?

    Is there a way to load an existing app into XCODE to study it's code and learn how it was made without violating any copywrite laws?  Seems that would be a great way to learn how apps work.

    The source code is not included in the app.
    Reverse engineering is a violation.
    Best thing to do is just review and study the plethora of sample code on the paid developer site; barring that just use Google.

  • Can't load apps into iTunes account

    I recently installed a new hard drive in my macbook. I added my music/movies into my account just fine however when I tried to add all my apps into my iTunes account but got error messages and none of them got added. My macbook is authorized to play my content and I was signed into my iTunes account however I'm wondering why my apps weren't added to my library.
    Am I doing something wrong or do I need to add them to my library in another fashion?

    This is the error message I keep getting;

  • Loading jfx app into web browser with preloader (improving load time)

    hi,
    has anyone made any attempt to construct kind of application preloader, waiting for whole app to load can take long time and default spinning wheel with java cup is not really user friendly.
    I was thinking about breaking app in two parts
    1)login view
    2)rest of the app that will be loaded lazily
    but then how to load second jar, what about updates of that second jar. Is there any way to talk to javascript in browser to show something nicer then default applet's preloadder.????
    maybe there is a better idea on how to improve loading time of jfx app embedded in web browser, my experience is based on 1.1 version of jfx so now it can be better.
    apart from jfx component im planing to use spring ioc and jdbc driver. so it should show something as quick as possible (confirm certificate and show login view) and then (or in the meantime) load rest of the stuff.
    any thoughts appreciated
    thanks

    Have you read the last post of (the prolific ;-) ) Rakesh Menon ;-)
    http://blogs.sun.com/rakeshmenonp/entry/javafx_lazy_loading
    May be it could help you.
    Regards
    Richard

  • Problem loading AS2 movies

    I'm loading AS2 movies in a AS3 environment, using a Loader.
    Movies load, but they loose some onRelease handlers. This behaviour
    is consistent. Some onRelease handlers in the AS2 work (all the
    time), some not. Anyone have the same experience or is there a
    solution?

    just ran across this note from the docs:
    "If the loaded content is an AVM1 SWF file (written using
    ActionScript 1.0 or 2.0), it cannot be cross-scripted by an AVM2
    SWF file (written using ActionScript 3.0). However, you can
    communicate between the two SWF files by using the LocalConnection
    class."
    might want to check into the LocalConnection class. you may
    be able to construct some methods to pass values, but you still
    will not be to 'script' from one version to another - however if
    you're clever with you method construction you may be able to
    utilize data gathered within the AVM1 by a AS2 script and pass it
    for use in the AVM2 script.

  • Encrypting communication between an app that uses an ODBC/DSN (with ADODB) and SQL Server 2008 R2

    I've been doing a lot of reading the last couple of days on how we can encrypt db communication between our product app and a customer's SQL Server db, but cannot make it work as expected. The app uses a ODBC/DSN to connect to the SQL Server db. I use this
    ODBC app to setup the DSN (on a Windows 7 PC):
    C:\Windows\SysWOW64\odbcad32.exe
    The  DSNconnection uses the SQL Server driver 6.01.7601.17514 and has these properties:
    - WinNT authentication.
    - Client Config button: TCP/IP to <server-name>\<instance.-name>
    - Change to default db: <name-of-app-db>
    - Everything else is default setting.
    SQL Server is on the same Windowns 7 PC and has a self-signed cert installed (used IIS to generate it) and has the Force Enryption set to "yes".
    I have a test C# program that uses the ADODB 2.7.0.0 COM-wrapper, made by Visual Studio after adding a reference to the ADO 2.7 library version 6.1.7601.17857. The program creates an ADODB.Connection object that has a simple connection string: "DSN=<san-name>;UID=<user>;PWD=<password>". The
    program then creates an ADODB.Recordset object and reads and displays a field from a table.
    Works fine.
    If I go into SQL Server and set Force Encryption to "no," clear the cert, restart the SQL service, and then re-run the program, it works fine.
    Here's the kick. If I go into the DSN and select "Use strong encryption for data" the Test button on the DSN works—why does it work? The SQL Server is no longer encrypting the connection so an error should occur. If I run the test program, it works
    as well—why? I can look at the connection properties in the test program and see that ADODB has added the ";Encrypt-yes" stuff to the end of the connection string. Yet that option seems to have no effect.
    If I set the SQL instance back to Force Encryption:yes, enable the cert, restart the SQL service, and clear the DSN's "Use strong encryption for data" option, I can still connect to the db with the
    test program—why?
    What am I doing wrong? I need to be able to ensure that the communication between our app product and the SQL instance is encrypted, and that we get an error if the SQL instance does not support encrypted communications. We really don't want the customer
    to have to enable Force Encryption because they have other db's on their SQL Server that do not use encrypted communication, but they want to know that our product's communication channel with the db is encrypted.
    No, I can't change the app product's code at this point in time. I'm stuck with working with what a DSN called from ADODB has to offer.
    Also, how can I be sure that communications are encrypted? I mean, I've tried things like "SELECT * FROM sys.dm_exec_connections" but that doesn't help because I have no idea how to tie the list of sessions shown back to my test program, although
    I guess it's a good thing that some of the sessions listed show encrypt_option as TRUE.
    -glenn-

    Ah yes, very good point. It's easy to miss because you have to delete then recreate the DSN in order to change drivers. So I switched the DSN over to the SQL Native 11 driver.
    Now when I try to connect to the SQL instance as <computer-name>\<instance-name>, and without a cert on the server, I get "the target principal name is incorrect". Perfect; now we're getting somewhere!
    Change my DSN to use <fqdn>\<instance-name> and it works. This tells me that SQL Server has auto-generated a cert and named it <fqdn>. I would have expected the "cert fail" error, not a cert
    name mismatch, because I'm not using Trust Server Cert.
    So I load up my self-signed cert, and that works too.
    I am still confused as to why I'm not seeing the "cert fail" error when I have no cert loaded on the SQL Server. I am not using Force Encryption on the server at all, so wouldn't expect SQL Server to auto-create a cert when an Encrypt=yes request comes in,
    but apparently it does?
    I also ran into a problem with this:
    select c.session_id, c.encrypt_option, s.client_interface_name
    from sys.dm_exec_connections c
    join sys.sysprocesses s
      on c.session_id = s.session_id
    where s.dbid = db_id('MyDatabase')
    There is no s.client_interface_name, probably should be s.hostname. There's also no s.session_id. I thought maybe this should be s.sid, but then no rows ever come back. The c.session_id looks like 51 and 52, but the s.sid looks like a very long binary number,
    so these two fields cannot be joined. I don't know how to convert the sid's properly so that the join would work. Ah wait, I just found the s.spid column; the join works when that column is used (I assume that's correct anyhow).
    If I add a Thread.Sleep(30 seconds) to my C# program just before the connection is closed, this query shows me the session for the correct hostname has encrypt_option=TRUE.
    And I have to keep my fingers crossed that all the app I/O will still work properly after
    changing the driver. Probably a safe bet though.
    Think I'm ready to throw in the towel on getting the "cert fail/no SSL" error to appear.
    It does look like I am able to sufficiently show that the connection is encrypted when Encrypt=yes is used with the newer driver.
    Thank for all the help!
    -glenn-

  • Can i download apples facetime app into my kindle fire hdx?

    General,  I have iPhones.  I also have kindle fire HDX.  Can I down load face
    Time app into the kindle for use between them

    No, there is no version of FaceTime for any kindle. Use skype or similar
    program if available for kindle.

Maybe you are looking for

  • Sync'ing Photos with iTunes causes smaller pictures in albums on iPhone?

    Hello out there. I'm using iOS 7.0.3 with iTunes 11.1.3.8 (Win). After synchronising my Pictures, which are stored in different albums, the larger files got to smaller size (about max. 4 MP). Before they were stored in original size on the iPhone, ev

  • Restrict SaTy for 1 Customer in a Sales Org

    Hello, I have a scenario where a specific sales document type is to be restricted for 1 customer.  All other customers for the particular Sales Org / Dist Channel / Division are to use this sales document type except for this customer, and my user wo

  • Can we do with a 16 pin terminal base for fp-tc-120?

    i got a thermocouple module for my project. The terminal base contains only 16 pins. Is there ne solution for this or shud we get a 32 pin terminal base ?

  • Windows 2008 R2 ODBC connect to Oracle Linux with 11g db

    Hi i installed a fresh oracle linux and installes 11.2.0 database server. the server works fine but i have a proplem to connect to the database from a windows 2008 r2 client. For the client connection i installed the oracle instantclient on the windo

  • Unable to install BB Desktop Software 6.01

    Hi, I get the following message when trying to install the BB Desktop Software (6.01): Windows ® Installer. V 4.5.6001.22159  msiexec /Option <Required Parameter> [Optional Parameter] Install Options</package | /i> <Product.msi>Installs or configures