Flex :: Share Code Between Swfs?

Sep 24, 2009

Lets say I have two swfs A and B, and at runtime, swf A loads swf B, and I wish to share code between them, to minimize file size and download times.

If swf B has some code (say. com.blah.HelloWorld), I tell the compiler to have swf B's source in swf A's classpath, but only do a compile-time link and not actually compile com.blah.HelloWorld into swf A

This works, and I have tried it, using a the -includes and -externs compiler options.

However, My problem is that I wish to do this the other way. i.e. swf A and B (and potentially swf C) all need com.blah.HelloWorld, but I want com.blah.HelloWorld to be compiled into just swf A, have it as an external reference in swf B ( and potentially C as well.)

I tried doing this using the externs and includes, but I get ReferenceErrors when I do this.

I want to do this without a having a separate rsl, so I can reduce the number of http requests.

View 3 Replies


Similar Posts:


C# :: Share Code Between C# And Flex?

Jul 15, 2009

I am developing a Flex / Flash application which talks to an ASP.Net / C# backend. Is there any way I can share code between the two?The server provides a reasonably interesting domain model which the client is designed to maniuplate. Ideally I would like to be able to define this domain model once and have both sides use it for consistency. I am after all the benefits that come with being DRY.I'm new to Flex but the sort of thing I had in mind was some intermediate language that compile to both C# and ActionScript.

Update:I currently have a basic REST style web service which sends XML serialized versions of the objects down the wire to Flex. This works fine but what I am really interested in is being able to share simple business logic that goes along with these objects. There are certain business rules that need to be processed on both the server and the client and is possible I would prefer not to have to call back to the server for performance reasons.

View 7 Replies

Javascript :: Flex - Share Code Between Library Without A Bridge?

Apr 15, 2012

I'm involved in writing a Flex/ActionScript library and in the future I will be involved in writing the same library in JavaScript. Rather than writing a library in each language and having to maintain them separately I was wondering if it was possible to:

1) Write the code in one language and share the code into the other e.g. Write the code in JavaScript and use the same .js files in ActionScript

2) Write the code in one language and perform a conversion into the other

I know it's possible to communicate between Flash/ActionScript and JavaScript but I'd like to avoid the overheads in using the technology bridge so this isn't really an option.

How do other people deal with writing and maintaining libraries that do exactly the same thing but in different languages? Specifically how do people do this between JavaScript and ActionScript?

View 2 Replies

ActionScript 3.0 :: Share Sounds Between Parent And Child Swfs?

Jan 18, 2011

Is there a way I can share sound assets between parent and child swfs?

Currently, I have a parent swf that loads a child swf (and each have preloaders) and some of them have the same sound assets. I would rather only load the sounds once... can I reference a sound even if it 'lives' in another swf?

View 1 Replies

ActionScript 2.0 :: Share Data Between Different Flash .swfs On A Homepage?

Sep 22, 2004

recently i needed to share data between different flash .swfs on a homepage.. so i tried to use Shared Objects to do so..

sofar its fine.. i tried it .. and as long as the data is stored on my harddisk.. the sharedObject "cookies" work fine.. but when i put the site online.. they simply dont work anymore..

could this have something to do with security settings of the browser used?. doesnt a web browser allow flash to access the harddisk to read and write shared objects..

is there another.. simpler and more reliable way to send data from one .swf file to another..?? (without using php -> my webserver doesnt support this sofar )

View 1 Replies

Flex :: Sharing Code Between Swfs?

Jun 4, 2011

Lets say I have two swfs A and B, and at runtime, swf A loads swf B, and I wish to share code between them, to minimize file size and download times.If swf B has some code (say. com.blah.HelloWorld), I tell the compiler to have swf B's source in swf A's classpath, but only do a compile-time link and not actually compile com.blah.HelloWorld into swfThis works, and I have tried it, using a the -includes and -externs compiler options.However, My problem is that I wish to do this the other way. i.e. swf A and B (and potentially swf C) all need com.blah.HelloWorld, but I want com.blah.HelloWorld to be compiled into just swf A, have it as an external reference in swf B ( and potentially C as well.)I tried doing this using the externs and includes, but I get ReferenceErrors when I do this.

View 1 Replies

ActionScript 3.0 :: Share External Class Files With Multiple SWFs?

Sep 9, 2010

Is there a way to share common .as files with multiple swfs?

View 5 Replies

Actionscript 3 :: Share A NetConnection/NetStream Between Separate SWFs In The Same HTML Page

Dec 21, 2010

I am aware that I can share simple Objects using LocalConnection, but this does not (in my limited testing) appear to work with NetConnection or NetStream.

In short, I wish to have a single SWF that acts as a NetConnection proxy for other SWF files in the HTML page. The client SWFs require direct access to NetStream objects on the proxys NetConnection.

Is this at all feasible, or will each client SWF require its own NetConnection?

I am aware that I could build the entire application in flash and utilize a single NetConnection internally, but this is NOT what I want to do.

View 1 Replies

Actionscript 3 :: Share TextArea Component In Multiple SWF - Runtime Share Library?

Jan 12, 2011

How to share TextArea Component in multiple swfsaylib.swf (has TextArea Componenet)main.swf (Import TextArea Componenet from lib.swf)section.swf (Import TextArea Componenet from lib.swf)

View 1 Replies

ActionScript 3.0 :: Optimize Code For 100 Swfs Or More?

Jan 13, 2011

How can I make this code smaller adding 100 swfs or more.

var seccion:String="home";
var loader:Loader = new Loader();
function loadSection():void {

[code]....

View 4 Replies

ActionScript 2.0 :: Transistions Between .swfs Code?

Apr 3, 2004

This is the code I am using for a transistion from a .swf file when you click the button "contact":

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "contact";
container.loadMovie("contact.swf");
} else if (_root.currMovie != "contact") {
if (container._currentframe >= container.midframe) {

[Code]...

Alright this works fine but the problem is, when you click this button, it works, but then you click any other button and it brings up the contact swf file again. Is there any way I can fix or change this code so it will work?

View 14 Replies

Share Data Between Components In Flex?

Jul 9, 2009

I have a Flex application that I'm working on for a new job. It's sort of a training wheels application -- I'm learning the language, and this isn't an app that needs to talk to a service in order to do its job. There are a few instances of combo boxes throughout the application that share the same set of possible values (say, a selection of states: "In Progress", "Rejected", "Complete") that I want to have use the same data source.

What is the best way to manage this?

View 2 Replies

Flex :: Share Components IDs Through Modules?

Apr 16, 2010

Are IDs attributes shared between different modules in Flex ?

i.e. I have a text area with id="text1" in my menu.mxml file.

And I want to write on it from another module mainArea.mxml

The debug gives me error, so how can I share different components ?

View 1 Replies

Flex :: How To Add A Twitter Share Button

Feb 14, 2011

I've got a Flex 3 website. How do I add a Twitter share button?

View 3 Replies

Professional :: Load Multiple Swfs Using The Following Code?

Aug 28, 2011

In actions for Frame 1:
var myrequest:URLRequest=new URLRequest("A.swf"); var myloader:Loader=new Loader();myloader.load(myrequest);img1.addEventListener(MouseEvent.CLICK,

[code].....

View 7 Replies

Flex :: Share Instance Between 2 Parsley Configurations?

May 23, 2011

I got 2 parsley configurations for my 2 elements.

A.xml

<fx:Declarations>
<!--Presenters-->
<presenters:ScenarioDefinitionPresenter id="scenarioDefinitionPresenter"/>

[Code].....

how to make that the "scenarioDefinitionPresenter" in both config share the same instance?

View 1 Replies

Flex - Upload Or Share Images On Flicker Through Php?

May 24, 2011

i am developing an application in which user have the option to share images on different social sites like Facebook, twitter and Flicker.

I have done with Face book and twitter, i upload image to my server and share the link on Face book and Twitter.

[Code]...

View 1 Replies

Have Flex WebServices Share A Common Wsdl

Aug 3, 2011

I have a flex app that loads a WSDL at runtime and shares that across several different web services I have defined. Unfortunately each call to loadWSDL() makes a network request for it, and while it's not really a problem due to caching it's still annoying and wasteful to have all those requests generated. Is there a simpler way to solve this problem and only make one network request?[code]

View 1 Replies

Swfs To Load In One Html File But This Code Does Not Work?

Sep 1, 2009

I found this code to load a movie but naming the button myRequest or myLoader does not do anything?[code]....

View 21 Replies

ActionScript 3.0 :: Code To Track Widgets/SWFs Across The Internet?

Jul 21, 2009

Is there code to track your widgets/SWFs across the internet?I would like to know how many times a SWF is downloaded & in what country, ect...........

View 2 Replies

Flex :: How To Embed Share On Facebook Button Into Application

Sep 9, 2010

I'm trying to duplicate the behaviour of the "Share on Facebook" button from Youtube. Basically, inside a Flex app I'll have a button and when I click it I want a popup that enables me to post something on the wall. While it is possible to make a call to javascript to open the pop-up I want to be able to set the images and the text of my posting. How I could set the images or text as a parameter to the sharer window?

View 3 Replies

Flex :: Share Text Area In White Board?

Jun 29, 2011

I Created a white Board in Big Blue Button.In that white board i created a text Field.. Now i want to Share the Text Field.

View 1 Replies

ActionScript 3.0 :: Add Code To Main.swf That Is Calling Swfs With Three Players Correct?

Nov 20, 2010

I need to use the unload and stop method.But my actionscript code calls individual swf files which contain 1 video player each. How would I add the unloadandstop methods into the existing actionscript?First question, add this code to the main.swf that is calling the swfs with thre players correct?So far I would I add a second set of event listeners for this function, like this?[code]

View 3 Replies

Actionscript 3 :: Share .as File Bettween Two Applications In Same Project In Flex?

Apr 16, 2010

I have two applications in my project 'test' the applications are one.mxml and two.mxml and i want to use the same main.as file in both using

<script source='main.as'/>

Can I access the components of both applications from main.as when both are running simultaniously.

View 1 Replies

Flex :: Upload Image Then Share Without Saving The File Using SharedObject Or Anything?

Jun 10, 2011

I'm currently working on a chat with uploading an image and sharing it. The problem is I can upload and display the image but I can't share it to the other side. Here is some code:

[Code]...

View 1 Replies

Flex :: Structure Multiple Cairngorm MVC Projects That Share Several Components?

Jun 5, 2009

I recently completed a project for a custom report UI in Flex. Now, I've been tasked with creating a new application that is essentially a "lite" version of the original UI. It will include only a few of the options that are in the original application. Also, it needs to be a separate application.

I do not want to duplicate my code, so I am planning on moving a bunch of the classes from the original application to a new library that can be shared by both applications. However, I'm trying to figure out how to make this work in my MVC environment.

For example, I have an Accordion component that lets users filter several items. Each Accordion child is an instance of a custom component with two lists (one for entities available for selection, the other for the entities the user has selected). Each child component has properties bound to the Model and functions that call Cairngorm Events.[code]...

View 1 Replies

ActionScript 2.0 :: Animated Buttons, External Swfs, Frame Labels, Better Code?

Jul 13, 2004

I have three animated buttonMc's with code like this on them..

on (rollOver) {gotoAndPlay(2);
}
on (rollOut) {gotoAndPlay(8);
}
on (release) {gotoAndStop(16);
_root.mtClip.play();

[Code]...

Currently If I want to add five more buttons the code must be duplicated for each buttonMC and this seems really inefficient. This is the only way I have been able to make everything work though.

View 2 Replies

Flash :: Flex PopupManager Share And Center Popups For A Whole HTML Page?

Feb 28, 2011

I have to put multiple Flash movies on a page and I'd like them to share modal popups, so that access to the entire page is denied while a popup is active. I can do this via Javascript and create HTML popups via the ExternalInterface class, but I would love to be able to do this entirely in Flex using the PopupManager class.

Note: This is not for any evil purpose. I just need to make sure none of the other movies' buttons are clicked before the user responds to the first thing they clicked. Also, some of the movies are quite small and can't contain some of the popups they require.

View 1 Replies

Flex :: Why Do Charts Axis Values / Labels Not Show Up When Using Runtime Share Libraries

Nov 10, 2009

I have developed a flex application using the data visualization components. I am now trying to optimize the application and one of approaches I am trying is to use Runtime Shared Libraries.I have configured Flex Builder to deploy with Runtime Shared Libraries and have added the .swz file for the framework, datavisualization and rpc share libraries. After deploying, my application loads, however my axis values within each of my charts are missing. The axes themselves are shown, however they do not have their label units displayed. The series themselves are displayed too.I have tried this using the 3.4 SDK and also the 3.2 SDK within Flex Builder. I also tried compiling flex using the mxmlc ANT tasks and got the same results.I made sure that the framework RSL is getting loaded first and I also made sure that the global flash cache has been cleared before I tested.I can see from my access logs that the .swz files are getting loaded the first time I make a request for my application, so I am confident that I properly cleared the flash player global cache.

Does anyone know why my axis values would be missing only when I deploy with RSL??? Switching back to Merged mode, my application works fine and it is only when I deploy with RSLs that I get the issue.I have also tried to compile using only the framework RSL and not the datavisualization or rpc RSLs (keeping them in merged mode) and I get the same results, no axis values.

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







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