Flash Runtime Shared Libraries / Memory Benefit?
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
Similar Posts:
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
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
Dec 3, 2009
I'm creating a small size Flex movies which contains two line charts, at the moment the size of the release build swf is 343KB, which is too large for our needs.
I've tried changing the loading of the SWC file to Runtime Shared Libraries, but I found that this removed the text of the charts (the text for the x and y axis). Why would the text be removed when the Framework linkage is set as a Runtime shared library?
View 1 Replies
Jun 30, 2010
I've started using Shared Libraries and this subject peaked my interest... does Flash still have load timing issues with Shared Libraries? I found a few site online that mention that your Flash project will load but if it didn't have time to load your Shared Library, it simply won't load it and you are out of luck. Is this still true with the latest version of Flash? If so, how do I preload the library to make sure it doesn't happen?
View 1 Replies
Sep 6, 2010
I thought this was possible, but I seem to have trouble making it work.I want to have my code/class library stored in an RSL (as a SWF online) which is then loaded during runtime by the host SWF. I learned about this technique from Colin Moock in his book Essential Actionscript 3.0 (Chapter 31: Distributing a Class Library).Now, I know that if you share graphics between SWFs via RSLs, you can update the graphic in the RSL and have all SWFs that access that RSL use that updated graphic.But I want to store code in an online RSL, that is shared by multiple SWFs, and then when the code needs to be updated, I simply recompile the SWF (do I even need to worry about the SWC anymore?) containing the class library and upload and overwrite the existing RSL on the web. Voila! The code is now updated in all SWFs that share that RSL Class Library.
The problem is, I can't get it to work right. CS3 and CS4 aren't updating and CS5 just crashes on export!The code I'm testing with simply outputs some chosen text to screen.I want to change the string that's output by changing the code. Nothing fancy now, but it'll obviously be used for far more indepth stuff when (if?) I get this going properly.
View 1 Replies
Jan 22, 2011
using shared libraries at the moment for a scalable e-learning course. All the elements are to be used over multiple screens. BUT if I have to add a new element to that published shared swf - then next time I access my learning program it will have to download the WHOLE NEW shared library - is that right? ie: defeating the purpose in the first place. So if that is true then the best idea would be to use separate shared libraries. ie: sharedLibraryMusic1.swf sharedLibraryMusic2.swf for newer mp3s etc...
Or is this nonsense. ie: A new updated shared library with a "little" new element would not cause the whole swf to be downloaded again??? This is so important as it can make or break the download speeds.
View 4 Replies
Oct 1, 2009
1. I have a main app. It has a TweenLite project added as library. The linkage type is "Merged into code". All the classes including "TweenPlugin" are checked. If I check somewhere in code
ActionScript Code:
var obj:Object = getDefinitionByName("gs.plugins::TweenPlugin");
and then watch the object, it gives me: obj = gs.plugins.TweenPlugin$(@2edfbc1), which is pretty logical and is how it should be.
2. I have a module project, which has TweenLite project added as a library with linkage type checked to "External". I simply make a release build of this module.
3. In main app I load to released module manually (not through Flex module mechanisms), just with Loader class. Not really more complex than this:
ActionScript Code:
_loader = new Loader();
_loader.addEventListener(IOErrorEvent.IO_ERROR,onLoadingError);
_loader.addEventListener(ProgressEvent.PROGRESS,onLoadingProgress);
_loader.addEventListener(Event.COMPLETE,onLoadingComplete);
try
{
_loader.load(new URLRequest("some.swf"));
4. In the module there is TweenPlugin class used somehow in the code. Pretty natural thing is that class definitions are inherited from the application domain of a loader to an application domain of a loaded content. So the TweenPlugin class should be available.
However I get the error:
Quote:
ReferenceError: Error #1065: Variable gs.plugins::TweenPlugin is not defined.
View 6 Replies
Jan 26, 2011
I'm using AS 2.0 and experimenting. I've got one main movie, with buttons at the top, each button loading a movie into a common movie clip...there are nine buttons/movies in all.Here's my problem. The nine movies have some common elements which seem perfect to put in a shared library. The sharing works, but when I plug the shared elements (either backgrounds or buttons) into the movies:1. Any text typed in Flash disappears (the text is Classic and Static), and;2. The buttons lose their "button" properties. Hyperlinks/AS coding will not work on them. I've made sure the buttons have an instance name. I even tried creating invisible buttons on a layer above the library-linked buttons (having the latter just for show), but strangely, the invisible button, when placed directly above the library-linked button, doesn't work either.
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
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
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 6, 2010
I want to have my code/class library stored in an RSL (as a SWF online) which is then loaded during runtime by the host SWF. I learned about this technique from Colin Moock in his book Essential Actionscript 3.0 (Chapter 31: Distributing a Class Library).Now, I know that if you share graphics between SWFs via RSLs, you can update the graphic in the RSL and have all SWFs that access that RSL use that updated graphic.
But I want to store code in an online RSL, that is shared by multiple SWFs, and then when the code needs to be updated, I simply recompile the SWF (do I even need to worry about the SWC anymore?) containing the class library and upload and overwrite the existing RSL on the web. Voila! The code is now updated in all SWFs that share that RSL Class Library.The problem is, I can't get it to work right. CS3 and CS4 aren't updating and CS5 just crashes on export!
The code I'm testing with simply outputs some chosen text to screen.I want to change the string that's output by changing the code. Nothing fancy now, but it'll obviously be used for far more indepth stuff when (if?) I get this going properly.
View 1 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
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
Dec 29, 2011
How to use RSL(Runtime shared library) in flex ?how can decrease loading time of swf using rsl?
View 1 Replies
Jan 23, 2009
I have been trawling around forums for hours now and the only was to save information LOCALLY in Flash seems to be using the SharedObject stuff. which is fine. BUT I am making a project which is meant to be entirely run from a memory stick i.e. portable. So, I was thinking it would be good to save the information from the flash to a SharedObject .sol file and then to copy the .sol file to the memory stick, then load the information back into the flash file from the copy of the .sol file on the memory stick!
Dont know if this is possible, but I need to some how save information created in the flash file stored on a memory stick (which will be text and possibly an image which would be loaded from the users pc) to a file on the memory stick and then next time the flash file is run, load all of the information back in!
I know all this stuff is possibly using PHP etc. but as I am running it from a memory stick on a pc which probable wont have internet access.
View 3 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
Dec 6, 2011
FMS is crashing with the following errors:
2011-12-06 10:24:02 12461 (w)2581227 Shared memory heap (__FCS__) has exceeded 90 usage. Consider increasing the heap size to prevent future memory allocation failures. -2011-12-06 10:24:02 12461 (w)2581227 Shared memory heap (__FCS__) has exceeded 90 usage. Consider increasing the heap size to prevent future memory allocation failures. -2011-12-06 10:24:02 12461 (w)2581227 Shared memory heap (__FCS__) has exceeded 90 usage. Consider increasing the heap size to prevent future memory allocation failures. -
When I try to restart I get:
2011-12-06 17:33:27 7933(e)2781340 Process 7933 failed to create IPC queue __FCS__ : Failed to allocate shared memory. - I've noticed the problem resolves when I restart fmsadmin. I think fmsadmin is using up all the shared memory, not sure. There are HTTP requests periodically being sent to fmsadmin, could this be a source of memory leak?
The server has 6 GB RAM and there are only about 100-200 connections being used. Runs without issues most of the time, crashes once every few days.What is the shared memory heap and how do I increase it?
View 2 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
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
Aug 8, 2011
URL...An untyped variable is not the same as a variable of type Object. The key difference is that untyped variables can hold the special value undefined , while a variable of type Object cannot hold that value.[code]Why is assignment to undefined allowed for obj? (not a big issue since it still prints as null)If we compare null with undefined the result true (even if null stored in an Object). What is the point of making a difference between null and undefined if they are equal?
View 2 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
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
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
Feb 20, 2010
How to write an AS3 object's memory location for example to a label?
View 3 Replies