1 Reply Latest reply on Jan 16, 2007 12:49 PM by NSurveyor

    Flash elements interracting with each other

      Hey Guys,

      I have a semi-urgent problem, any help would be appriciated!

      Basically, I am designing a web page for which the client didn't want it done entirely in flash, so it's an html page with a number of embedded elements. What i was wondering was, is it possible for these seperate elements to communicate with each other in some way? Ideally id like it so each element could "know" what state the others are in, and adjust itself accordingly...

      Any ideas if its do-able?

      Thanks a lot!
        • 1. Re: Flash elements interracting with each other
          NSurveyor Level 2
          It is doable. The LocalConnection class allows SWF to communicate with one another.

          For example, suppose you have SWF A trying to find SWF B's currentframe. To do so, you can put the following in SWF A:

          var send_lc:LocalConnection = new LocalConnection();
          send_lc.recieveFrame = function(frame:Number){
          trace("SWF B is on frame "+frame);

          and the following in SWF B:

          var my_lc:LocalConnection = new LocalConnection();
          my_lc.currentFrame = function() {