Flex :: Application Interaction With Loaded Flash SWFs

Dec 14, 2009

I am creating a Flex application with a component that displays various dynamically loaded SWFs, one at a time (kind of like a kiosk). These loaded SWFs are created in Flash IDE, not Flex. They will not be created by us (we will provide a .fla template but that's it), so I am loading them into a separate SecurityDomain.

My Questions:

I want the application to be able to call methods inside the loaded SWF. To do this, would I just call Security.allowDomain("domain original app was loaded from") in the startup process for the loaded SWF? I want the loaded SWF to be able to throw events that are caught by the application. Can I accomplish this through the SWFLoader.swfBridge property? I am defining an interface for the methods inside the loaded SWF. But, I don't want to leave the implementation up to the customer. Instead, I want to provide another SWF that contains the interface implementation and have it be a constraint that the customer includes it in their SWF. I am not very familiar with the Flash authoring environment, how would it work so that the interface implementation SWF exposes its methods in such a way to be accessible to Flex? Is there a way to sign the SWF so that the Flex application knows that it is dealing with the original, not a spoof? How would the Flex code pass in arguments, since it is across SecurityDomain boundary -- is there marshalling involved (say if I want to pass in a Dictionary or some kind of object graph)? The Flex application may load hundreds of these smaller other SWFs during its lifetime. How do I make sure it doesn't keep using up more memory? I plan on using SWFLoader.unloadAndStop() and clearing all references in the Flex object that refers to it. Is this enough? Will the AppDomain for the loaded SWF be torn down automatically so that the class definitions are no longer in memory?

View 2 Replies


Similar Posts:


Flex :: Interaction Between Main Flex Application And Component?

Apr 30, 2010

I made a login component for my flex 4 application, and i load this component from my main flex application with:

<ns1:Login id="page_login" visible="true"></ns1:Login>

Now i want to change the visibility from true to false, from the login component.

View 1 Replies

ActionScript 3.0 :: Communication With Loaded SWFs, Application Development?

Apr 7, 2009

I am currently in the process of developing an application with Flash/AS3. I have worked a lot with AS3 (FlashDevelop) before so I am rather familiar with it, however, since I won't be the one designing (nor the only one for that matter), and because it isn't a one day job, it is important to be able to get some structure in the project. So that we can have a "core" of AS3 that loads SWF-files and then does the interaction with the loaded SWFs, like providing information for fields and submitting the data, etc.
 
However, I've searched and I can't find any good up-to-date information on how to actually take care of the communication with the loaded SWFs. I found a lot of tutorials on it, but every single one ended up simply not working or being "depreciated" by the compiler because they were built for earlier versions of AS2/AS3 or Flash. (I found this promishing guide: [URL].. but that too ended up being depreciated) The only working piece of information I've found is LocalConnection, but it is really not well-suited for this, and from what I can tell a very complicated way to go about things.
 
So my question is how does one go about implementing the communication between AS3 and the loaded SWFs?
Being able to dispatch events or call functions both ways is basically what I think is necessary.Or perhaps there are better ways to go about application development with Flash?

View 3 Replies

ActionScript 2.0 :: Combining .swfs - Using The LoadMovie With An Interaction?

Nov 19, 2007

I'm building a banner with 5 separate themes for a website. Instead of using scenes and bulding a single .swf, I figured I would build 5 separate .swfs, then when one finished playing it would be unloaded and go to the next .swf. Then finish at, say, 5.swf. There is no user interaction (onPress, etc.).I can't seem to find an A/S method for doing this. Most of what I see is using the loadMovie with an interaction.

View 14 Replies

ActionScript 2.0 :: Interaction Between Loaded Movies

Oct 23, 2003

i have my loaded .swf buttons loading 'movie1' and 'movie2'. both 'movie1' and 'movie2' have a tween in frames 1-5, which is a box that slides open and is stopped. in frames 6-10 the box slides backwards in the opposite and dissapears. i would like it if 'movie1' is open and the user clicks the button for 'movie2', 'movie1' plays 6-10 and then loades 'movie2' and vice versa. i just don't a script for this function.

View 7 Replies

ActionScript 2.0 :: Interaction With Loaded MovieClips?

Jul 25, 2005

I have a Central.swf witch inside there are:

-a menu with a lot of buttons;

-a dummy1 movieclip that works to load a submenu of the menu (the submenu is a .swf file);

-a dummy2 movieclip that I want to load a photo by pressing a button of the submenu;

I can't load a jpg or a swf in dummy2(in central.swf) by pressing a submenu button.

View 3 Replies

ActionScript 2.0 :: Interaction Between Loaded Movies?

Oct 23, 2003

i have my loaded .swf buttons loading 'movie1' and 'movie2'. both 'movie1' and 'movie2' have a tween in frames 1-5, which is a box that slides open and is stopped. in frames 6-10 the box slides backwards in the opposite and dissapears.i would like it if 'movie1' is open and the user clicks the button for 'movie2', 'movie1' plays 6-10 and then loades 'movie2' and vice versa. i just don't a script for this function..

View 7 Replies

Flex :: Keep A Loaded SWFs Stage Property Localized To That Swf?

May 24, 2010

Does anyone know of a workaround for loading an AS3 swf into an existing AIR/Flex (Flex 3) application and having the loaded SWF retain its own reference to its stage (not the loader's stage)?

I've tried the loadForCompatibility property on SWFLoader, but that isn't giving me the behavior I'm wanting. The loaded swf still has the main AIR app's stage set.

View 1 Replies

Flex :: Record User Interaction In Flash App?

Apr 30, 2010

I am looking for a way to capture the user interactions with a text input control in Flash over a period of time (not a screen cast)?For example: If the user enter some text, then delete, then enter something, I would be able to store that interaction as it happens and replay that later.

View 2 Replies

Actionscript 3 :: Flex - User Uploaded Audio Swfs Makes The Parent Application To Run At Higher Frame Rate

Feb 3, 2012

I had been developing one Flex application , in that users are allowed to upload there own swfs . The problem is, my application has a frame Rate of 11 , if the user tries to upload the swf with higher frame and audio with it( ie Framerate of 24 with AudioFLV ). this makes my application to run at the higher frame rate of that same user uploaded swf.

View 1 Replies

ActionScript 2.0 :: CS3 Buttons In Loaded Swfs Loading Other External Swfs Into The Main Timeline?

Sep 11, 2009

I have a main fla file which loads an external swf into an empty movieclip on the main timeline which works fine but I want a button in the external swf to load another external swf into another empty movie clip on the main timeline.eg. start.swf loads UKEIAMap.swf into (empty movie clip within start.swf) MapLoader_mc then a button havant_b within UKEIAMap.swf needs to load HavantProjectSheet.swf into (empty movie clip within start.swf) ProjectSheetLoader_mc without unloading UKEIAMap.swf

View 3 Replies

Flex :: Demonstrate Many Of The Specific Graphics, Animation, And Interaction Capabilities Available Using Flash CS4 Pro?

Jul 28, 2009

I am looking for an app or apps which I can use to demonstrate many of the specific graphics, animation, and interaction capabilities available using Flash CS4 Pro. Basically something just like the Tour de Flex app only for Flash CS3/CS4 Pro. The Adobe site has a sparse set of some examples, but again I am looking for something more comprehensive like Tour de Flex.

View 1 Replies

ActionScript 2.0 :: Loading Other Swfs From Loaded Swfs?

Aug 2, 2006

Flash - 8 : Above is an example of what I would like to do/have done. I've gotten as far as loading the "loaded.swf" into the "start.swf" but my problem is I'd love to use that little loading action I made earlier without copying and pasting into the new movie the same actions for a different link. So, how do I load "loaded2.swf" into "loaded.swf" via the link in "loaded.swf"?

View 1 Replies

Flex :: Can A .swf Loaded With SWFLoader Propagate Events To The Parent Application

Aug 2, 2010

I am building a compartmentalized Flex application which uses <SWFLoader > to load additional Flex applications inside it. I am currently planning on using the LocalConnection class to have these two applications talk to each other, but I'm wondering if there's any kind of event driven way to have actions in the internal application propagate to the parent application, and/or any way for the parent application to trigger events in the internal application?

View 1 Replies

Actionscript :: LoadMovieNum In Files Loaded Into An Air-based / Flex Application?

Aug 24, 2011

I am working with a very large number of legacy SWFs written in AS1 and AS2. These SWFs use loadMovieNum extensively.

I am trying to integrate these into a new Air-based app (written in either AS3 or Flex). However, loadMovieNum doesn't seem to work within the Air app.

For example, an AS2 SWF (file1.swf) may try to load another AS2 SWF using:

[Code]...

View 2 Replies

Flash :: Unloading Swfs Loaded With Loader::load()?

Jan 23, 2010

I'm using Loader::load() successfully to load swfs into my main swf and then I add them as a child of a Sprite. When other events occur I want to remove the swfs as needed. I have looked at unload() and at removeChildAt() without success.

I only added the addChild() call to try to pin down the loaded instance so I could remove it. The loading works fine without the addChild();

I have also tried publishing to player v.10 and using myLoader.unloadAndStop(); but this has no effect either;

The following demo code shows my problem. I see one child added and one removed but intro.swf is still playing away.

import flash.display.Loader;
import flash.display.Sprite;
import flash.display.LoaderInfo;

[Code].....

View 1 Replies

Flash :: 3D Transforms On Loaded SWFs Aren't Working

Dec 12, 2011

Our creative team produces SWF animations in the Flash CS5 authoring tool that we (the engineers) load at runtime into a project built using the Flex SDK. Animations that don't use the "3D rotation tool" work just fine.

Animations that use the 3D rotation tool give the following behavior:

MovieClips that have 3D tweens applied using the 3D rotation tool show up in the top-left corner of the stage as if they had no transform at all (i.e. as if their Matrix3D was being ignored, and their Matrix was identity) MovieClips that have normal 2D tweens animate properly Alpha and other non-affine properties tween properly

Both 3D and non-3D animations play fine when loaded by themselves in a browser tab or the standalone flash player. 3D is only broken when loaded into our code generated SWF.

So it seems that for MovieClips with 3D transformations applied in the CS5 authoring environment, those transformations aren't being applied / respected when the SWF is loaded by our code SWF.

This is my first foray into 3D, so I'm not sure what could be causing this, but here's what I've tested / checked / tried, all to no avail:

I've ensured that actionscript 3 and Flash Player 10 / 10.1 is selected in the authoring environment. I've tried loading animations into code SWFs built using Flex 4.1, 4.5, and 4.6 at Flash player versions 10.0, 10.1, 10.2, and 11 I've applied Matrix3D to the containers that load the SWF animations, both identity and rotated. I can see the rotated containers do work with 3D in perspective, so I know that my code SWF is 3D capable.

View 3 Replies

Flex :: Type Coercion Error When Casting An Object Loaded In A Different Application Domain

Apr 28, 2011

My application currently contains a number of Widgets that are managed by a Widget Manager. When the user clicks on a widget (e.g. a Helper widget), the Widget Manager loads the widget into a separate sibling application domain with the following line of code:

wgtInfo.load(null, null, null, moduleFactory); //wgtInfo = IModuleInfo

However, I am unable to use the widget's variables and functions later on. I attempt to find the Helper widget from the Widget Manager's list of widgets, and I do successfully. But when I try to caste the Helper Widget from type IBaseWidget (the interface all widgets share) to type HelperWidget, I receive the following error:

TypeError: Error #1034: Type Coercion failed.....

This is because the application domain of the class trying to use the Helper widget is different from the application domain of the Helper Widget. I tried to fix this by loading all widgets into the same application domain as the loader:

wgtInfo.load(ApplicationDomain.currentDomain, null, null, moduleFactory);

I now get the following error whenever I attempt to load the Helper widget:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

How can I load my Helper widget into a common application domain that is accessible by the other widgets?

View 3 Replies

Flash :: Loading A SWF Dynamically Causes Previously Loaded SWFs To Misbehave

Mar 26, 2010

I have run into a very strange problem with Flash and Flex. It appears that under certain circumstances, movie clips from a SWF loaded at runtime (using Loader) cannot be instantiated if another SWF has been loaded in the mean time. Here is the complete code for a program that reproduces the error. It is compiled using mxmlc, via Ensemble Tofino:

[Code]...

View 4 Replies

ActionScript 3.0 :: Loaded Swfs Not Working When Loaded Through Xml?

Jun 10, 2010

I have a "photo" gallery that loads numerous SWFs through xml, one by one on click. All works fine. All my SWF work fine stand alone. But when I load them into the player, many swf dont work properly.in example, I have textinput textfields in many of the swfs, which work fine on their own but not when loaded into the player. Then I have a word search game that works fine when alone, not when in player. I can see there is something as my mouse cursor changes into the "button finger", but nothing visual.

All drag and drop assigments work fine etc. I have no idea whats up. I have receantly switched to as3 and in as2 there was _lockroot declaration that solved similar problems, but now in as3 (where it supposedly should be automatic) it doesnt work. As it seems that it cannot recognise it own stage value, or selection_focus when loadedinside another swf through xml.Using cs4, as3.

View 4 Replies

Flash :: PHP Application Tell If The Loaded Swf Movie Uses The ClickTAG?

Feb 24, 2011

That and other information about the movie, like the width, height, duration, framerate and if it make other urlRequest. I need this for a banner management system.

View 1 Replies

IDE :: CS5 Make An Air Application With Multiple SWFs?

Feb 27, 2011

I'm kinda stuck on a project I'm working on and need some guidance. I've been making educational Flash Videos and all the lessons. Each lesson is it's own SWF. I know how to make each SWF into it's own AIR application, but don't know how to get all of them into one AIR application.

Basically I'd like to create an Interface like this:http://bit.ly/h9OKPH Where I have a menu screen where you have all the lessons. When you click on a lesson it will take you to another frame and load the SWF for that lesson. I know I can import all the SWFs into a new Flash File, and then publish an Air Application, but I was hoping for a less time consuming and more resource efficient way to do so (I want the app to be optimized for speed).

View 2 Replies

C# :: Capturing A Screenshot Of A Flash Application Loaded In The Browser?

Feb 9, 2011

I would like to know is it possible to access the flash application object loaded in the default web browser and programatically get a screenshot of the application only.

View 1 Replies

Flash :: AIR 3.1 Mobile Project: Adl.exe Not Showing Loaded Application

Mar 24, 2012

Copied:

bin
runtimes
airApp-app.xml
airApp.swf

Calling:
G:adlinadl.exe -nodebug G:adlairApp-app.xml

Nothing on the screen, nothing in the console. I do, however, see adl.exe hanging in the processes and eating up memory - i assumed its the loaded, but invisible application.

Update:Created a blank Flex 4.5 (Air 3.1) project that changes the background - and it worked out fine. Tried to use this config (tweaked the filename) - and it doesn't work. Seems the problem only applies to mobile projects.

View 2 Replies

Flex :: Event-based Interaction Between Two Custom Classes?

May 25, 2010

I have 2 custom components, which have their own nesting hierarchy ... One is container for another. I have to "familiarize them" with each other. The way I'm trying to achieve that is using global events (one side is firing and the other one is catching):

Application.application.addEventListener("Hello", function (data:Event):void{
// .. some actions
});

[Code]...

Then should be created the connection between container and it's child.

BUT, the only thing I could acheive is passing a reference to the Container in the DynamicEvent. Is there any chance that I could access the child at the event-handler function.

View 3 Replies

Actionscript 3 :: Download A File From Server Without User Interaction In Flex 4?

Sep 27, 2011

The code flow is as follows: user clicks 'download details' button on the page -> on button click handler a call to a RPC method is made using s:CallResponder -> RPC method generates and returns a URL from where to download the file -> the success event handler of the CallResponder gets the url where FileRefrence.download() is used to download the file but throws following error:-

Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.

[Code]...

View 3 Replies

ActionScript 3.0 :: Using New() On Loaded Swfs?

Aug 7, 2010

Usually when I want to create multiples instances of a same movieclip (that's already in the main .fla library) I use new mcClassName()but what if the clip is external, for example Ball.fla, Ball.as and Ball.swf? I've loaded Ball.swf into the main .fla and I don't know what to do now

View 4 Replies

ActionScript 1/2 :: Loaded Swfs Distorting?

May 5, 2009

I've made a simple portfolio web site which loads a swf file containing the navigation at the top and then the navigation loads individual swf files containing full page images.The problem is the full page images are distorting very slightly when they are loaded in. I've attached two images, the first image (picture2.png) is how looks when I just open the image's swf file, and the second image (picture3.png) is how it looks after its loaded in by the navigation.

View 2 Replies

ActionScript 3.0 :: Unloading Xml Loaded Swfs?

Sep 29, 2008

how to unload the swfs in as3 once you click a button to load a new one.

My file works great, with the exception of the videos playing over each other. slight bummer.

I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.

I uploaded all the files here, including two test flv files. the files were too big to upload to the kirupa forum.

[URL]

View 3 Replies

ActionScript 2.0 :: Two SWFs Loaded - Possible To Control One With Another

Nov 22, 2009

I m loading 2 .swf in one flash file and want to control one with another. The first contain small animation and other has play and stop button. Now I want to control that animation with these 2 button.
Files details:
test1.swf: It has the animation
test2.swf: It has the 2 buttons
test3.swf: It is the main file, in which I m loading the 2 files i.e. test1.swf and test2.swf

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved