ActionScript 2.0 :: LocalConnection - Remote SWF Sending Back Value Twice
Nov 18, 2009
I've got a problem with the LocalConnection. I've got 2 swf's and I call one to get a value which then sends it back to the first. It's working, but it seems like the 2nd swf, which is called remote.swf, is sending the value back to the player.swf twice. I've pasted the codes form each swf below. The first is the player.swf which is asking for the value, and the second is from remote.swf which is generating the code:
ActionScript Code:
var comPlayLC = new LocalConnection();
comPlayLC.send("rpLC", "received");
comPlayLC2 = new LocalConnection();
comPlayLC2.received = function(val) {
info = val.split("|");
[Code] .....
View 3 Replies
Similar Posts:
May 6, 2011
The first one (FLEX application) sends a message on a dedicated LocalConnection to a second one (Flash application). The Flash then answers by sending a message on another dedicated LocalConnection. This message is not directly received by the FLEX and the delay is at least 30s, up to 1 or 2 minutes! It seems the issue only occurs with Flash Player >= 10 and it never occurs with Chrome.
I didn't find anything on the web concerning a similar issue nor something in Flash Player release notes. Did someone already have this kind of problem?
By the way, is there any tool that can be used to sniffer LocalConnection communications?
Additional information:
swf are located in different frames swf are embed with swfobject I tried to delay the Flash sending, I tried to create another LocalConnection dedicated to this call but I always had same result: for all calls, the FLEX method is called after the same delay. I also put a timer in FLEX to periodically log to see if there is no background process delaying the method processing but everything seems fine
View 1 Replies
Jan 23, 2010
Really puzzled by the flaky behavior of LocalConnection. Using a debug utility(LuminicBox) that uses localConnection to work.
When the page containing the swf is loaded in a browser locally , localConnection works.
When the identical page and swf are viewed 'live' on a remote site, localConnection fails.
View 3 Replies
Mar 31, 2011
I have two swf files that I would like to communicate back and forth. Currently, I am able to get the LocalConnection to work one way.
But I'd like to have the 'Receiver' send info to the 'Sender' and back again and again.
View 1 Replies
Oct 29, 2011
I succeeded in sending typed objects from a PHP application to a flex front-end using Zend_AMF as per this question. The problem I am facing now is that I would like to send a typed object from flex to PHP and on the PHP side, be able to receive it as a typed object instead of stdClass.
Here is the class in flex:
package com.mysite{
[Bindable]
[RemoteClass(alias="CTest")]
public class CTest {
public var stuff1:String;
[Code] .....
After some testing, I removed the namespace from the PHP object and moved it into the global namespace. This seems to have resolved the issue. I have tried setting RemoteClass to modules estingCTest and also modules.testing.CTest. $_eplicitType was then set to the same value for both tests. The result is that when I use modules.testing.CTest, this is the classname that Zend_AMF sees. If I use namespace notation, Zend_AMF sees modulestestingCTest, as all the slashes get stripped out. But how can I get this working with php namespaces?
View 1 Replies
Jan 28, 2004
Basically I have a little app where a pop up palette contains dragable movie clips that then are placed on the main stage. However when the palette pops up for a second time it remains behind the placed movie clips. The clips have to be on top of the palette initially, but something like on release swapDepths?
View 14 Replies
Mar 25, 2008
I've created a rectangular box with actionscript (code follows) and I need to make sure this stays in the background - so all other movieclips and symbols are visible when they are positioned over the top of it. I guess it's using the swapDepths function although not sure?
this.createEmptyMovieClip("rectangle_mc", 10);
rectangle_mc._x = 15;
rectangle_mc._y = 285;
drawRoundedRectangle(rectangle_mc, 520, 100, 15, 0x2C79BE, 100);
function drawRoundedRectangle(target_mc:MovieClip,
[Code] .....
View 3 Replies
Dec 20, 2011
basically im making an image gallery this is what ive done so far imported all of my images that i wanted to use and converted them to movie clips ive put these movie clips in another movie clip which is masked with an instance name of master_mcthe images are placed on top of each other so it looks like a stack of photos what i want to do is when the user clicks the image on the top it should send it to the back of the stack of images and continue to do this for all photos
View 8 Replies
Jan 28, 2004
Basically I have a little app where a pop up palette contains dragable movie clips that then are placed on the main stage. However when the palette pops up for a second time it remains behind the placed movie clips.
The clips have to be on top of the palette initially, but something like on release swapDepths?
View 14 Replies
Feb 11, 2009
Is there any way to send data back to flash after using a FileReference upload? Basically I'm uploading an image and I want my PHP script to return some information back to flash after the upload.
View 2 Replies
Sep 24, 2009
sent form data in Flash to a PHP script before and then read in a variable (say a user id) that gets passed back by the PHP. simple enough.but if the script passes back XML, how do i read that in?elow is the code i've used to send PHP a name and an email address and get back a userid, but i'm not sure how to go about writing the code if the script is passing flash a chunk of XML instead?
ActionScript Code:
var userRequest:URLRequest = new URLRequest("saveUser.php");
var userLoader:URLLoader = new URLLoader();
[code].......
View 1 Replies
Dec 16, 2009
I had posted this in the PHP section but think it may be more relevant in Flash as have'nt had any replies yet..I have been asked to create a photo canvas website that allows users to upload an image, then apply several effects such as re-sizing/cropping/desaturate, then viewing the updated image on a generic wall and going to check out to buy the canvas.I am pretty new to web developing/designing, i am confident with html,css and actionscript to an extent, but have only used small parts of php before.My biggest worry is how to go between html > php >flash >back to html again.From what i understand i need to create the following functions:
1. Create a general html website which will store the upload form and flash photo editor swf on, when the user first access's the site i start the php session...
2. The user then uploads there image to the server using a simple php upload form which will store the file and create a unique named file also on the server...
3. The flash editor swf will then load up on the html page. Inside the actionscript of the swf i will tell flash to continue with the php session by calling it again and call users image on the server with the 'file reference' command. The editing functions such as cropping, canvas size will all have variables to mark what the user has chosen and these varaibles will get ent back to the html page using php to keep track of them for the checkout process...
4. Once the editing has finished the user will click 'finish' in the swf taking them to the php shopping basket/checkout which will call the variables sent in flash to determine final cost depending on what effects chosen.
Is the above correct and more importantly is it possible? The main part i am struggling to get my head around is editing in flash (say changing the uploaded image to 20 x 26) and then saving this back to the server and sending the new settings back into the html/php page.Is this all possible without using database and tables such as MySql?
View 0 Replies
Sep 22, 2009
I'm now finding the great need for classes as my current project is getting quite gummed up with too much scripting in the main document. Becoming a real pain to find stuff with in my code.
So I started writing a class to takes an id passed to it from the main time line, accesses my mySql DB, pulls the related info and the processes it. What I can't seem to figure out, is how to pass a variable back to the main time line. The traces all work, so I know my class works. I've searched here and via google, but I must not be searching the right stuff because I get a lot of results with are usually very complicated questions that don't yield the answers I need.
so here we go. my main.fla (and question):
Code:
import Name;
var theUserName:String = "Joe";
var processName:Name = new Name(theUserName);
[Code]....
ps: what's it called when trying to call a method from the main time line? or passing a property back to the main? are there specific terms for these?
View 10 Replies
Feb 4, 2010
I have multiple frames with stop-points and labels on my timeline and an action where if the user holds down the button for >1 sec it will go to one frame, if <1 sec it will "gotoAndPlay" a warning animation. after that animation plays i want them to be sent back to the initial frame that they were previously in.
View 3 Replies
Dec 21, 2009
I have a picture upload function in my flash and when I upload a picture I lose focus on the flash. This results in that all my listeners disappears. I cant click buttons, use dragbars etc. This only happens in FF. Im using flash player 10 and Snow Leopard. ive tried to get the focus back by sending a call to javascript:
[Code].....
View 2 Replies
Mar 8, 2012
We're writing a flash application that can download a MP3 file, convert it to a Sound object, get the raw data and make some processing (like adding sounds, change octaves). After the processing, we want to send the data back to the server in chunks, so the server will be able to glue the data together and recover the new generated file. The problem is: if we send to the server "wav" pieces of sound, we are able to glue them together without any problem in the generated file. However, if we convert each wav piece to a mp3 file (so we can send a smaller file to the server) and join the mp3 files at the server, the result is a sound with some problems at the merge point.
This is how we load the mp3 file from the server:
sourceSnd.load(new URLRequest("sample url to mp3"));
sourceSnd.addEventListener(Event.COMPLETE, carregou);
This is how we convert each piece of mp3 to bytearray and wav:
[Code]....
View 1 Replies
Feb 21, 2008
I have a relatively simple localConnection between three swfs: one swf is an image gallery; another swf controls the playback of the image gallery; and the third displays xml-driven captions from the image gallery.Everything works flawlessly in a PC environment, on all browsers, using AS 2, flash player 9. But when I test in a mac environment, the captions will display on load, but it will no longer show if you refresh the page; only a cache clear and refresh will bring it back, but the same issue will happen again. The navigation doesn't work at all, ever (though the swf is loaded and visible).
View 4 Replies
Nov 29, 2009
I have a Flash object on my site, which has this code:
this.ld = new LocalConnection();
this.ld.allowDomain("*");
ExternalInterface.call("alert", this.ld.domain);
It alerts my domain successfully. However, what I want is to access the HTML DOM through this using LocalConnection and not ExternalInterface directly.
View 1 Replies
Apr 23, 2009
I'm having a little issue with LocalConnection - trying to communicate from one SWF to another. From my main SWF I've loaded an external SWF of same dimensions ( effectively replacing the main SWF). What I wanted was then to re-load the main SWF, but rather than have the main SWF play from the start, I wanted to go to a specific frame instead (I used a frame label called "myMarker"). Thought LocalConnection was the way to go to achieve this. Gave it a shot and it all works well locally BUT when uploaded to server it doesn't work, but throws the following error:-
[Code]..
View 1 Replies
Feb 12, 2009
limits to number of SWFs that can establish local connection on MAC? The architecture is: One Manager ("server") and N number of other SWFs that communicate with the manager.When I embed more than 8 SWFs (manager + more than 7 dependents) and attempt to establish connection between them - only first 7 dependent swfs are capable to communicate with the manager on MAC (both Safary and FF). The rest are ignored. It doesn't seem to be an issue on PC where I went up to 20 and it worked (with some quirks of course). Is it a native behavior on MAC?
I did not check if number of connections is at stake (as opposed to number of swfs). There are 14 connections all together when 7 dependents are involved.
View 1 Replies
Sep 23, 2009
I'm having huge bug issues with LocalConnection that nobody seems to be able to find errors in my code/files. So... I'm looking for an alternative. I need a main swf file to load an external swf including the ability to have it move from one frame to another. If this isn't a possibility, I can also just have the main swf hide/reveal a div or just an image in the html.
View 9 Replies
Jun 29, 2011
i use LocalConnection between two swf in the same page.What i'm trying to do is to use a String sent from one swf to the other, as variable into my URLRequest...So i can trace "myVar" into the function chemin, but i didn't find how to use it into URLRequest
swf that receive the var :
var lc:LocalConnection=new LocalConnection();
lc.client=this;
lc.connect("callBig");[code]....
View 2 Replies
Aug 19, 2010
I need dozens of AS2 Flash swfs I wrote to communicate with an AS3 swf. My code below is on the "wrapper" AS3 swf, which loads the lesson1_activity3.swf AS2 swf. This is then further nested into an Adobe Captivate-generated swf (that's what the rdcmndNextSlide method is for).
This configuration works the first time you see the wrapper/child swf together, but if you navigate back to the slide, the child swf doesn't load. I'm guessing that Captivate has all the objects still stored in memory, so it thinks I'm trying to declare var again, which I can't do. Is that it? Does anyone see the issue with my code that would make it work the first time the wrapper is loaded, but not subsequent times?
[Code]...
View 0 Replies
Feb 18, 2004
ere's what i'm doing and it doesn't seem to work, 1st movie, a button:
[AS]
on (press) {
function () {myLocalConnection = new LocalConnection();
myLocalConnection.send("Incoming", "onRecieve", MyID);
myLocalConnection.close();};
[/AS]
where MyID is some variable
2nd movie, 1st frame:
[AS]
myLocalConnection = new LocalConnection();
myLocalConnection.onRecieve = function(theID){
_root.test.gotoAndPlay(theID);}[code]...
now that doesn't work so i'm wondering what is wrong...
View 2 Replies
Jun 5, 2006
I have 2 swf... and it just deosn't want to work, the Receiver is supposed to play a video..
Sender:
Code:
buttonsLC = new LocalConnection();
b_005.onRelease = function() {
buttonsLC.send("lcMovBtn", "methodToExcecute");
[Code].....
View 8 Replies
Jan 2, 2007
i've got 2 different .swf files on a html page, with 1 of e .swf being e menu and the other being the content_mc. I've been researching on localconnection but did not manage to find out how i could get e menu to send command to the content_mc to load the respective content upon being clicked (for example, when user click "services" in the menu, content_mc.swf will automatically be updated with the services content.
View 6 Replies
Feb 17, 2009
how i can pass a bitmap data through a local connection in as3.0 and get it on the other end intact ?
View 3 Replies
Aug 17, 2009
I have had some success using LocalConnection between SWFs.I can have a connection function between a preloader SWF and its child, and another connection work between two SWFs present on the same webpage......most of the time.
If I run my SWFs in a webpage from my localhost (ie my local testing PC) a particular LocalConnection will fail about 50% of the time. If the same SWFs are run on a remote server (ie the inernet) the LocalConnection works 100% of the time.SWF 'A' is sending to SWF 'B'Bizarrely, the LocalConnection going the other way, from SWF 'B' to SWF 'A' works 100%.
All the other LocalConnections I have used all work 100% of the time.I have tried adding a listener to the eventStatus which reports when the connection fails.I have also tried allowDomain(), although Im not sure it is neccessary since all the SWFs are hosted from the same domain anyway.Why should a LocalConnection behave differently depending on where the SWFs are hosted?
View 1 Replies
Dec 4, 2009
I have two SWFs happily sending messages back and forth to each other. I want to intercept those messages with a third SWF without editing the first two files at all.
View 8 Replies
Jun 19, 2009
I want to communicate with the LocalConnection framework of Flash via C#/Java/C++. My search for already implemented wrappers was not as successfull as I wish ;). There exist several servers (like FluorineFx) which support binding of C# objects to the LocalConnection. The problem is I am not looking for a server but only for a simple (marshalling of strings is enough) wrapper. After reading the AMF specification that implementing my own wrapper might take some time ;) which leads to my question: Does anybody knows a simple wrapper (C#/Java/C++) for the LocalConnection framework?
View 2 Replies