ActionScript 3.0 :: How To Communicate With Embedded SWF
Mar 12, 2009I have a large.swf that loads small.swf during the runtime. How do I call a function in small.swf from large.swf and vice-versa?
View 4 RepliesI have a large.swf that loads small.swf during the runtime. How do I call a function in small.swf from large.swf and vice-versa?
View 4 RepliesI'm working on a game where the the engine is made in AS3, yet the interface is made in AS2. Basically I am embedding the GUI as a AS2 .swf into my main AS3 .swf. I want the AS2 GUI to be able to communicate with it's parent. Small Interface calls like Pause, Unpause, Upgrade.I tried to use External Interface, but I can't seem to get it to work. I know it's made for Javascript, but I thought that it would work just as well with AS2 to AS3.I'm able to edit the Interface file and have the FLA for it. It'd just be a real pain converting it... It'd take way to long to convert the FLA to AS3, talking weeks here, it's rather large.
View 3 RepliesI'm programming my game using Flash Builder 4, in an "ActionScript project". I'm not using Flex. I want to build my menus and cutscenes in Flash Professional, then export them as SWF and embed them into my final project.Embedding the SWFs works fine, I do something like this:
Code:
[Embed(source = 'test.swf')] private var SwfClass:Class;
var myMovieClip:MovieClip = new SwfClass();
parent.addChiled( myMovieClip )
My problem is that I can't access the buttons and other elements of the SWF that I need to communicate with and manipulate. For example, the main menu will have a "Play" button. I need to know if that button has been pressed. The level select screen will have a "Best Time" text field, that should show the player's best time on a level - this text needs to be set. But I can't figure out how to access these things.
I don't think that the children of the MovieClip are visible within my Actionscript project - it seems like the SWF is loaded in as one big "chunk" that can't be interacted with (it plays fine though).So what is the best way to interact/communicate with an embedded SWF? I've found a bit of information on the topic, but usually people are talking about using Flex or loading in external SWF (which seems to behave different from embedding). Is there even a way to do this?
i am creating a survey with say 7 questions. each question has the same MovieClip symbol each with a different instance name, like q1, q2, ... q7.
the MovieClip symbol has 5 static texts and 5 SimpleButtons. i have some code in that symbol to make sure that only a single button has the "on" or "checked" state to show that that one is chosen. this works great.
my question is, how do i communicate each user choice with the main timeline after the user hits the "submit" button? or, how do i have code under the "submit" mousedown event that can iterate through the 7 symbols to query each one and see which of the 5 SimpleButtons is "checked" or "on". this iteration will then create a list of responses for all 7 questions.
ultimately, i will have flash concatenate a GET POST string that will send the survey results to a web server.
I am trying to communicate between an instance of flash embedded in a browser and a flash instance running in a C# WinForms app... I am getting a compile error that say:
1119 Access of possibly undefined property printOut through a reference with static type flash.net:LocalConnection
Here is the actionscript:
var feedback = "";
var receiving_lc:LocalConnection = new LocalConnection();
receiving_lc.connect("fromClient")
[code]....
I'd like to gain read only access to the following parameters of embedded Flash videos located on sites that I do not own through my own custom browser extension/add-on:
Time location of playback head (so I can display the current time in the browser extension via HTML5/JavaScript) Frames (so I can make capture them to an image file, save it and display image in browser extension) Original Dimensions in pixels (so I can display the original video dimensions via JS/HTML5 in browser extension)
Is this possible by using Javascript and HTML5 from a browser extension?
Would I have to use something like the SWFObject Javascript API [URL]
I made a flash mp3 player and it works fine in any other test pages. but when i embed it onto my site it just shows blank. what do i do? my site is [URL] and the flash player i tested here [URL] and it plays. What im i doing wrong? i tryed everything. right now i just got it in a iframe but i dont want that iframe.
View 1 RepliesLooking at the attached file, why does bottomScrollV give me the wrong value when the text is dynamically embedded and correct when manually embedded?
Here's the code:
ActionScript Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoad);
loader.load( new URLRequest("info.xml") );
[Code]...
We are developing a Flash application based on Windows CE 6.0 R3 and the application is intended to work with Adobe flash plug in available in WinCE R3 Internet Explorer. Application need to communicate with middleware libraries written in C/C++. Flash screens uses Action Script 3.0. We would like to know how a Flash application (Action script program) can communicate with a native (C/C++) dll/lib?
View 1 RepliesIs there any way I can have an integration between Flash AS and C++? Let's say I have created a socket using C++ and multi-casting it to several ip addresses.
On one of the IPs I am running a Flash client. Can I receive the Multicast message (sent by MFC/C++ application) through my Flash application.
Or at least can I develop a Flash plugin (menu item) using C++?
The Flash site I am building includes an FLV video which is embedded into a SWF (SWF1),which contains the video control components. SWF1 is in turn loaded into another SWF (SWF2) after SWF2 is launched. After I leave the part of SWF2 which contains the video, the video and audio continue to play. You can still hear the audio after you have moved away from the SWF1 video.The SWF1 video is part of a set of mostly PNG images that slide like a slide show along the X axis. When I hit the forward arrow, the SWF1 video slides out to the left and a loaded PNG image slides in from the right and into view. But you still hear the audio from SWF1 and the video continues to play.All of the loaded SWF video (there are three total) and PNG images are loaded into the same movie clip.Question: How can I tell the FLV video embedded in SWF1 to stop playing once SWF1 has moved out of view? I would like SWF2 to tell SWF1 to stop the video.
View 2 RepliesI'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]..
I was able to use LocalConnection to have 2 swfs communicating when both sitting in the same PC, or upload those on to the server and accessing those from the same PC. Is there any way to do this between two PCs, one PC running send.swf, controlling another PC running receive.swf? I checked adobe site for LocalConnection and it looks like this only works within one client PC.
View 2 RepliesI have written a flash program using AS3 which allows the user to build a picture of a product using a variety of options displayed in checkboxes. Very simply these checkboxes either make a layer visible or invisible in my flash movie and certain choices may change the list of options. This information is currently being supplied by XML. Once the user has built his product, I would like to be able to save his choices in a SQL Server database and also be able to download his options again at a later date and view these choices at the manufacturing plant.
So far I have tried using asp.net to write to the database and have got the information to the asp.net program by using the querystring, however there may be up to 50 options which does make a querystring rather unwieldy. Also I cannot seem to send back information from the asp.net page to my actionscript.Can anyone tell me how to do this or give me an example? I am supposing that I use the response.write function in asp.net but what command in AS3?I looked into the possibility of using a webservice but see that AS3 no longer supports this as all the functionality is in Flex. I have read about Flex but still do not understand whether
I'm new to as3 programming and I'm trying to communicate between two classes to get the player coordinates for a game from one class to another class. I tried using a getter and a setter and calling a class public function that returns the value.[code]...
View 3 RepliesWhat is the best way for flex frontend to communicate with backend writted in C#? The only communication channel in HTTP, so no custom sockets.I used SOAP in the past, but am concerned about performance since the large overhead of xml, and this application I'm currently working on will be pretty data intensive.Anything that supports easy setup and transparent marshaling/unmarshaling is OK.Is there something as BlazeDS for .net?
View 2 RepliesHow can you communicate with a c++ app in flash?
View 1 RepliesI 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]...
I need to write or pass some variables from swf 1 to swf 2. This doesn't have to be done in real time and this is not going on a server believe it or not. All local. ie, swf 1 is the backend that sets variables for swf 2 to read. swf 2 can be started after swf 1 is done. Was thinking that swf 1 could write a text file and then swf 2 could read it... but was wondering if there was a better/easier way to do this? Also, swf 1 doesn't have to be a swf! If I could create an interface in html or something to allow the variable passing that would work too..
View 3 RepliesHow you can communicate between class's. E.g. Assessing a function from 1 class in another. And accessing variables from 1 class to another.
View 9 RepliesI am still wrapping my head around AS3 classes and how to use them..i want to know how classes can communicate with each other and send information to each other? Below I have created an example of 2 classes inside of a package. When 1 class is finished it triggers the other to start.
Code:
package
{
import flash.utils.Timer;[code]........
How do I get a targeted mc to communicate with the parent timeline? I'm not using levels but targeted mc.
I need the playback head to go from the targeted movie clip (this is called nested, correct?) to the parent timeline and stop at a particular movie instance or frame label. I have been unsucessfully using this:
gotoAndPlay(_parent.instancename);
i am currently working on a flash site, and i want to know that if there are possible ways that i can pass a value(better be a string)to the function of the external swf movie file that loaded by loadMovieNum(1.swf,1) function?
View 3 Repliesi'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 RepliesIs there a way I can communicate through sockets in flash mx? I'm really really interested in this domain..
View 2 Replieshow do I get my child swf to communicate with my main swf?
(this is main1.swf)
var homeRequest:URLRequest = new URLRequest("window1.swf");
var homeLoader:Loader = new Loader();
[Code]....
Obviously, MovieClip(root) is not getting to the main.swf's root timeline. What code do I need to do this?
I started learning the basics of as3.0 a year ago by doing a lot of experiments.. I never read a book or took lessons or something.. I guess i'm still missing important logics when i'm programming. I'm creating my personal flash imagegallery but I can't figure out how to communicate between a loaded swf and its parent swf.
I have a main.swf file with document class main.as which loads external swf files into a movie container. I am also loading a background sound like[code]...
The only work around I was thinking about would be to keep showing the stop/start sound button from the main.swf when a slideshow instance is called.. but then I'll screw up my design I want a second button inside the slideshow that can also stop the main bg sound.
I'm creating a website template which has a navigation with links and 2 zones dedicated to load external contents.
Loading 2 external swf by clicking on a link is no problem but my question is :
I would like one of my external swf to contains links which could again reload external swf in the same two zones. How can I do that ? I'm working with document classes.
A little example :
ZONE A ---------- ZONE B
EXT SWF EXT ---- SWF WITH LINKS IN IT THAT RELOADS ANOTHER SWF IN
ZONE A ---------- ZONE B
I am working on a flash game and want two swf to communicate with each other. I tried local connection but dont know why sometimes it doesnot work.
View 1 Repliescommunicating in as3 with an server via TLS? (I have on a server an mp3, and the server is HTTPS that requires an certificate and a key (TLS) and I need to get that mp3 on flash) I found some classes (Crypto) but there the TLS it's only partial implemented and support for client-side certificates is not implemented yet.
View 2 Replies