LocalConnection Help

I am attempting to use the localConnection(); command to
force seperate swf files to load in the order I want. I cannot seem
to get the commands to work correctly. I know this has to be pretty
simple. How do I pass a local connection command so that one swf
will tell another swf on the same html page to play? Please help.
URGENT!!

you know, it should be working, but it isn't for some
reason... i'll post the files and see if you can figure it out...
i'm pretty sure that if something's wrong, is going to be something
really simple and stupid XD
movieHolder
movieSelect
preloaderAS
FLV (this is the
movie that is supposed to play, note that in my AS i called the swf
where the movie is topRight.swf)

Similar Messages

  • Need localConnection Help

    Well now to explain my idea... I have a series of buttons in
    'buttons.swf' and just an empty mc in 'movie.swf'. We are going to
    be playing a different video with each button, and i thought that
    it would be better for size(not file size) to have them in sparete
    swf, it has also been requested to be done this way...
    well in swf1 we have:
    -sending localConnection
    -button to tell swf2 to play a video
    var LC_Send = new LocalConnection();
    b_005.onRelease = function(){
    LC_Send.send("LC_Receive", loadMovie, param);
    in swf2 we have:
    -receiving localConnection
    -an empty MC holder where the movie is supposed to play
    var LC_Receive:LocalConnection = new LocalConnection();
    LC_Receive.connect("LC_Receive");
    LC_Receive.loadMovie = function(param) {
    _root.movieHolder.loadMovie("topRight.swf");
    I hope this can help you to help me... thanks in advance!
    ^^

    you know, it should be working, but it isn't for some
    reason... i'll post the files and see if you can figure it out...
    i'm pretty sure that if something's wrong, is going to be something
    really simple and stupid XD
    movieHolder
    movieSelect
    preloaderAS
    FLV (this is the
    movie that is supposed to play, note that in my AS i called the swf
    where the movie is topRight.swf)

  • LocalConnection problem with Popup page

    I have tried a lot to get this thing done but no success.
    What I am trying to do is to send some variables from SwfA to
    SwfB. Both swf's are in seperate domains. In my SwfA, I am using a
    getURL to open SwfB in a pop up window. So now after SwfB is
    completely loaded in the popup page it has to send some variable to
    SwfA.
    This is the code,

    from the flash help files:
    As discussed in the entry LocalConnection.connect(), Flash
    adds the current superdomain to connectionName by default. If you
    are implementing communication between different domains, you need
    to define connectionName in both the sending and receiving
    LocalConnection objects in such a way that Flash does not add the
    current superdomain to connectionName. You can do this in one of
    the following two ways:
    Use an underscore (_) at the beginning of connectionName in
    both the sending and receiving LocalConnection objects. In the SWF
    file containing the receiving object, use
    LocalConnection.allowDomain to specify that connections from any
    domain will be accepted. This implementation lets you store your
    sending and receiving SWF files in any domain.
    Include the superdomain in connectionName in the sending
    LocalConnection object--for example, myDomain.com:myConnectionName.
    In the receiving object, use LocalConnection.allowDomain to specify
    that connections from the specified superdomain will be accepted
    (in this case, myDomain.com) or that connections from any domain
    will be accepted.
    Note: You cannot specify a superdomain in connectionName in
    the receiving LocalConnection object--you can only do this in the
    sending LocalConnection object.

  • Please help!! Can I pass a variable between 2 swf's that are on different html pages?

    Hey,
    Does anyone know how to pass a variable (string) from one swf
    to another if there in separate html pages?
    I assume I’d have to send the variable from the first
    page and load it into the second but I don’t know what
    functions or code I should be using. Any suggestions would be a
    HUGE help.
    Thanks
    If it helps: I’m creating a log in and sign up sheet
    that can be accessed from several sites. I’d like to record
    which site the user has come from when they signup.
    Thanks

    if they are open at the same time (for the same user), you
    can use the localconnection class to communicate between the
    two.

  • I am struck here!! pls help

    I am trying to retrieve the latest xml that is checked in, through java. So I am storing the resource id that is returned by the check in function and using that resource id to get the latest version of the xml using the getresourcebyid function in the xml db.
    following is the java code for that:
    oracle.sql.RAW b ;
    public void checkin() throws SQLException {
    String path = "/public/testcase.xml";
    cstmt = (OracleCallableStatement) conn.prepareCall (
    "BEGIN :1 := dbms_xdb_version.Checkin(:2); commit; end;"
    cstmt.setString(2, path);
    // register the type of the out param - an Oracle specific type
    cstmt.registerOutParameter(1, OracleTypes.RAW);
    // execute and retrieve the result set
    cstmt.execute();
    b = cstmt.getRAW(1);
    System.out.println (b);
    public void getResourceById() throws SQLException {
    cstmt = (OracleCallableStatement) conn.prepareCall (
    "BEGIN :1 := dbms_xdb_version.GetResourceByResId (:2); END;"
    cstmt.setRAW(2, b);
    cstmt.registerOutParameter (1, OracleTypes.OPAQUE);
    cstmt.execute();
    OPAQUE o = cstmt.getOPAQUE(1);
    XMLType poxml = XMLType.createXML(o);
    // get the XMLDocument as a string...
    Document podoc = (Document)poxml.getDOM();
    Element elem = podoc.getDocumentElement();
    System.out.println (elem.getTagName());
    When I ran I am getting the following error in the java getResourceById() method.
    Exception in thread main
    java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:184)
    at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:873)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3076)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4273)
    at xdb.test.getResourceById(test.java:360)
    at xdb.test.main(test.java:142)
    Process exited with exit code 1.
    what is wrong in the getresource method ?
    Also is there any other way you can do the same thing in java using select sql statement or something like that?
    Your help is appreciated.

    Actually on second thoughts invoke getNonSchemaBasedXML() on the xmltype is you must use thin connection..
    Here's an example
    package com.oracle.st.xmldb.pm.examples;
    import com.oracle.st.xmldb.pm.common.baseApp.BaseApplication;
    import java.sql.SQLException;
    import oracle.jdbc.OraclePreparedStatement;
    import oracle.jdbc.OracleResultSet;
    import oracle.xdb.XMLType;
    public class GetXMLTypeDOM extends BaseApplication
       protected String driverType;
       protected String getDriver() {
         return this.driverType;
       public void doSomething(String[] Args) throws Exception
         OraclePreparedStatement  statement = null;
         this.driverType = this.OCI_DRIVER;
         this.initializeConnection();
         statement = (OraclePreparedStatement) getConnection().prepareStatement("select object_value from PURCHASEORDER_NSB_XMLTYPE where rownum < 2");
         getDocument(statement);
         statement = (OraclePreparedStatement) getConnection().prepareStatement("select object_value from PURCHASEORDER_SB_XMLTYPE where rownum < 2");
         getDocument(statement);
         getConnection().close();
         this.driverType = this.THIN_DRIVER;
         this.initializeConnection();
         statement = (OraclePreparedStatement) getConnection().prepareStatement("select object_value from PURCHASEORDER_NSB_XMLTYPE where rownum < 2");
         getDocument(statement);
         statement = (OraclePreparedStatement) getConnection().prepareStatement("select object_value from PURCHASEORDER_SB_XMLTYPE where rownum < 2");
         getDocument(statement);
         statement = (OraclePreparedStatement) getConnection().prepareStatement("select x.object_value.createNonSchemaBasedXML() from PURCHASEORDER_SB_XMLTYPE x where rownum < 2");
         getDocument(statement);
         getConnection().close();
       private void getDocument(OraclePreparedStatement statement)
         OracleResultSet resultSet = null;
         org.w3c.dom.Document  doc = null;
         XMLType xml = null;
         try {
           resultSet = (OracleResultSet) statement.executeQuery();
           while (resultSet.next())
              xml = (XMLType) resultSet.getObject(1);
              doc = xml.getDOM();
              System.out.println("DOM Implementation is " + doc.getClass().getName());
              xml.close();
           resultSet.close();
           statement.close();
        catch (SQLException sqle) {
            System.out.println("Caught SQL Exception : " + sqle.getMessage());
      public static void main (String[] args)
        try
          GetXMLTypeDOM example = new GetXMLTypeDOM();
          example.doSomething(args);
        catch (Exception e)
          e.printStackTrace();
    }Which generates the following output
    C:\TEMP>
    C:\Oracle\JDeveloper\jdk\bin\javaw.exe -client -classpath C:\xdb\JDeveloper\Classes;C:\Oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar;C:\Oracle\product\10.2.0\db_1\LIB\xmlparserv2.jar;C:\Oracle\product\10.2.0\db_1\RDBMS\jlib\xdb.jar;C:\xdb\JDeveloper\jakarta-slide-webdavclient-bin-2.1\lib\jakarta-slide-webdavlib-2.1.jar;C:\xdb\JDeveloper\jakarta-slide-webdavclient-bin-2.1\lib\commons-httpclient.jar;C:\xdb\JDeveloper\jakarta-slide-webdavclient-bin-2.1\lib\commons-logging.jar;C:\xdb\JDeveloper\jakarta-slide-webdavclient-bin-2.1\lib\jdom-1.0.jar -Dcom.oracle.st.xmldb.pm.ConnectionParameters=C:\\xdb\\jdeveloper\\SimpleExamples\\LocalConnection.xml -Dhttp.proxyHost=www-proxy.us.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=192.168.0.77|localhost|192.168.1.1|*.oracle.com|*.us.oracle.com -Dhttps.proxyHost=www-proxy.us.oracle.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts=192.168.0.77|localhost|192.168.1.1|*.oracle.com|*.us.oracle.com com.oracle.st.xmldb.pm.examples.GetXMLTypeDOM -mx2048M
    ConnectionProvider.establishConnection(): Connecting as SCOTT/TIGER@jdbc:oracle:oci8:@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(service_name=ORA10GR2.xp.mark.drake.oracle.com)(server=DEDICATED)))
    ConnectionProvider.establishConnection(): Database Connection Established
    DOM Implementation is oracle.xdb.dom.XDBDocument
    DOM Implementation is oracle.xdb.dom.XDBDocument
    ConnectionProvider.establishConnection(): Connecting as SCOTT/TIGER@jdbc:oracle:thin:@localhost:1521:ORA10GR2
    ConnectionProvider.establishConnection(): Database Connection Established
    DOM Implementation is oracle.xml.parser.v2.XMLDocument
    Caught SQL Exception : Only LOB or String Storage is supported in Thin XMLType
    DOM Implementation is oracle.xml.parser.v2.XMLDocument
    Process exited with exit code 0.

  • 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.

  • LocalConnection issues- works great and then fails

    I'm having trouble with LocalConnection.  I'm using it to have a button in the main swf file control another sub swf file.
    This is my AS2 in the main swf:
    outgoing_lc = new LocalConnection();
    about_btn.onRelease = function() {
    outgoing_lc.send("lc_example", "methodToExecute", "../assets/flash/buenosaires_text.swf");
    gotoAndStop(2);
    hide_btn.onRelease = function() {
    outgoing_lc.send("lc_example", "methodToExecute", "../assets/flash/empty.swf");
    gotoAndStop(1);
    Basically I'm telling the button in main to load a movie in the sub swf with about_btn and then go to frame 2 in the main swf, then when they hit the other button, it loads a different movie and goes back to frame 1 in the main swf file.  The sub swf is basically empty with a holder movie in it and this AS2:
    incoming_lc = new LocalConnection();
    incoming_lc.connect("lc_example");
    incoming_lc.methodToExecute = function(param){
    holder.loadMovie(param);
    The two movies buenosaires_text.swf and empty.swf have content but no actionscript.  Also- it might be worth noting that I have 4 pages on the site that have this action taking place, but they are 4 separate html pages that house the swfs.
    It worked great, and then became unstable as it was tested more and more, it would work and then the user would navigate back to it and try the buttons again and they wouldn't work.  All is remedied when the browser is refreshed, but you can't put a disclaimer on a site to have the user refresh every time it stops working. (this site has been tested on 2 different servers and locally all with the same outcome)
    Any help would be greatly appreciated... I've been killing myself over this and my inability to figure out what is wrong with my apparently possessed script.

    I'm not sure what you mean, I'm embedding the swf files like this:
    main swf:
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','786','height','572','src','../assets/flash/kyiv','quality','high','pluginspage','http ://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie',' ../assets/flash/kyiv' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="786" height="572">
        <param name="movie" value="../assets/flash/kyiv.swf" />
        <param name="quality" value="high" />
        <embed src="../assets/flash/kyiv.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="786" height="572"></embed>
      </object></noscript>
    sub swf:
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','415','height','70','src','../assets/flash/text_kyiv','quality','high','pluginspage',' http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','../assets/flash/text_kyiv' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="415" height="70">
        <param name="movie" value="../assets/flash/text_kyiv.swf" />
        <param name="quality" value="high" />
        <embed src="../assets/flash/text_kyiv.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="415" height="70"></embed>
      </object></noscript>

  • LocalConnection and BitmapData

    Hi.
    I have a promlem with transferring BitmapData from one swf to
    another by using LocalConnection:
    //1st swf
    sending_lc.send("lc_name", "functionName", 1, "2",
    myBitmapData);
    //2nd swf
    receiving_lc.functionName = function(a,b,c){
    trace(a);// output 1
    trace(b);// output 2
    trace(c);// output undefined <<<PROBLEM:)
    Can anybody help me, please?
    Thank you!

    This post has a duplicate entry, original here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1279966&enterthread=y

  • LocalConnection and BitmabData

    Hi.
    I have a promlem with transferring BitmapData from one swf to
    another by using LocalConnection:
    //1st swf
    sending_lc.send("lc_name", "functionName", 1, "2",
    myBitmapData);
    //2nd swf
    receiving_lc.functionName = function(a,b,c){
    trace(a);// output 1
    trace(b);// output 2
    trace(c);// output undefined <<<PROBLEM:)
    Can anybody help me, please?
    Thank you!

    No, its not about the limit, its about the complex type of
    the object being sent. Flash uses references for complex objects
    when they are passed to functions as arguments. When using
    LocalConnection the SWF you send the BitmapData has a different
    memory address space than the receiving SWF so you get an
    undefined.
    Try it for yourself. Use 3 tier approach of LocalConnection:
    SWF1 <-----> SWF_GATEWAY <-----> SWF2
    1) non-working scenario:
    SWF1 sends BitmapData to SWF_GATEWAY that in turns sends it
    to SWF2, it will not work.
    2) working scenario:
    SWF1 sends BitmapData to SWF_GATEWAY that in turns sends it
    back to SWF1, it will work.

  • Air localconnection not working

    Hi
    I have a simple question: I have two SWF files that communicate through a localConnection.
    This works fine, but as soon as I publish one of the two SWF's as an AIR app, the connection
    is refused.
    What is the difference between a localconnection from SWF to SWF compared to a localconnection from
    AIR to SWF ?
    Update: I have read and tried all the instructions on this page:
    http://help.adobe.com/en_US/AIR/1.5/devappsflash/WS5b3ccc516d4fbf351e63e3d118666ade46-7c7e .html
    Using allowdomain with the application id and user id doesn't help either.
    The biggest problem is debugging: there's no way to tell where the error occurs and why.
    Eerk

    Cycle power on your router, the printer, and all your iOS devices.
    http://www.apple.com/support/iphone/assistant/airprint/

  • LocalConnection to run a function in another .swf not working....

    I'm trying to establish a LocalConnection so that I can communicate between my navbar & the main page on my website. Here is the code I have so far for the sending and receiving AS3 files, please let me know if you see anything out of the ordinary. The idea is that when you click on one of the icons on the navbar my "book" slides down to the center of the screen on the correct page. I actually have 4 buttons but only included the code I'm using for two in order to make this post shorter. The same idea is used for all four buttons though.
    Sending:
    var sending_lc:LocalConnection;
    sending_lc = new LocalConnection();
    servicesBtn.buttonMode = true;
    portfolioBtn.buttonMode = true;
    function servicesBtnOver(event:MouseEvent):void{
    servicesBtn.gotoAndPlay('over');
    function servicesBtnOut(event:MouseEvent):void{
    servicesBtn.gotoAndPlay('out');
    function servicesBtnClick(event:MouseEvent):void{
    sending_lc.send("my_lc_as3", "gotoServicesPage");
    servicesBtn.addEventListener(MouseEvent.ROLL_OVER, servicesBtnOver);
    servicesBtn.addEventListener(MouseEvent.ROLL_OUT, servicesBtnOut);
    servicesBtn.addEventListener(MouseEvent.CLICK, servicesBtnClick);
    function portfolioBtnOver(event:MouseEvent):void{
    portfolioBtn.gotoAndPlay('over');
    function portfolioBtnOut(event:MouseEvent):void{
    portfolioBtn.gotoAndPlay('out');
    function portfolioBtnClick(event:MouseEvent):void{
    sending_lc.send("my_lc_as3", "gotoPortfolioPage");
    portfolioBtn.addEventListener(MouseEvent.ROLL_OVER, portfolioBtnOver);
    portfolioBtn.addEventListener(MouseEvent.ROLL_OUT, portfolioBtnOut);
    portfolioBtn.addEventListener(MouseEvent.CLICK, portfolioBtnClick);
    Receiving:
    import com.greensock.*;
    import com.greensock.easing.*;
    var receiving_lc:LocalConnection;
    receiving_lc = new LocalConnection();
    receiving_lc.connect("my_lc_as3");
    receiving_lc.client = this;
    var bookPosition:String = "up";
    function gotoServicesPage(event:MouseEvent):void {
         book.gotoAndStop('webDesignPage');
    if (bookPosition == "up");
            TweenLite.to(book, 2, {y:830});
              var bookPosition == "down";
    function gotoPortfolioPage(event:MouseEvent):void{
         book.gotoAndStop('porftolioPage');
    if (bookPosition == "up");
            TweenLite.to(book, 2, {y:830});
             var bookPosition == "down";
    The reason I'm keeping track of whether the book is in the "up" or "down" is so that if it's in the down position already it doesn't re-tween back onto the screen. I am new to declaring and using variables; TweenLite; and LocalConnection so there is probably some simple problem with my AS3 code (although no errors are coming up in Flash). Any help would be much appreciated.

    Alright I'm going to fix one problem at a time, starting with the LocalConnection. I've checked several websites for tutorials and examples but cannot seem to get it working properly. I'm just trying to run a simple function over it and can't get it working. Once I can get it working, I'll modify the rest of the code to do what I need. Right now I'm just trying to use it to run a function (slideServicesIn) in a seperate swf. file. I've checked and rechecked the code and just can't figure out why it's not working.
    Here's the sending code:
    import flash.net.LocalConnection;
    import flash.events.MouseEvent;
    var lc:LocalConnection = new LocalConnection();
    function servicesBtnClick(event:MouseEvent):void{
    lc.send("my_lc_as3","slideServicesIn");
    servicesBtn.addEventListener(MouseEvent.CLICK, servicesBtnClick);
    Looks pretty simple.... And here's the receiving code:
    import flash.net.LocalConnection;
    var lc:LocalConnection = new LocalConnection();
    lc.connect("my_lc_as3");
    /*If you're not familiar with TweenLite or TweenMax, I can revise the code. I can't get it to work even just to go to a certain frame label. This seems pretty basic if you are even a little familiar with TweenLite/Tweenmax*/
    import com.greensock.*;
    import com.greensock.easing.*;
    import com.greensock.plugins.*;
    var bookPosition:String = "up";
    var currentPage:String;
    function slideServicesIn ():void{
             if (bookPosition = "up"){
             //Goes to a certain frame label in the book movie clip
             book.gotoAndStop("webDesignPage");
             //Slides the book down 825px from the top of the screen using TweenLite
             TweenLite.to(book, 3, { y:825 } );
             bookPosition = "down";
             currentPage = "book.servicesPage";
            else () {
             //Fades out the current page using TweenLite
             TweenLite.to(currentPage, 1, { alpha:0, ease:Quad.easeIn } );
             //Fades in the Web Design Page using Tweenlite
             TweenLite.to(book.webDesignPage, 1, { alpha:1, ease:Quad.easeIn, delay: .2 } );

  • Help with menu button and movie load

    Hello everyone....I am very new to flash and actionscripting
    and am self taught using mostly web research.
    I am building a site with a menu and a banner that is
    controlled by the menu (two swf files). I have managed to get them
    to communicate however, I am stuck at this point.
    When "bt_1" is hit I would like a "mv_1" to load in the
    banner.swf with is respected intro animation...this I figured out
    how to do...however now when "bt_2" is clicked I would like play
    the remainder of the animation of "mv_1" to unload the movie before
    "mv_2" loads with its respected enterance animation....this I would
    like to do for several buttons. The method I am using for my local
    connection is this....
    Sending script
    mySender = new LocalConnection();
    on (release) {
    \\ each button has a different param...1,2,3,4,5,6
    _root.mySender.send("menuconnect", "action", 1);
    \\ this is the best way I could figure out to disable the
    appropriate buttons..there might be a better way??
    home.enabled = false;
    couple.enabled = true;
    events.enabled = true;
    bridal.enabled = true;
    media.enabled = true;
    rsvp.enabled = true;
    Recieving script
    myReceiver = new LocalConnection();
    myReceiver.action = function(doThis) {
    if (doThis == 1)
    gotoAndPlay(2);
    if (doThis == 2)
    gotoAndPlay(3);
    //and so and soforth for all six buttons
    myReceiver.connect("menuconnect");
    If all this makes no sense I'm sorry...I tried my best...
    If some pro out there can understand what I'm trying to do
    and can help me I would greatly appreciate it....thank-you all
    sjs

    KGlad...I'm stuck again....:-(. I guess I'm not understanding
    this linkage thing well enought...
    if you don't mind tell me what you had in mind when you
    helped me with that code...this is my situation again....
    here is the actual website....www.beckyandsangeeth.com
    the menu on the left of course has the buttons and I want the
    animation pertaining to each button to load in the apparent banner
    region, (which I am still working on the indivual animations).
    I guess I'm not understanding where the movies are loaded and
    how they are linked...and so and soforth...thanks again
    Also I don't mean to be specifically speaking to
    kGlad...anyone out there I am open for ideas.
    thanks
    sjsamuel

  • AIR to AIR localconnection working only in one direction

    I have two simple air applications and i need to be able to send a message to the opposite app on the click of a button. My code works fine from app1 to app2 but i am getting the following error when trying to send a message from app2 to app1: Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.LocalConnection was unable to invoke callback returnMessageHandler. error=ReferenceError: Error #1069: Property returnMessageHandler not found on flash.net.LocalConnection and there is no default value.
    Here is my code:
    App1
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initConn();">
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import flash.net.LocalConnection;
                public var conn:LocalConnection;
                public function initConn():void
                    conn = new LocalConnection();
                    conn.allowDomain("app#app2");
                    conn.addEventListener(StatusEvent.STATUS, onStatus);
                    //Alert.show(conn.domain);
                    try
                        conn.connect("returnConnection");
                    catch (error:ArgumentError)
                        trace("Can't connect.");
                private function onStatus(event:StatusEvent):void
                    switch (event.level)
                        case "status":
                            //Alert.show("LocalConnection.send() succeeded");
                            break;
                        case "error":
                            //Alert.show("LocalConnection.send() failed");
                            break;
                public function returnMessageHandler():void
                    Alert.show("Recieved return message from app2");
                public function sendMessage():void
                    conn.send("app#app2:taskConnection", "localconnectionHandler");
            ]]>
        </mx:Script>
        <mx:Button x="10" y="10" label="send message" click="sendMessage();"/>
    </mx:WindowedApplication>
    App2
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="InitConn();">
        <mx:Script>
            <![CDATA[
              import mx.controls.Alert;
              import flash.net.LocalConnection;
              public var conn:LocalConnection;
              public function InitConn():void
                    conn = new LocalConnection();
                    conn.addEventListener(StatusEvent.STATUS, onStatus);
                    conn.allowDomain("app#app1");
                    conn.client = this;
                    //Alert.show(conn.domain);
                    try
                        conn.connect("taskConnection");
                    catch (error:ArgumentError)
                        trace("Can't connect.");
                public function onStatus(event:StatusEvent):void
                    switch (event.level)
                        case "status":
                            Alert.show("LocalConnection.send() succeeded");
                            break;
                        case "error":
                            Alert.show("LocalConnection.send() failed");
                            break;
                public function localconnectionHandler():void
                    Alert.show("Recieved message from app1");
                public function sendReturnMessage():void
                    conn.send("app#app1:returnConnection", "returnMessageHandler");
            ]]>
        </mx:Script>
        <mx:Button x="10" y="10" label="send return message" click="sendReturnMessage()"/>
    </mx:WindowedApplication>
    If anyone can plese help me figure this out I would greatly appriciate it I'm tearing my hair out!
    Thanks
    Adam
    Flexchief

    I figured out what my problem was...
    app1 needed the following line: conn.client = this;
    in order to receive the return message from app2.
    Flexchief

  • LocalConnection, error#2095, bad juju

    Hello, first time writing. Apologies if the details are too
    vague (I'm trying) ...
    Mac OSX 10.4 using Flash CS3 and AS3, Flash Player 9
    I am attempting to use LocalConnection to communicate between
    two .swf files (both opened in flash player instances).
    One .swf acts as a sender, with one local connection object
    making send calls.
    The other acts as a reciever, with one local connection
    object with itself as client.
    Basically, nothing fancy.
    When I attempt to make a connection between the two open
    swfs, I get:
    Error #2044:Unhandled AsyncErrorEvent:. text= Error #2095:
    flash.net.LocalConne....
    The rest is clipped by Flash Player's error window (by the
    way does anyone know how to make those error messages wrap? or to
    create an error log file?).
    I can't scroll through the text to make a copy, as all i'm
    left with is the beach ball of death. I have to force quit Flash
    Player to do anything else.
    So this is not so bad in itself, errors are bound to happen.
    The bad thing is that, from that point on, I can't open any
    .swf files which have LocalConnection objects that act as clients
    (listening for connections). This extends to such Flash files that
    attempt to load in browsers (tried Firefox and Safari, both hang).
    Not just my swfs either. For example, LocalConnection tutorial
    files that were working fine before fail to load as well. The only
    way around seems to be to force quit Flash Player and restart the
    OS (not just logout/login). This is obviously a terrible, terrible
    way to have to debug.
    So, I was wondering if anyone knew of any services/processes
    involved in LocalConnection on a Mac, and how to get things back in
    order so I dont have to reboot everytime I attempt to compile? Does
    anyone know of the kind of serious coding faux pas that could have
    caused this? I have tried web searches, none that i found made
    mention of a system reboot.
    Help would be incredibly appreciated.
    Thanks so much!
    Kav
    EDIT:
    Perhaps maybe you would like some code to see, if it helps.
    Pardon the exorbitant library importing, lazy during initial
    coding.

    I figured out what my problem was...
    app1 needed the following line: conn.client = this;
    in order to receive the return message from app2.
    Flexchief

  • Flash/Director LocalConnection - AllowDomain

    Hi,
    I am using the LocalConnection object to communicate between
    a Flash MX2004 SWF and a Director MX2004 movie (running in the
    Authoring environment). I need the two to communicate across
    different domains but, although I have followed the documentation,
    this does not appear to work!
    My Director movie WILL execute the called handler when the
    calling SWF is run locally, but NOT when it is run on the web.
    The documentation says that in order to allow the sending
    LocalConnection to talk cross-domain to the receiving
    LocalConnection I need to do the following:
    1) Make sure both connections are connected with names
    starting with an underscore... CHECK. My LCs are connected as
    "_SourceLC" and "_DestLC"
    2) Make sure that the allowDomain functions for both LCs are
    set to return true for the required domains... CHECK. My LCs'
    allowDomain functions both simply return true
    When running cross-domain, when I call the desination LC
    (_DestLC) from the source LC (_SourceLC), it gets as far as the
    allowDomain function, but does NOT execute the required function.
    However, when both are run on the same domain, the allowDomain
    function is executed followed by the required function being
    successfully executed.
    Can anyone help? Am I missing something, or is the
    documentation wrong?
    Thanks,
    Andy

    After having no luck, I found that I can communicate between AIR and an embedded an SWF in my Director movie. So I am just doing that as a go-between to pass commands from my AIR app to my Shockwave Projector.  I hope this helps anyone else who comes across this issue.

Maybe you are looking for