i am creating portlet project and one of my portlets has embedded swf file in it.so i foud out how to send datas from portlet to swf,now i need to know how to do it in backward direction i.e. to send data from swf to portlet
How can I programatically determine what the background color of my portlet will be before it's rendered? (ie in the init() or doview() functions). I want to make an embedded flash movie look transparent-ish by having it's background color (which I can set programatically) match the background color of the portlet. but the portlet's background color could be anything depending on the overall portal theme or by the color manually chosen by the user in the "look and feel" setup.
I have a communication problem between to SWF. Here is my code, SwfA is the caller :Shared interface between the 2 Swf :public interface ItfA { // some code} In the second Swf, SwfB, the document class :
public class MainB extends MovieClip { private var a:Itfa; public function start(_a:ItfA) { a = _a; // etc }}
In the first Swf, SwfA:
public A implements ItfA { var mLoader:Loader; [...] public function startLoad() { mLoader = new Loader(); var mRequest:URLRequest = new URLRequest("B.swf"); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onprogressHandler); mLoader.load(mRequest); } public function
[code]....
When I test in the fash environment (ctrl + enter), there is no problem, but in my browser it failes and says that A is not an ItfA (TypeError: Error #1034)
I am using localconnection to communicate between 2 standalone swf. It works. I want to communicate between standalone swf and from browser/ from exe. Currently i cannot achieve this. How can achieve this?
i was developed one .net application. It contains flash animation in one of the asp pages. And i need to write action script code for playing and pausing that swf file. I am using flex builder3. However how can i execute the asp application from flex builder? How can i load asp page into mxml file?
Im develp. a site with a remote control, and television pop ups, can i use the remote to communicate with the tv? I think i may have a proper (yet typically teedious) method but in these situations,
I have read a few things on 2 way communication for as3 to php but most of the examples are a bunch of var's being sent. an example of AS3 sending 1 var out to php and php receiving it. how to go from PHP to as3 just not the other way!
I am having one html including table in it.In one cell of table i have 1.swf & in another cell in table have 2.swf.Is there any way to have communication between these two swfs? Like in 1.swf - have one play button with on clicking will play animation from secong swf.
i want to ask someone to give me some enlighment between communication between SWF..,let say i have one main swf (parentSWF) which load another swf (let's call it loadedSWF)what i want to do is calling parentSWF calling function which is remain in the loadedSWF..,please do mind i am talking about desktop application and not browserapplication..,
I recently made a mp3 player in Flash. I have an aspx page that has the mp3 player in it as well as a .net button which is disabled on page load. The .net page tells the audio player waht file to play and the player plays. What is supposed to happen next is when the audio player reaches the end of the file the button on the aspx page is supposed to become enabled. I am not sure how to do this [have Flash tell the aspx page that it is done playing].
I have 2 flex apps on the same page. I want them to be able to call each other's public functions. I am thinking of using either externalInterface calls or FaBridge to do so.
I am not any kind of network programming pro, but it happened that I have faced necessity to develop socket-server on php (no way for using Java) for flash multiplayer browser-game (standard features like locations, team battles, etc).
The main problem is that TCP is point-to-point protocol and it completely occupies given port.Of course it is possible to create some kind of queue, which will manage connections to the socket, but this solution doesn't seems to be the fittest one.
It seems to me that using interval of "fair" ports (from 2000 to 2200, for example) is more fitting solution, because one request may take a lot of time to execute and players won't be happy to wait in queue.
But how can I implement this "port inteval" strategy?The solutions that I see are:
launcing php-script per every port (he-he, 2 hundreds of launched scripts!);somehow forking the initial process to new processes (2 hundreds of processed? Not nice too), one for every port;additional while-loop, which listens all the ports (looks very bad);using threading or something like that (the problem is that php is single-threaded, as far as I know; pcntl?).But somehow I don't like any of them, or at least don't know how to implement them in the best possible way.
What is the best existing strategy to handle multiple requests from multiple users per time unit without delays, and how to implement this strategy in php? We have our own Debian-server, so it is possible to use any required php extensions.
For example, if we are trying to develop chat application, we need some sort of fixed (I mean persistent) connections for each user. For example, we have 80 users in chat, and then one of them posted a message, which server tries to handle and send to all other connected users, also putting an entry to the history file or something like that.
In this situation polling server for new messages every 10 seconds from each of 80 users is craziness, so the need in persistent connection gets obvious.But I don't know what is the best way to implement something like this, considering that not all requests are handled instanlty.
I always have the trouble that make different classes communicate with each other.
1. using get set methods
2. eventdispatch to dispatch custom event.
Today, I am working on this confused issue again. I still can't get through it.this time what I wanna do is this: I wanna use a button (_zoom) to control a mc (_board) located in different class. Let's me give a simple structure for you:
I have two web applications written in Flex I would like to integrate. I would like one Flex app (let's call it application A) to invoke second Flex app (let's call it application B). Application A has access only to swf file of application B (not source code). When application A invokes application B, it should be able to pass some data to application B. After application B is invoked it should be able to pass some data back to application A. These two applications will be hosted on the same server, but will use different server code.
The easiest way of implementing this (or one of the ways to be more precise) would be to have UI element on app A (button, link, menu item, etc) that would invoke app B. But in that case, two Flex applications couldn't communicate directly (since only one is active at a time), and they would have to communicate through server code, which is something I would like to avoid.
In short application A should invoke application B, pass some data to it. Application B should do it's work, display some content, and have a mean of passing some data back to application A. I'm aware of LocalConnection, and I've seen similar question, but in that case I would have to have both application in the same browser window. This would be acceptable to some extend, but only if app B is contained in app A (not if they are both on the same HTML page). Would LocalConnection work in that case?
Do you have any recommendations on how to implement this kind of communication?
Im building my first OOP project with classes in AS3, Ive done a lot of tutorials and Im grasping the concepts well. Im just having trouble with the concept of communicating between classes. Whats the best way for a class to talk back to its parent once its instantiated? It seems when your inside a class, you're kinda stuck there as far as scope goes? ie one way street. Or am i missing something? Im used to the days where I was coding on the timeline and could just use this._parent etc. But obviously those days are gone.Or should I not need worry about this If I have planned the structure/heirachy correctly?
To have two separate movies embed in an html and communicate the two.Let's say I have a button in movie#1 that makes movie#2 jump to frame 10. I'd like to know if this is possible without creating a swf holder for the 2 movies. Just communicating them being independent.
i'm building this site and the client as usual is been a hassle. After developing half the site now he wants to have some extra features. So the problem is, i have a menu in flash that loads content into an iFrame. Now i need to make the swf go to a diffrent scene by pressing a button located in the iFrame and at the same time the button has to load content into its parent iframe, i've read several similar posts in different forums but none seems to work for me.
I'm trying to control the animation between 2 SWF files contained on a same webpage. SWF-1 should pause its animation upon reaching a certain frame and play SWF-2. Then SWF-2 should also pause its animation upon reaching a certain frame and should play SWF-1 from where it paused. I managed to establish the connection from SWF-1 to SWF-2 and its working up to this point.
I have a function that triggers from a click.I'd like that inside the function it refers another movieClip as reference only, not target.
Example:
1 - 2 - 3 ( three movie clip buttons)Each 1 , 2, 3 button has a highlight in another LAYER (its with visible false);I made two arrays (one for the 123 buttons and other to the highlights).The e.target functionality apply to the 1 2 3.. I want to apply it to the target (movieCLip) for each 1, 2, 3 button and also identify that the current highlight is the highlight from the clicked button! I don't know how to refer it without e.target. As far as I know to target it as a reference inside the Click Function the 1, 2, 3 loses the functionality and when I try to refer the highlights with some target it comes undefined when I trace.
how to get this to work. So I have 2 .as files (ImageMain and FullScreenImage)And in the fla file I have a movieclip on stage called menu and this fla is linked to the ImageMain.as
ImageMain.as (part of the code):
Code: package { import com.gfxcomplex.display.FullScreenImage; public class ImageMain extends Sprite { public static var menuIn:Number=-113;
[code]....
When I run the " red" code I get the next error:1120: Access of undefined property menu. It looks like the imported FullScreenImage.as cannot acces the menu movieclip on the stage.
I'm wondering if any of you gurus could tell me about the possibilities of communication between two .swf's. I'm used to using localConnection, which works great in many situations, but I'm wondering if there are any other options, or better ways.Both .swf's have their own document classes as their entry point. The scenario is this: I'm building five different applications, and all five end up on the same, rather complex and webshop-like endpoint. As I don't want to build the last one five times, I'll have all five apps load the same shop swf, which then becomes a child on top of the original app.How would you design the interaction between those?
I want a website to have two independently embedded swf files, the reason being: I want one anchored to the center, and the other anchored to the left side. However, I still want information to be communicated between the two. How could I do this?