LocalConnections synchronized

  • jfbaro
  • Born
  • Born
  • jfbaro
  • Posts: 4
  • Loc: Liverpool

Post 3+ Months Ago

Hi!

We have a localConnection calling a method in another SWF... that other SWF will send the value we need to carry on processing, but when we call send it goes to the next line, but the other SWF didn't sent the value yet...

Does actionscript has any kind of synchronization for "localConnection" or even a way of using a semafor?

Thanks in advance
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

local connection
so, what u have is:
Code: [ Select ]
varReceived = false;
incoming_lc = new LocalConnection ();
incoming_lc.methodToExecute = function (param) {
     varReceived = true;
};
  1. varReceived = false;
  2. incoming_lc = new LocalConnection ();
  3. incoming_lc.methodToExecute = function (param) {
  4.      varReceived = true;
  5. };


to sync, do this:

Code: [ Select ]
onEnterFrame = function()
{
  if (varRecived)
  {
   delete onEnterFrame;
   varReceived = false;
   gotoAndPlay(some_other_frame);
  }
}
stop();
  1. onEnterFrame = function()
  2. {
  3.   if (varRecived)
  4.   {
  5.    delete onEnterFrame;
  6.    varReceived = false;
  7.    gotoAndPlay(some_other_frame);
  8.   }
  9. }
  10. stop();

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 16 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.