Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Local Connection



hi,

I read some old forum replies and tried to get this thing

running but it wont work,can someone tell what the problem is,

file attached,

thx in advance,

Ricky.



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-26-2003, 06:47 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

About Local Connection
Can the parameters sent to the receiving side a function? I tried to send an object to the receiving side, but it seems that only properties of an object are sent. Is there any way so that I can send both the properties and method of an object to the receiving side?

Thanks.

Local Connection?
Hey guys,
Can anyone here explain how to use local connection. the explanation on Macromedia was very useful as it only showed how to transfer text fields. How do i send a variable from one movie in one html file to another movie in another html file. Thanks guys

Local Connection
Hello all, I was wondering how to use Local Connection between two popups and have them interact together "on the fly".
An example of this is at www.microbians.com. On the first menu system, select Drag Across Windows (Win.IE). If you have any ideas on simple things like this...care to share?

Local Connection
hi,

I read some old forum replies and tried to get this thing

running but it wont work,can someone tell what the problem is,

file attached,

thx in advance,

Ricky.

Local Connection
hi,

I read some old forum replies and tried to get this thing

running but it wont work,can someone tell what the problem is,

file attached,

thx in advance,

Ricky.

Local Connection Help
I think this is a case for local connection but I've never used it before so the title of my post may be inaccurate.

My page has flash navigation that loads in via load.swf

I have load.swf loading in nav.swf.

I need to set a cookine so that when the user hits the back button, nav.swf is present and load.swf is no longer there.

Any ideas???

Thank you very much!
Pete

Local Connection
hello people,

is there anyone knows how to use Local Connection and Passing Variable?

i have a sound file named A.swf and a menu named B.swf
I want to stop(fade out) the sound when menu button clicked(popup) and play(fade in) sound when popup closes.


*i'm setting up the stop sound part..looks like the localconnection is working but when button clicked.. the sound has to repeat (overlap!) in order to fade out..

how can i prevent it?

Local Connection
Hey guys, I have been playing around a little with the flash Local Connection. Right now I just have a simple animation where a ball travels from one window to the other. It works fine except for one thing. As best as I can figure, it should be looping continuously until I close one of the windows, but it isn't. Sometimes it will loop once, but most of the time it plays through, then stops. I was just wondering if anyone has any pointers as to where I am going wrong. I have attached the source file below.

Thanks,
~Steve~

Local Connection
I have a flash website that requires user log-in. Once logged in, you can take "lessons" which open in a pop-up window. I'm using the LocalConnection to pass variables from one movie to the other. It works most of the time, but we've had some problems with reliability. It seems to work flawlessly on our highspeed network, but on DSL outside of our network it sometimes works and sometimes doesn't. Does anyone know of any issues with the LocalConnection as far as reliability or any suggestions to test? Thanks!

Local Connection ?
Question regarding local connections... i need to relay information from one swf to another, and this works fine when i preview it locally, but when i view it online, the variables don't get passed through consistently. it seems to work only a small percentage of the time.
I'm wondering if anyone else has come across any issue like this and how they solved it?
any help would be greatly appreciated.
thanks!!

Local Connection AGAIN HELP Please
Sry I have asked alot about this subject but I just cant get it. I need to use the local connection class to have to 2 buttons in one projector go to the next and previous frames in a movie clip in another projector.

I need your help!

Local Connection Across Lan
I just visited a topic with a similar question, although I'd like to see how it applies to my situation, and if possible. I'm thinking of making a 'faked' multiplayer game - where two users on two computers send commands to one another.

Breaking it down to the most basic question;

How would one go about pressing a button on computer 1 and activating an MC to gotoAndPlay(frame) on computer 2? I'd be using 2 swfs here, and this would function like a local connection, except .. not so local. A Lan. What is the easiest way to do this without getting too messy? I understand it may be a silly question based on my lack of knowledge of this area, but any direction/tutorials/information would be great!

Swf To Swf Local Connection
I am trying to send a simple gotoAndStop command from one swf to another, both seperatly embeded in an html page. I have been told that i should use Local Connection. I keep getting referred to Macromedia's page that give you an example for send text from one swf to the other. I am not an actionscript guru. I cant seem to alter the code to suit my needs. I am on a strict timeline and would appreaciate any help i could get.

Here is the code for using local connection to send text from one swf to the other:

outgoing swf:


//assign a function to the button's event method
buttonInstance.onRelease = function() {
//create the LocalConnection by first
//setting it equal to a variable
outgoing_lc = new LocalConnection();
//send the contents of the text field
//using the send() method
outgoing_lc.send("lc_name", "methodToExecute", userMessage.text);
//delete the local connection now that the
//message has been sent
delete outgoing_lc;
};

incoming swf:
//create the LocalConnection by first
//setting it equal to a variable
incoming_lc = new LocalConnection();
//define the function that will execute when a connection is made
incoming_lc.methodToExecute = function (param) {
//set the contents of the text field
//equal to the parameter received from the sending movie
sentMessage.text = param;
}
//make the connection
incoming_lc.connect("lc_name");

Local Connection Help
I think this is a case for local connection but I've never used it before so the title of my post may be inaccurate.

My page has flash navigation that loads in via load.swf

I have load.swf loading in nav.swf.

I need to set a cookine so that when the user hits the back button, nav.swf is present and load.swf is no longer there.

Any ideas???

Thank you very much!
Pete

Local Connection
Can someone can help.

Ive got 2 swfs each and one is embedded in a seperate html doc.

on the first page i have a button that brings the user to the second html documunt. what i want to do is pass a value between the two SWFs!

I have tried using local connection but it seems that the second html page has to be open for the valued to be passed.

anyone have any suggestions?

Thanks in advance.

Lorcan

Local Connection
Can I save flv file with NetStream.publish on my local drive?

I used this code, but file is didn’t saved

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.publish("yourCamera", "record");
ns.attachVideo(Camera.get());

stop_mc.onRelease = function(){
this._parent.recording._visible = false;
this._parent.ns.publish(false);
}

I have make mistake or this impossible?

Local Connection Obj.
I inherited a site from someone. I cannot test the site locally or when I post to my server. They seem to be using a Local Connection Object to get it all started. I tried adjusting it to no avail. Im not quite sure how to test if it's even working, besides sending the results to a text box. Heres there code. On my site the files are located here: http://mysite.com/clients/companyname
FYI: The files are being published for Flash Player 9 and AS 2.0







Attach Code

var lc:LocalConnection = new LocalConnection();
var domain:String = ( lc.domain() == "localhost" ) ? "clients.theirWebsiteHere.com" : lc.domain();

url_core = new Array();
url_core["base_url"] = "http://" + domain;
url_core["path_url"] = "";
url_core["local_url"] = url_core["base_url"] + url_core["path_url"];
url_core["flash_url"] = url_core["local_url"] + "/flash";
url_core["image_url"] = url_core["local_url"] + "/images";

credit_link._visible = false;
content._lockroot = true;
content.loadMovie(url_core["flash_url"] + "/home.swf");
status_txt.text = url_core["flash_url"];

Local Connection Help
Hi I am trying to work with Local Conection here and having major issues..

basically I have 2 flash files..

TOP-menu with 2 buttons(content and content2)
in html table on top
BOTTOM-seperate flash file with content/welcome screen...
Now I am trying to load when you click on one of these buttons the .swf files (content and content2) in the bottom part.
I got it all figured out but IT only loads the content2 because it is the last one in the code..

Here is the code for the 2buttons:

function triggerContent() {
my_send = new LocalConnection();
my_send.send("incoming", "Content");
delete my_lc;
}

_root.bluebutton.onPress = function() {
triggerContent();
};




function triggerContent2() {
my_send = new LocalConnection();
my_send.send("incoming", "Content2");
delete my_lc;
}

_root.bluebutton2.onPress = function() {
triggerContent2();
};



and here is code for the MAIN content window

my_get = new LocalConnection();
my_get.Content = function() {
loadMovieNum("content.swf", 1);
};
my_get.connect("incoming");


my_get = new LocalConnection();
my_get.Content2 = function() {
loadMovieNum("content2.swf", 1);
};
my_get.connect("incoming");



I know its pretty complicated but if you know Local Connection please help me out.... Any help appreciated

thanks

Danny

Local Connection
Hi,

I'm working on a new website which contains several swf's. They are all loaded into the main swf. To communicate between the swf's I use local connection. The Connection works just fine, but I'm having some problems with the removeBack function.


ActionScript Code:
function maakKlaar(){    _root.item._visible = false;    _root.newsHolder._visible = false;}maakKlaar();// maak nieuwe local connection aanlCon = new LocalConnection();//maak connectie met localConlCon.connect("localCon");//functie om de data verkregen uit de main movie te verwerkenlCon.receiveData = function(exit) {    // als exit true is voer dan het volgende uit    if (exit) {        // roep functie ga weg op zodat er een transition komt tussen verschillende movies        gaWeg(_root.achtergrond, _root.item, 25);    }};// functie gaWeg zorgt ervoor dat alles weer verdwijntfunction gaWeg(mc, mc1, endX) {    _root.newsHolder._visible = false;    // mc1 oef    function removeBack(){    mc.onEnterFrame = function() {        i=8;        ease = this._yscale/i;        this._yscale -= ease;        i--;        if (this._yscale<=1) {            this._yscale=1;            delete this.onEnterFrame;        }    };    }        // mc oef     mc1.onEnterFrame = function() {        ease = this._x/10;        this._x += ease;        if (this._x>=endX) {            this._x = endX;            removeBack();            delete this.onEnterFrame;            this._visible = false;        }    };    if((mc._visible = false) && (mc1._visible = false)){    // zorg ervoor dat de hele movie geunload wordt.     _root.unloadMovie();    }}


As you see there is a receive function for receiving the data send from the main swf.

My problem:
When I click a button in the main swf. You see my movieclip called "item" moving but "achtergrond" has allready disappeared with out a animation. So the error is somewhere in the function removeBack but I don't know where.

thnx

Local Connection Help?
Hi,

I created a newsreader movie that is populated by a textfile. I also created an admin movie to modify the textfile with a bit of PHP. The theory is to update the textfile for the newsreader movie from the admin, making editing the original newsreader.fla unnecessary.However, I would like to update the information without a browser refresh. I thought I might run into some browser cacheing issues when trying to update the data real time, so my idea was to use the localConnection method to update the newsreader with the content that is being saved to the textfile. I thought this would be a workaround for the browser cacheing the old textfile contents. This works fine locally, but when tested from a browser, the localConnection idea doesn't seem to work. In other admin demo's, after the user saves the info, I just provide a link to the textfile to update the browser cache. When refreshing the browser, the content is updated. I would like to find a way to do this in a real time situation. Here is a link to a small tutorial I tried to write using this method. The source files are available on the second page. Why does this work so well locally but not in a web browser?

http://ntdesigns.net/tutorial/NewsManager.html

Any suggestions appreciated.
Regards
NTD

Local Connection Help
hi
i have been trying this for like 2 hours and it just does not want to work. I have 3 swf files on a html stage. once all have loaded i want them to all play in sync.

i have tried this method but with no success.#
please lend a hand??
this is the main fla..

Code:
import mx.util.Delegate;
stop();
var complete_load:Number = 0;
LC1 = new LocalConnection();
LC2 = new LocalConnection();
LC1.connect("textSend_lc1");
LC2.connect("textSend_lc2");
this.onLoad = function() {
trace(this)
checkloaded();
};
LC1.complete_load_lc1 = Delagate(this, checkloaded)
function checkloaded()
{
complete_load++;
if (complete_load == 3)
{
trace("complete");
this.gotoAndStop("pause");
}
}
fla 2 is

Code:
stop();
talkingLC1 = new LocalConnection();
this.onLoad = function(){
talkingLC1.send("textSend_lc1", "complete_load_lc1");
}
fla 3 is


Code:
stop();
talkingLC2 = new LocalConnection();
this.onLoad = function(){
talkingLC2.send("textSend_lc2", "complete_load_lc2");
}
i am testing it in firefox but the swfs dont talk to each other..

Local Connection (yes Again)
Howdy folks,

got a problem, i cant solve by meself ... maybe sumone can help me out with this.

I have got 2 SWFs ...

In Swf 1 i want to start a local connection to send Var1 to SWF2 ... When SWF2 receives Var1 it should send Var 2 to SWF 1. When SWF 1 receives this, it should play a clip, at the end of the clip it should send var 3 to SWF2 so, that SWF 2 starts playing another Clip ... This should happen a lot (maybe 10 times with different VARS ... Can sumone point me into a direction how I can make this??? I am a bit lost (and a noob in Local Connections) ...

I hope my text is understandable (i am not native english)... thanx in advance

cheers

Chrome

Local Connection - AS2.0 - AS3.0
i have one actionscriptt 3 file with oops applied to it via document class.
i have another action script 2.0 file , in which th etime line contains a localconnection code... i cannot catch that code by creating a local connection in the actionscript 3.0 class... why ?

Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.LocalConnection was unable to invoke callback ldrFramePosition. error=ReferenceError: Error #1069: Property ldrFramePosition not found on flash.net.LocalConnection and there is no default value.


can some one help ?

Local Connection Help
Hi I am trying to work with Local Conection here and having major issues..

basically I have 2 flash files..

TOP-menu with 2 buttons(content and content2)
in html table on top
BOTTOM-seperate flash file with content/welcome screen...
Now I am trying to load when you click on one of these buttons the .swf files (content and content2) in the bottom part.
I got it all figured out but IT only loads the content2 because it is the last one in the code..

Here is the code for the 2buttons:

function triggerContent() {
my_send = new LocalConnection();
my_send.send("incoming", "Content");
delete my_lc;
}

_root.bluebutton.onPress = function() {
triggerContent();
};




function triggerContent2() {
my_send = new LocalConnection();
my_send.send("incoming", "Content2");
delete my_lc;
}

_root.bluebutton2.onPress = function() {
triggerContent2();
};



and here is code for the MAIN content window

my_get = new LocalConnection();
my_get.Content = function() {
loadMovieNum("content.swf", 1);
};
my_get.connect("incoming");


my_get = new LocalConnection();
my_get.Content2 = function() {
loadMovieNum("content2.swf", 1);
};
my_get.connect("incoming");



I know its pretty complicated but if you know Local Connection please help me out.... Any help appreciated

thanks

Danny

Local Connection
Hi,

I'm working on a new website which contains several swf's. They are all loaded into the main swf. To communicate between the swf's I use local connection. The Connection works just fine, but I'm having some problems with the removeBack function.


ActionScript Code:
function maakKlaar(){    _root.item._visible = false;    _root.newsHolder._visible = false;}maakKlaar();// maak nieuwe local connection aanlCon = new LocalConnection();//maak connectie met localConlCon.connect("localCon");//functie om de data verkregen uit de main movie te verwerkenlCon.receiveData = function(exit) {    // als exit true is voer dan het volgende uit    if (exit) {        // roep functie ga weg op zodat er een transition komt tussen verschillende movies        gaWeg(_root.achtergrond, _root.item, 25);    }};// functie gaWeg zorgt ervoor dat alles weer verdwijntfunction gaWeg(mc, mc1, endX) {    _root.newsHolder._visible = false;    // mc1 oef    function removeBack(){    mc.onEnterFrame = function() {        i=8;        ease = this._yscale/i;        this._yscale -= ease;        i--;        if (this._yscale<=1) {            this._yscale=1;            delete this.onEnterFrame;        }    };    }        // mc oef     mc1.onEnterFrame = function() {        ease = this._x/10;        this._x += ease;        if (this._x>=endX) {            this._x = endX;            removeBack();            delete this.onEnterFrame;            this._visible = false;        }    };    if((mc._visible = false) && (mc1._visible = false)){    // zorg ervoor dat de hele movie geunload wordt.     _root.unloadMovie();    }}


As you see there is a receive function for receiving the data send from the main swf.

My problem:
When I click a button in the main swf. You see my movieclip called "item" moving but "achtergrond" has allready disappeared with out a animation. So the error is somewhere in the function removeBack but I don't know where.

thnx

Local Connection
I'm working on a website that has 3 different .swf's on the webpage. The Flash pieces use LocalConnection actionscripting, to communicate with each other. The one problem is that the client has gotten some complaints that the Flash pieces do not work properly when there are two windows open (with the same website in both windows.)

To get into the specifics...the flash pieces are in different frames. I don't know if this has anything to do with the problem. Also, when you have the site in two different windows, and you rollover a flash button in the ACTIVE window, it triggers a flash piece in the INACTIVE window....Is there a way to tell the flash to only activate the ACTIVE window, or the front most window?

Local Connection
hi i'm using local connection to send info between movies and that is working fine. i know that if you have more than one broswer open it will fail.
is there any way that i can use lc in my movies and have more than one broswer opened

Local Connection
Does anyone know a good tutorial for LocalConnection. Ive searched and i cant find any simple enough for me to understand.

Basically i have a nav bar in one swf and a saparate swf below where basically i want various movieclips to be loaded by the nav bar.

Can anyone help me out?

Can This Be Done With Local Connection
Basically I'm loading an HTML page with 2 embedded Flash movies. What I want to do is load 1 of the SWF's in tandem with the HTML and not load the second SWF at all until the first SWF is loaded. Is there anyway to prevent the second SWF from downloading/starting to cache? Maybe using Local Connection?

I'm using MX, by the way

Local Connection
Did you ever resolve this? I am working on this now and cannot get it to work. if so, how did you get it to work?

Thanks

Local Connection
HI!
I'm developing a cd-rom and i'm using several external swf's to introduce the content.
What i want is to when the user clicks a button that is on a swf to load another swf and go play to another scene.

something like this:

Movie1 -- user clicks button -- loads Movie2 -- goes to scene2 and plays

I know this is made with local connection but havent work with that new function yet and this is a urgent thing to resolve.

Any idea??

LOCAL CONNECTION Help ..
Hi.. I have 4 *.swf files on the stage.. so what i need is.. whan 3 of 4 are loaded to inform fist one(main one).. and whan it's informed it sends play(); back to them.. (all other 3 *.swf files)

//thanx.
I hope you understad what I wanted to say..

Local Connection Question.
I create a poll in flash and one flash file is the results while the other flash file is the voting.

I am trying to setup a localConnection Object so that when you submit your vote from the voting movie, it tells the other results flash movie to load the vars again to show the new results.

Any help on this would be appreicated.

Thanks,
dduck1934

Problems With XML And Local Connection
Ok I have set up my pretty dynamic menu system which can be viewed at http://www.egoweb.com.au/menutest . The fuctionality is kinda in there working but I have some issues.

On some machines when I click a top button the left menu folds away fine BUT when it comes back out it wiggs out and appears to start dropping a number of times before dropping kinda like it is tying to load the XML multiple times ..... BAD. Also after a number of clicks the menu appears to stop working aswell. The left menu refuses to frop after a bit of clicking ... BAD.

Also there is a problem with performance of the two flash files running together. Is there any pointers out there to help me optimize the code to run smoother? I really want to get this menu running smoothly. Down the track we will try to get it setup so that ASP calls send back the XML to the menu to try and make it 100% dynamic.

This one is kinda urgent guys so any/all help is appreciated on this one.

P.S. I not care if you rewrite huge chunks

Source files are as follows and you will have to keep same folder structure for it to work.

-- The FLA files --
-- These are at the site / --
http://www.egoweb.com.au/menutest/topmenu.fla
http://www.egoweb.com.au/menutest/leftmenu.fla

-- The XML that drives the menu --
-- in the folder /xml/ --
http://www.egoweb.com.au/menutest/xml/topmenu.xml
http://www.egoweb.com.au/menutest/xml/menu1.xml
http://www.egoweb.com.au/menutest/xml/menu2.xml
http://www.egoweb.com.au/menutest/xml/menu3.xml
http://www.egoweb.com.au/menutest/xml/menu4.xml
http://www.egoweb.com.au/menutest/xml/menu5.xml
http://www.egoweb.com.au/menutest/xml/menu6.xml

-- Robert Penner's Wonderful AS files --
-- in the folder /include/as/ --
http://www.egoweb.com.au/menutest/i...s/core_setup.as
http://www.egoweb.com.au/menutest/i...ng_equations.as
http://www.egoweb.com.au/menutest/i...motion_class.as
http://www.egoweb.com.au/menutest/i.../tween_class.as

Local Connection / Netscape Bug
I don't know if it's just me, but whenever I try to run a local_connection in flash it doesn't work in netscape.

can anyone else get macromedia's demo to work in nutscrape 7.02?

here it is

http://www.macromedia.com/support/fl...connection.htm

Local Connection Overload?
1) i am not english and i do not speak/write well, so forgive me
2) i am noob to actionscript (or i was before 14 days)

now my problem,

my boss want me to make flash mp3 player, it consist from 3 swf files,
first with button play and stop, second is main player, wich works as "crossroad" for local connection, last file is the display, where goes only info about % loaded

these 3 files are on page, player.swf is presented only once, and it gets no parameters from html, button and display are presented as much as song files in subfolder /music and they get parameters from html, they are the same - the name of the song for connection between button, player and display


well, i made and remade it 3times ... now in NN it works perfect (in netscape 7 with transparency in nn4.7 with no transparency but WORKS as i want - with no lags) .... but, when you have much files on one page, and you are trying page in explorer, it will start to be very very laggy ... it shows number geted from exp.
(getbytesloaded/getbytestotal)*100 but the display file gets the
info about it 10 or 20 seconds later ... if you have some network activity monitor, u can see activity on it and there is no number on the page, after 10 sec it shows ... after some time download stops and song start to play ... (no streaming so gbl must be equal to gbt ant it must be 100 to start play song) but i can see something about 50% (example), there is NO other sound object then the one wich plays ... so i do not understand it

well, what i want to ask:
is it possible to MSIE have "lag" problem when using more local connections and NN have not?

Local Connection With More Than One Movie?
My Flash Bible says that once you invoke the command

sender_lc.send("aconnection","doMethod",somevariab le);

then it 'sends a command to ALL movies that are listening on a connection called "aconnection".'

My problem is that it doesn't. If I open multiple copies of the receiving movie, only the first one opened actually receives the data.

What is going wrong here? Is the Flash Bible wrong? Or am I doing something wrong?

This is my code


// receiving movie

receiver = new LocalConnection();

receiver.gettext = function(getstring);

_root.myoutputbox.text = getstring;

}

receiver.connect("aconnection");


// sending movie

sender = new LocalConnection();

_root.sendit = function(){

sendstring = _root.myinputbox.text;

sender.send("aconnection","gettext",sendstring);

}


The function sendit is invoked by a button. I am not sure if that is relevant to why this doesn't work.

Can local connection only work between TWO movies?

Thanks a lot for your help.

Toby

Local Connection Problem...
Hi all Been awhile since I've been here

Got a problem I'm affraid.
I have 2 movies who connect together via the good old Localconnection. The one is a menu and the other is the main panel. Of course the menu will control the main panel, very basic setup.

But there is a problem. It seems as though he is not recieving the local connection right. I made a basic setup of my menu system and there it workes fine, but when I put it in by big site file (my original menu and panel), it goes all bonkers.

When you click the button that should go to MC 2 it goes to MC 1 or doesnt work at all, every button seems to grabe the previous MC, not the one he should have.

Is it still making sence?

I have put the simpel version in a zip file so you guys could look at it yourself and study the code.
http://users.pandora.be/eclips/zip.zip

The main site is up at
http://www.vleesboetiek-vdk.be/test2/index2.html

the *.flas of the 2 swfs are located in the zip to.

Thanks alot!
Hope you can help!

B.

Local Connection - Does It Need Permission?
Hey folks. Ok, I'm testing some Flash files that do some audio playback in a page. I've got little flash buttons that when clicked, make a connection to a 1x1 pixel flash movie that contains a playlist and other variables, as well as all the code for handling playback and database info.

The idea is that I have one central engine that handles the audio playback, and the individual "dumb" buttons just send which audio to play. This way, the client can have a dynamically generated playlist without having to generate the heavier flash for each listing.

My question is - since the movies use Local Connection objects, does the user have to grant permission to the movies?

If so, what's an elegant way to get premission without having a bulky movie that can display the permission window, and is there a way to store the permission status once it's granted?

Local Connection Function Help
Ok i have been messing about with the localConnection function in flash. And have stumbled upon a problemb.

I have two movies - a sender movie and a receiver movie - In the send movie a buton triggers the local connection with causes a movieclip to play in the receiver movie.

Here is the script ive used in the sender movie (1st frame t/line):


Code:
myButton.onRelease = function() {
myLocalConnection = new LocalConnection();
myLocalConnection.send("incomingMessage", "onReceive");
myLocalConnection.close();
};


and on the receiver:


Code:
myLocalConnection = new LocalConnection();
myLocalConnection.onReceive = function() {
animationClip.play();
};
myLocalConnection.connect("incomingMessage");


Ok, so far so good. Now the problem...

I want to be able to make another button which can call, using a second button in the sender movie, a second movieclip in the receiver clip to play.

So for example the button 'myButton' will call a clip animationClip2 to play. As well as the original.

Any help would be much appreciated. Hopefully it wont be difficult to save - probs just my as-n00bishness.

Thanks again.

Local Connection And Buttons.
I am trying to get my head around this local connection thing so that I can have my buttons in my main.swf file perform actions in my submenu.swf of which is located in another html frame but am going crazy trying to figure it out.

This is very new to me. If this was in one SWF file I would be right but I need it to be broken up to fit in with the layout of the site.

Any help would be great.

So Far I have this.

The First frame of my sender file

Code:
sender = new LocalConnection();
My Button:

Code:
on (release)
{
sender.send("menu", "submenu", "services");
}
My Receiver File.


Code:
receiver = new LocalConnection();

receiver.submenu = function(arg)
{
if(arg == "services")
gotoAndStop("17");
}

receiver.connect("menu");
I have tried to piece this together from the Local Connection doco on the Macromedia website and from what I have found here on the Forum.

I am so lost with this. HELP Please someone......

Local Connection Error
Having a problem with Local Connection. It works when the 2 swf files are in the same frame, but not when they are seperate.

Any ideas?

Local Connection And Actionscript ...
Ok, I'm trying to have these two movies talk to each other. I set a local connection to pass a variable (integer) from movie #1 to movie #2. Once passed I'm jest writing a GotoAndStop() function to point to a frame, with the passed variable being the number of the frame to jump to. Here's what I have:

Movie sending variable: (this code in frame1 of actions layer)

links_btn.onRelease = function() {
jumpFrame = 2;
outgoing_lc = new LocalConnection();
outgoing_lc.send("lc_name", "methodToExecute", jumpFrame)
delete outgoing_lc;
};


Movie receiving variable: (this code in frame1 of actions layer)

incoming_lc = new LocalConnection ();
incoming_lc.methodToExecute = function (param) {
gotoAndStop(param);
};

If anyone could push me in the right direction it would be much appreciated.

-B

Local Connection Question
hi..posted a question yesterday about loading movies into an html frame from a swf in a different html frame

recieved a good answer from oldnewbie , but still doesnt cover all the angles.

I'm displaying a map in the main html frame and need to be able to turn the movies (which are loaded in levels) on and off to alter the map display..for example..load and unload the layer 'pipelines'.......all from the swf menu in the other html frame.

Hope this makes sense...heres the reply from oldnewbie yesterday..it works fine if you want to skip between frames..but i need to load and unload movies..can anyone adjust the code from oldnewbie to do this?

heres his reply...

Well in your posted code, you're not loading on layers, but levels, which is pretty different.

So you want to have this "bare" map, and add different layers (in fact levels...) on to this bare map, but you want this happening from buttons being in another frame, right?

So you're in fact talking about one .swf in a navigation frame, communicating with another .swf in another frame of a frameset, right?

Then a localConnection may be in order...

This example moves the .swf on the right to some particular frame, when a button in the other left .swf, calls it.
Simply have your added movies loaded, rather than directing the right.swf to some particular frame...

http://odin.prohosting.com/~oldnew/...l_frameset2.htm

You can download all the files, on the right side...


thanks in advance

Local Connection Method
Hi,

Can the local connection method be used to communicate between two .swf's embedded in seperate HTML pages or must the .swf files only reside on the same HTML page?

Local Connection Problem
I am new to the local connection function of Flash. Can someone please tell me why this code isn't reading properly. I am using Flash MX, and the sending movies has this code (I checked the variables and they do have data in them):
code:
lifeLC = new LocalConnection();
lifeLC.send("lifeconnection","loadlife",this.Targe tGender, this.Age, this.PostalCode);

The receiving movie (which is being loaded into a new browser window via getURL) has this code in it:
code:
lifeLC2 = new LocalConnection();

lifeLC2.loadlife = function(TargetGender, Age, PostalCode) {
tmp1 = TargetGender
tmp2 = Age
tmp3 = PostalCode
}
lifeLC2.connect("lifeconnection");

I believe the problem is in the receiving movie, but I unclear as to what it is.

Local Connection Query
Heya, I'm putting a local connection between two Swfs.

I need to put the local connection on a frame within an MC. (Is the LC command possible in Onclipevents?)

Movie 1 has a button, which launches an MC. This MC's frame tells Movie 2 to stop certain animations.

How would I go about the code to make Movie 1 tell Movie 2 to control this?:

_root.vertbar.x1.water.Stop();

Thanks!

Local Connection Initialization?
Is there a way to initialize a LocalConnection? I have a site that launches "lessons" and games in pop-up windows and then opens a LocalConnection to pass user variables between the two movies. The first time you open one of these the variable don't pass, but then on subsequent trys it works perfectly.

It works the first time running on my local machine and on our network, it's just when accessed over the web that we have this problem. Any ideas? Thanks!

Linking Two Swf's With Local Connection
I am trying to link two swf's in one web page. One swf contains a menu and the idea is that when a menu item is clicked, a photo appears in the other swf. Currently I have set the photos to _visible = false, and was thinking to set the relevant photo to _visible = true when the menu item is clicked.

I have tried to follow some guides I found on the internet, but without success.

Any help is greatly appreciated!

Copyright © 2005-08 www.BigResource.com, All rights reserved