Professional :: Setting Up Runtime Shared Library URLs With Multiple Environments
Aug 26, 2010
I'm trying to figure out if we can use RSLs to contain common UI controls for our next project. I'm running into an organizational issue that I can't quite figure out - how to get the RSLs to work in both a local development/debugging environment, and on a production web environment, with the same exporting/importing URLs.
Here's what my setup would look like. Say I have a main application main.swf, an RSL lib.swf, and a UI module dialog.swf.
Main.swf loads or embeds dialog.swf. lib.swf exports some symbols that dialog.swf imports.
On a local development environment, these swfs are found in folders like so:
[URL]
Here is the problem. If I set the export/import url for symbols in lib.swf to "assets/lib/lib.swf" (relative to the location of main.swf), the runtime library gets loaded fine in the local environment. But in the web environment, it does not load - the player just shows the "..." graphic indicating it is trying to load.
Alternatively, I can use "http:/myapp.com/assets/lib/lib.swf" as the export/import url. Now, it will work in the web environment. However, in the local environment, dialog.swf will load symbols from the lib.swf that is out on the web, not the one that is local. But I need it to load from the local version, so that designers can muck about with the assets and see the results locally before publishing to the web.
Is there some alternative way to set up the swf's, or way to set the URLs, or some other hoop I can jump through that will make the RSL load properly in either environment without having to manually change URLs all the time?
(Details: I am using Flash Builder 4, CS 5, Action Script 3, Flash Player 10... No Flex! My example omits some details from my actual setup, such as the fact that we are using a preloader to load the main application, and a php script on the web page to start the preloader.)
View 4 Replies
Similar Posts:
Aug 27, 2010
Summary: I don't quite understand how the import/export URLs for symbols in a runtime library work. I can't figure out how I can set them so that the runtime library will be properly loaded and accessible for other swfs to import from, if I want it to work both in a local environment (on my harddrive), and from a remote environment (on a web page).
Relative URLs seem to work great for the hard-drive case, but fail for the web page. Is there a magic way to set the relative URL to work from the web too? And/or, is there some way of manually loading up the RSL at runtime and making the importing swfs import from that loaded copy, rather than having Flash doing it behind the scenes based on the import URL set in the symbol? Following is a longish description of what I'm trying to do, and why... I'm trying to figure out if we can use RSLs to contain common UI controls for our next project. I'm running into an organizational issue that I can't quite figure out - how to get the RSLs to work in both a local development/debugging environment, and on a production web environment, with the same exporting/importing URLs.
Here's what my setup would look like. Say I have a main application main.swf, an RSL lib.swf, and a UI module dialog.swf. Main.swf loads or embeds dialog.swf. lib.swf exports some symbols that dialog.swf imports. On a local development environment, these swfs are found in folders like so:
[Code]...
View 1 Replies
Sep 8, 2010
I just finished up my site, and this is the only thing holding me back from publishing it. Whenever I "Test" my site, I get this error: " Your content will not stream. Runtime Shared Library (RSL) preloading will require all of your content to download before the first frame will play.
To prevent this you can change the Runtime Shared Library Library Settings, in the Advanced ActionScript 3.0 Settings dialog which can be raised from the Publish Settings dialog.The Runtime Shared Libraries being preloaded are:
textlayout_1.0.0.595.swz for TLF Text"
Does anyone know how to correct this error? If you do, could you please walk me through it step-by-step. I am still very new to "Flash Professional (CS5)" & "ActionScript (3.0)"
View 4 Replies
Mar 21, 2011
I recently began using CS5 with AS3.0 and I encountered this error.I can not find where I can edit the AS3.0 settings nor do I know what to change.
View 1 Replies
Feb 8, 2011
I'm having a little trouble setting up a new project (an e-Learning) that I think will benefit a lot from RSL.My case is something like this[code]...
The Main will be the first movie to be instantiated, then, all that is necessary from here will be download.Every lesson will be put in a fla/swf apart from the "Architecture" (that is the Main, Scenes, Navigation and a whole bundle of classes called Engine) and will be added at runtime inside the Scenes.
The Engine is responsible for handling repetitive and necessary tasks, events, common methods, communication with server, among other things.The Navigation is responsible for handling user input, as the navigation (next/prev lesson and such), and then passes it to the Engine, that will manipulate the Scenes (and it's children).
Well, I have some restrictions too:Every swf file that will be handed to our client need to have less than 80kb, which means I'm tied.I can't compile the whole thing as a package ready to delivery.As size counts, I need means to alleviate the load as much as possible.So, I searched a lot these days and found out RSL.I've created some tests to know better how to use this and, of course, got into a trap.
I haven't been able to set up my Flash correct, haven't any success with the "Library Path" (under AS3 configuration), haven't been able to compile classes inside the SWC...
Another thing is that I won't make the lessons, only the Architecture.Those lessons will be created by people that may not have any knowledge in AS3 (OOP or program logic) at all.And I'm not inclined to delivery the whole engine (source code) to anyone from outside that may mess with it, making the whole app (apps, in fact, we'll produce hundreds of e-learnings).
How to use RSL efficiently
How to bundle classes inside the SWC
How to package all that is imperative for the whole thing work in the SWC, and then, delivery only this SWC
View 1 Replies
Dec 29, 2011
How to use RSL(Runtime shared library) in flex ?how can decrease loading time of swf using rsl?
View 1 Replies
May 24, 2010
I'm having a little trouble setting up a new project (an e-Learning) that I think will benefit a lot from RSL.
My case is something like this:
Main.fla - A Shell
Scenes.fla - I'll explain this in a minute
Navigation.fla - Some kind of GUI
Lots Of Fla Files - The Lessons
The Main will be the first movie to be instantiated, then, all that is necessary from here will be download.Every lesson will be put in a fla/swf apart from the "Architecture" (that is the Main, Scenes, Navigation and a whole bundle of classes called Engine) and will be added at runtime inside the Scenes.The Engine is responsible for handling repetitive and necessary tasks, events, common methods, communication with server, among other things.
The Navigation is responsible for handling user input, as the navigation (next/prev lesson and such), and then passes it to the Engine, that will manipulate the Scenes (and it's children).Well, I have some restrictions too:Every swf file that will be handed to our client need to have less than 80kb, which means I'm tied.I can't compile the whole thing as a package ready to delivery.As size counts, I need means to alleviate the load as much as possible.
how to use this and, of course, got into a trap.I haven't been able to set up my Flash correct, haven't any success with the "Library Path" (under AS3 configuration), haven't been able to compile classes inside the SWC...Another thing is that I won't make the lessons, only the Architecture.Those lessons will be created by people that may not have any knowledge in AS3 (OOP or program logic) at all.And I'm not inclined to delivery the whole engine (source code) to anyone from outside that may mess with it, making the whole app (apps, in fact, we'll produce hundreds of e-learnings).How to use RSL efficiently How to bundle classes inside the SWC How to package all that is imperative for the whole thing work in the SWC, and then, delivery only this SWC
View 2 Replies
Oct 31, 2011
Kindly note I am not asking what SWCs are used for, I know about that. I want to know, the use of RSLs in flash. Say i have some useful classes which i currently am using by specifying the particular folder as an "Additional source folder". So, can i make use of RSL here. If not, when and why i need to use RSLs ( I use SWCs without any problem, but i wanna know how to make use of RSL, without making SWCs, ie just by bunch of actionscript classes )
View 1 Replies
Jan 12, 2009
I am facing an error using shared libraries. The error pops up during compile and only happen when I give an instance name to my imported asset. Let me describe further:
I have an asset library where all movie clips in this file are exported for runtime sharing - LibraryA.swf
Next is the file that uses the assets - ShirtA.swf
What I did is to import an asset from LibraryA.swf (e.g. collar) into ShirtA.swf. Now I have collar movieclip in my ShirtA library. I drag an instance of it to the stage and compile. No problems.
I then gave this instance a name, "myCollar". I tried to compile again, and I get an error from Flash IDE - 1046: Type was not found or was not a compile-time constant: collar
View 9 Replies
Oct 18, 2011
I am using Flash CS5 (assets) and FlashDevelop (code) for my project. We have about 20 fla/swf's that contain textfields. All of our textfields use the same Font, and the font is specific to our company so won't be installed on anyones computers, hence it needs to be embedded.
My ultimate goal is to have one single font embedded that all of the textfields use, for 2 main reasons:
Whenever we add more characters to the font (other languages), we only need to add them once and not 20 times The file size doesn't blow out dramatically
I'm having great difficulty in trying to achieve this. It seems that everything I try, characters are missing (only characters entered in the text property of the textfields in each fla seem to be embedded).
The latest solution I am trying is using Runtime Shared Libraries, as this seems like it should work. I have an fla called FNFont.fla. It contains just one object in the library, the embedded font. The font is exported to AS3, exported in frame 1 and exported for runtime sharing. The URL is FNFont.swf (all swf's are in the same folder).
In all the other fla's, I create the font object in font embedding. I tick Import for Runtime Sharing and give it the same class name as the one in FNFont.fla. The URL is FNFont.swf. The fla(s) contain many textfields using this font. The textfields have instances of themselves as children of other movieclips.
When I run the program and attempt to load a movieclip that contains an instance of one of these textfields, I get the error:
[Fault] exception, information=ReferenceError: Error #1065: Variable FontName is not defined.
FontName is the class name of the Font object in FNFont.fla and all other fla's. It is not the instance name of the textfield (nor the class name), so I don't understand how it thinks its a variable.
View 3 Replies
Sep 19, 2009
working a project that has 9 swf.a lot of the swf are using the same classes like papervison and tweenlite.is there a way to store classes like papervison in a share library?
View 1 Replies
Mar 26, 2009
This is the concept I want to get into code:
1) Have a Document Class attached to the Main.swf
2) Have a Assets.swf that has all MovieClips that set to Export and have been given actual Classes.
3) Have the document class Load the Assets.swf.
4) Once loaded, be able to create instances of the MovieClips from Assets.swf by writing the code in the Document Class of Main.swf
I can get all this to work.. However what I am finding is if I have a public function on the Document class that creates an instance of something from the Assets.swf, lets say var okTest:TestClass = new TestClass(); I have to also import it in the Document Class (import com.test.TestClass). When I compile it, yes it works. If I remove the Assets.swf file it doesn't display. Ok.. But I've noticed that the Main.swf file is including all the imported classes (eg: com.test.TestClass) so the Main.swf filesize is pretty much the same as the Assets.swf file.
I also ran it through a decompiler and can see yes in fact Main.swf is including all those Classes from Assets.swf because I'm trying to access them from Main.swf and had to import. So the biggest question is how do I go about this properly? Being able to load the asset file that has movieclips etc that have custom classes. Then create instances of those classes within the document class but only if Assets.swf is loaded.
View 2 Replies
Mar 22, 2010
I think I basically get runtime shared libraries, but I have some very specific questions which I have not been able to find answers for anywhere:
1) When you load swf "A" that references a runtime shared library swf, does the entire runtime shared library swf also immediately load? (true/false)
2) When swf "A" instantiates a symbol that is linked to be imported from the runtime shared library, does the entire runtime shared library swf load then? (true/false)
3) When swf "A" instantiates a symbol that is linked to be imported from the runtime shared library, does only that specific symbol load? (true/false)
My problem is, if I put all my bitmaps in swf "A", then it takes a really long time to load. I'm wondering, if I put all my bitmaps in a runtime shared library, and link the symbols in swf "A" to the runtime shared library, then will swf "A" load fast (because the runtime shared library is not loaded)? And when I instantiate a linked symbol, will it also load fast (because the entire runtime shared library is not loaded)?
View 5 Replies
Feb 22, 2011
I keep getting this warning coming up everytime I go to preview my file. Can anyone help me prevent this warning from coming up? I tried to create a seperate preloader for the website I'm making and that didn't work, and I think it might be because of this Runtime warning in my main file.
View 3 Replies
Dec 3, 2011
In my Runtime Shred Library SWF I have a class named BackButton that extends MovieClip and interfaces IGameButton:
package com.game.button
{
import com.interfaces.IGameButton;
[Code].....
View 1 Replies
Jan 4, 2012
I recently switched a Flex project over to using RSLs. It built fine for quite a while but has recently dug its heels in and is giving me this error:configuration variable 'runtime-shared-library-path' requires a value for 'rsl-url'I went through all the flex XML files I could find and either this value doesn't exist or there are entries available for it. Nowhere did I see a <rs-url></rs-url> with no value.
View 1 Replies
Jul 20, 2010
I am working in two different applications, one to be compiled for desktop use (AIR) and one to be compiled for the web. They are part of the same project and use the same visual components, but they are completely different apps. When a visual component is changed in one application then it should also change in the other one. Is this a good situation to use a shared library fla? I am new to the concept of shared libraries and I am considering the options.
On one had I would not have to update 2 applications everytime I change something, on the other, I would always have to recompile the library folder when I do the smallest changes to a component.
View 4 Replies
Mar 22, 2011
I recently began using CS5 with AS3.0 and I encountered this error -I can not find where I can edit the AS3.0 settings nor do I know what to change
View 1 Replies
Dec 15, 2009
I'm using Flex builder 3 for my main application (web-based), and I need to load multiple swf files built in flash cs4 (AS3) at different times. The flash swfs import assets from a separate flash swf used as a shared library. I'm using 1 swf loader in flex to keep 1 flash swf loaded at a time.Loading the first swf works fine, but loading subsequent swfs generates an error in importing from the shared library swf.
Here's an example of an error:
"ReferenceError: Error #1065: Variable sharedApps is not defined."
View 3 Replies
Feb 6, 2011
I am not great at flash and am making a website that has a few different tabs for different pages.How do I make different urls for each page?I want to track each page seperately.
View 1 Replies
Oct 10, 2010
If I make a text box inside a fla, then publish, the swf size will be KB.But if I use character embedding in the text box, and embed Chinese, then the swf size will be MB.Is there a way to use a shared library to do the character embedding? BTW, the text box need to be changed at runtime.
View 1 Replies
Mar 23, 2011
I'm using Flash CS5 (AS3) for my main application, and I need to load multiple swf files (childs) at different times. The swfs (childs) import assets from a separate flash swf used as a shared library. I'm using 1 swf loader to keep 1 swf loaded at a time. Loading the first swf works fine, but loading subsequent swfs generates an error in importing from the shared library swf.
[Code]....
View 3 Replies
May 28, 2010
I'm creating a large project with many different FLAs using symbols pulled from a shared library FLA at author time. It works great, however, the workflow could be simplified (possibly) if the shared library were saved in XFL format.I saved a copy of the shared library FLA as XFL. Then, I tried to import a symbol to another FLA from the XFL as author-time symbol references. Flash recognized the XFL document as an accepted source, but did not offer a menu giving a selection of symbols.
View 5 Replies
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
Oct 16, 2010
I am working on an interactive flash map, I was able to set all the countries borders with the help of fireworks (awesome tool), and import them back to flash and set each country as a button.I would like to set all of the buttons to have the same properties for example :All the buttons have default red color, and will have a mouse hover frame that will change the color of the button to blue.I DO NOT want to set each button manually, because I would like to have the choice to change the mouse hover color to a different one, and would like to avoid passing each button and changing each one's mouse hover frame.
Is there a way I can built a template of a frame, and for each button set its mouse hover frame as the template frame I built ? And then if I make any changes to the template frame, all of my buttons would be automatically updated?
View 1 Replies
Jan 6, 2011
I have a big tedious project which requires to change all library symbol linkage URL�s (into the same name). Instead of copying/pasting,is there a way to do this at once (using a JSFL perhaps?)
View 2 Replies
Jan 12, 2012
I have 3 different MovieClips inside my library,
I can put each one severally to the stage,
but I can't put all of them using for loop and addChild();
View 9 Replies
Jan 28, 2012
How can I do the following in Flex 4.5 or later: Compile an swc library file containing packages of simple functions Compile an swf application referencing the swc file as RSL Publish the swf application Send the source code of the swc file to another developer Allow the developer to modify the code of some functions while keeping their interfaces Allow the developer to compile the source code into a new swc file using only compc Allow the developer to replace my original swc file with his new swc file, then execute my swf application having the new swc file in the same directory.
View 1 Replies
Jun 7, 2011
Suppose that I have two applications running on the same page. I have the Libraries compiled into the SWF file: [code]Is RSL intended to just improve the download time (via caching) or does it also lower the memory foot print of an applicaiton?
View 1 Replies
Sep 10, 2010
Preface: I'm using Flash CS4 Professional for the Mac, AS3 and Flash Player 10.
I have an RSL (runtime shared library) SWF that contains bundled classes which I store in an online location. I also have another SWF that access that runtime shared library in order to instantiate it's classes and use their methods/functions.
Here's the code of the RSL:
Code: Select allpackage {
import com.thisCompany.customClassOne;
import com.thisCompany.customClassTwo;
import flash.display.Sprite;
[Code]......
I've also tried putting the code Security.allowDomain('*') (from import flash.system.Security) in the RSL SWF and it doesn't work.
what to do to let my my host SWF properly access the objects and methods/functions of my RSL in another domain?
View 1 Replies