FORUMS: list search recent posts

local connection troubles

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Thumbslinger
local connection troubles
on Sep 26, 2007 at 1:29:12 pm

I'm having a spot of trouble figuring out why this isn't working.

I have two small swf files; one is just a little music loop with on/off and the other is a donut object that moves back and fourth. Upon clicking, an audio file is heard and a new page loads.

I'm trying to turn off the loop in one file when the donut is clicked on.

These are two separate swfs in one html page.

Here is what I have in the sound loop file, the file which will receive:

Code:
var incoming_lc:LocalConnection = new LocalConnection();

incoming_lc.connect("lc_example");

incoming_lc.turnOff =
function() {
_root.myLoop.stop("myLoop01")
};


and in the sending (donut) file:

Code:
_root.sprinkles.onRelease = function () {

var outgoing_lc:LocalConnection = new LocalConnection();
outgoing_lc.send("lc_example", "turnOff");
music.gotoAndPlay(2);
}
stop();


I have the two swf's placed in the same html document but nothing seems to be working.

Thanks



Return to posts index

Doccie
Re: local connection troubles
on Sep 26, 2007 at 2:15:08 pm

I can't spot any flaws in your code... Have you tried tracing something (in a textfield)? Maybe it's not your localConnection that's broken, but your function...


Kind regards,
Pieter


Return to posts index

thumbslinger
Re: local connection troubles
on Sep 30, 2007 at 11:42:31 am

for completeness, I found the problem.. the action code was only on one frame instead of being available throughout the animation. That fixed the issue. Thanks



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]