Dynamic runtime shared libraries in Flash
Runtime shared libraries in Flash only seem to work if there
is a direct import link into the file that wishes to use the shared
library item. Why can't the main swf dynamically load a shared.swf
containing the shared library items into itself and therefore allow
all child swf's that are loaded after that event to access the
items? Or why can't you load the shared.swf containing the shared
library items into the requesting file on the fly and grant access
to the items from the requesting file that way? Creating direct
import links to shared libraries in all child flash documents is
very annoying in larger applications!
Ideally it should work like this...
All cross domain security issues have been dealt with.
I have a main container.swf.
The main container loads a remote shared library swf that
contains the shared library items.
After the load, the main container loads swf files that will
need to access shared library items.
One of the loaded child swf's contains a TextField with a style
sheet attached. We need to have access to a shared font from the
shared.swf library to enable us to set embedFonts to true and to
have the TextField render correctly. Unless the import link to the
shared library was created manually within the child swf containing
the TextField, the TextField will not render the text with the
embedFonts set to true.
This also seems to be the case when dynamically attaching
shared move clips with linkage id's to the stage. Unless a direct
import link to the shared library was created within the requesting
file or should I say the file that is running the script, the
script fails. It seems that libraries are kept isolated from one
another, probably to stop linkage id confliction etc. the same way
as the _global scope isn't shared between swf's originating from
different domains.
Using something like, libraryName.linkageID could combat
this, but I need to know if I'm wasting my time...
I hope this makes sense. There wasn't a solution last time I
checked, but it's been awhile and I was hoping someone out there
has come up with a solution at this stage or even knows the
official word on the subject.
Is this possible Adobe?
Cheers,
Derek.
I found the answer. So long as I keep the folder structure in
my shared library exactly as I have it in my referencing projects,
I don't need to change anything in the mxml code itself. After
synchronizing the folder structure, I no longer receive the "1046:
Type was not found or was not a compile-time constant" error that I
was getting yesterday.
France
Similar Messages
-
Why plugin/addon concept for Runtime Shared Libraries not implemented in Flex?
Hi All,
I am posting my refined query here in continuation to my post Fundamental and crucial drawback with Flex in Flex India Community as my last refined query was left unanswered though I feel there is a definite sense of purpose to it.
Why plugin/addon concept for Runtime Shared Libraries not implemented in Flex?
Here is why I feel it should be implemented in Flex.
Though Runtime Shared Libraries SWF file can be cached in the client browser and just need to be loaded only once when the user access a Flex application for the first time,
"40-60% of daily visitors to your site come in with an empty cache. Making your page fast for these first time visitors is key to a better user experience."
Qouting from 'Best Practices for Speeding Up Your Web Site' as described in Tenni Theurer's blog post Browser Cache Usage - Exposed!
While still retaining the cacheability of RSL's for compatibility reasons, flex should give the flexibility and thereby enhance performance by offering RSL's as a plugin/addon.
Looking for your comments and insigts on the same.
Thanks,
Ram Manoj Kongara.I finally skimmed through the links you posted. The terms plugin and addon
are not in either of the articles so I'm unclear what you are suggesting.
The topic seems to be about application performance. The Flash Player
supports a cross-domain cache of actionscript libraries separate from the
browser cache. Each official release of Flex contains a set of these
libraries. As new Flash Player versions or new Flex versions are released,
and users visit sites utilizing those new versions, the browser picks up the
latest Flash Player and the Flash Player picks up the latest Flex libraries.
These days, it only takes a few months for a new Flash Player to achieve
major saturation in browsers although it still takes a bit longer for Flex
libraries to achieve saturation.
Adobe will soon be hosting these libraries so if you build your application
to leverage these libraries, you will find that the total download from your
server will be minimized, limited to only your application code and assets,
although you might want to serve the libraries in case they are not already
in the cache if you see high latency to the Adobe servers on a cache miss.
The SWF or SWFs you do serve off your servers should be optimized through
normal good application development practices. Flex provides features such
as deferred instantiation in its ViewStack and Accordion containers to defer
the creation of objects until viewed. Flex has a ModuleManager to allow you
to not download parts of your application until they are needed. A
model-view or MVC architecture will make it easier to create modular
boundaries within your application and leverage these features.
If I have not addressed your concerns please describe your issue in more
detail.
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui -
Runtime shared library in Flash CS5
I'm trying to use OSMF as a runtime shared library in Flash CS5, but Flash keeps on crashing all the time I'm trying to change that swc from Merged into code to runtime shared library. Whatever URL / policy file Im using, Flash always crashes at compilation, and then after that there's no way to reopen the FLA without Flash crashing. Very annoying. I'm glad it's just a test project and not production files... Anyone already experienced the same kind of bug?
UPDATE: just tested it on Win XP SP2, same behavior, same nasty resultFunny, I have the same problem with a shared library (documentation on this site makes no sense to me, that is). And the Adobe Help desk refers me to this forum!
What I know is that an item in a shared library cannot have names with spaces, so should be like "btn-up" and not "btn up".
Further you should while activating the item in Libraries look for "Properties" (on the right hand side of the pull down of the Library) and define them as "Export for sharing" (my version is in Dutch and for Mac so these labels are named differently and in a different place).
Then in the movie you want to use them in, you open import (under file) and open the .fla of your first document as external library.
In the beginning it is as easy as that, but then creating a library in movies that are in use for an extended period of time (using spaces in their names, etc.) is a whole new ball game.
Lucie -
SDK swc files and runtime shared libraries
Hi,
Can someone tell me what effect setting the swc files in the sdk folder as runtime shared libraries in a project via the Library Path in the Flex Build Path. Does setting these as runtime libraries have an effect on a project or is it just setting the framework as a runtime library amend the final movies file size?
Thanks
StephenIt will make your SWF size smaller which should reduce load time and bandwidth costs. You may need to change your code as using RSLs may find places where you need to specify a ContextualClassFactory instead of plain old ClassFactory. Those usually show up if you use embedded fonts and find they aren't working properly.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
Runtime sharing URL in Flash CC is blank
I don't know if anyone else is experiencing this, but it is seriously interfering with our workflow:
1) We create an FLA project that contains a bunch of components and graphics on the stage, with everything in the library set to export for Runtime sharing with unique names. We title the exported swf lib.swf.
2) We create a new FLA project and import a number of those library files into our new library.
3) I right click on one of them and go to its properties, and see that it is checked Import for Runtime Sharing, but the URL is blank.
4) I enter lib.swf for the URL and hit OK.
5) When I right click on the same one and go to its properties again, I see that once again it is checked off as Import for Runtime Sharing but the URL is blank.
Sometimes I can still compile even despite this, but usually I am running into an error at compile time where Flash warns me that there is no definition available for one of my imported library items.
This needs a fix, ASAP.
AndresHi kglad.
The path was already appointed to the folder: C:\Program Files\Adobe\Adobe Flash CC 2014\AIR13.0.
I am creating a file based on AIR for Android, but when configuring to use a runtime, I would choose the option of getting the runtime.
But this option is disabled, only allowing me to embed the runtime.
As I understand it, from the AIR 3.7 only the option of embedding is allowed, but this makes the final app size increase too much (> 8 or 9 MB).
I wonder if there is any way to be able to choose the option of get a runtime from a store as was possible until AIR 3.6.
Thanks.
(excuse me for my terrible english.) -
How Do I Fix This Runtime Shared Library Preloading Error?
Hello,
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)"Reference error is because the default linkage for textLayout.swc is Runtime Shared Library (RSL) with preload swf option so the reference will always be “RSLPreloader” if TLF is used.
There are 2 options that we can avoid the reference error:
1. Change default linkage to “Merged to code” which will add around 150KB to child swf file size.
2. Change preloader method to “Custom preloader loop”, move all contents and scripts to frame 2. And finally, in the Advance ActionScript 3.0 Settings, export classes in frame to 2. -
Hi,
I was trying to test a flash movie that I made, and an error popped up.
It said, "Your content will not stream. Runtime Shared Library preloading will require all of your content to download before the first frame can play."
It also says, "The Runtime Shared Libraries being preloaded are: textLayout_1.0.0.595.swz for TLF Text". After I click "ok", the movie runs, but I had created a mask effect for some text, but that text never appeared in the movie, as it was supposed to. How can I fix this?Can u share the fla if possible
-
Runtime Shared Library Preloading Warning
Hi there, I just finished a project and added a preloader to it (in Flash CS5 AS3) and I get this error:
Your content will not stream. Runtime Shared Library (RSL) preloading will requiere 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...
The Runtime Shared Libraries being preloaded are:
textLayout_1.0.0.595.swz for TLF Text.
I am using this preloader on a different project and I dont get this error.I have the exact same question.
-
Please help. I am receiving an error message and I don't know what I need to do to fix my file. I'm working in Flash CS5.5. I've created an animated web banner. When I go to test movie, I receive the following error message:
Your content will not stream. Runtime Shared Library (RLS) preloader 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_2.0.0.232.swz for TLF Text
I don't know what any of this means or what I need to do to ensure that my web banner will load correctly once it's uploaded to a website. Please help. I'm fairly new to Flash. Thank you in advance for any advice you can provide.Mr Benrud,
This window means you've used TLF Text Format and before all of your content download, it requires to be proloaded. To get rid of this message, just remove TLF Text Format (if you really don't require it) or else goto Publish Settings -> Flash -> Actionscript Settings and just remove it. -
[ERROR] - Runtime Shared Library Preloading Warning
Hey there guys, I have a question that probably has a very easy answer, but after searching online for a while I couldn't figure out just how to fix it.
Anyways the problem is this, when I run it, it gives me this warning and then the when i click "OK" it startes playing the movie..but when i upload the content i dont see it woking
I assume I'm receiving this warning because I'm using Adobe Flash Professional CS5 if this helps.
Thanks very much for any advice you guys have.
-=-=-=-=-=-=-=-
The warning:
Runtime Shared Library Preloading Warning
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 chane 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 TextSince my presentation requires hiding a text field behind "revealer bars", unlayering was not going to make it in my situation. By some kind of good fortune I had another FLA file that behaved properly. I found that it had the "Merge with code" switch set, but making that change to my current file did not correct the problem. It appears that the flash data base became corrupted and I had to re-build the entire file from scratch.
Here is something that hints ( but doesn't admit ) that you can corrupt the fla file:
Home / Using Flash Professional CS5 / Text
Working with Text Layout Framework (TLF) text
Converting between Classic and TLF text
When you convert a text object from one text engine to the other, Flash preserves most of the formatting. However, because the text engines are different in their capabilities, some formatting may be slightly different, including letter spacing and line spacing. Inspect the text carefully and reapply any settings that have been changed or lost.
If you need to convert text from Classic to TLF, try to do so only once rather than converting back and forth more than once. The same is true for converting TLF text to Classic text.
When converting between TLF and Classic text, Flash converts text types as follows:
TLF Read Only> Classic Static
TLF Selectable > Classic Static
TLF Editable > Classic Input
Until I become very certain that I am on the right path, I am saving a new sub-version of the file after every small advance in the restoration. If something I go breaks the "streamability", I Quit without saving then start up again with the last successfully saved version. ( I haven't yet found the "Revert to Last Saved State" menu pick. )
Hope this helps. -
Does anyone has experience in using Runtime Share Libraries (RSLs) in flex?
I am getting this error from Flash CS5 when publishing the SWC file:
"Warning: No libraries were linked as Runtime Shared Libraries (RSLs) because of your publish settings: Export SWC"
Does this interferes when compiling the flex project that uses this SWC file?
The error that I am getting from Flex 3 is:
"One or more errors were found while trying to build release version. Unable to export.
Reason: " - This is the main error window
Details: "
Encountered errors or warnings while building project xxLearning.as.
xxLearning.as: unable to load SWC C:\xxx\xx\My Documents\Flex Builder 3\xxx\libs\_assets.swc
Any ideas?Hello mdillon,
I just wanted to point out that you could use an NI-DAQmx simulated device. With NI-DAQmx 7.4 and later, you have the ability to add a simulated device to your system. That simulated device will respond with the appropriate NI-DAQmx errors (if you try to set invalid parameters, etc.). It will allow you to program a system as if the device was present. Just a suggestion
-Alan A. -
Hi. I have arrived to a new project and they are working with JBI (developing BPEL) with Glassfish + openESB.
I have no experience with JBI and I've been request to do some research about JBI Shared libraries. The problem comes for us when two composite aplications have to share one resource (in this case an .xsd file that includes other schema files). I don't know how to do such a thing. What I've done so far is:
- create a new project (as a java project in netbeans) with the needed files
- create the jbi.xml file under the META-INF folder
<?xml version="1.0" encoding="UTF-8"?>
<jbi
xmlns="http://java.sun.com/xml/ns/jbi" version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:identification="http://www.sun.com/jbi/descriptor/identification/v1.0">
<!-- identification information about this shared library-->
<shared-library class-loader-delegation="self-first">
<identification>
<name>my-shared-lib</name>
<description>JBI shared library</description>
<identification:VersionInfo component-version="1.0.0" build-number="000001"/>
</identification>
<shared-library-class-path>
<path-element>./xsd/Requests/request1.xsd</path-element>
<path-element>./xsd/Requests/types.xsd</path-element>
</shared-library-class-path>
</shared-library>
</jbi>- deploy in the glassfish server via web interface
But when the POJO class that needs that file it is not available (neither in the classpath). What I have to do or what I'm doing wrong?.
Thanks in advance"Also with regards shared libraries - whn some people come out of their browsers they clear their temporary internet folders of everything ie: cached/cookies too. So those people would have to redownload everytime. Is that right?"
Cookies do not matter for caching. If they set their browser to clear cache - ALL files will be loaded every time new sessions starts.
"So even if I create that framework to test for changes which I doubt I can do then
it sounds like an excellent idea to have various shared libraries just for the fact that it doesn't matter
about file size but the positive is that if I change one library the other remain unchanged.
Would that be a correct assumption?"
There is no single correct answer or even recommendation to how to deal with RSLs (Runtime Shared Libraries). Each application dictates its own rules that depend on objects availability at the points they need to be consumed. Size may or may not matter (again, answer depends on architecture and internal application business logic).
From the standpoint of choices of what to load and what is changed, if there is no mechanism that detects changes and because of how caching is done - it is only all or nothing approach (either all RSLs have to be loaded per session or one relies exclusively on browser cache).
Change detection is pretty difficult to implement if you rely on client side only because, again, how cahing is handled.
Also, conceptually RSLs must be very stable entities and shouldn't be something that changes often if ever. If they are meant to change often - it is definitely a critical design flaw. Perhaps, this case indicates that what is actually happens is that RSLs attempt to represent data/information/presentation layers. Data MUST EXIST TOTALLY separate from logic and presentation. I cannot stress it strong enough - mixing information, presentation and logic leads to major inefficiencies if not disasters. -
CS3 Runtime shared library linkage
I'm new to runtime shared libraries, so figured someone will
see what obvious thing I'm doing wrong.
Given:
1. Created a Assets.swf with one exported MovieClip symbol
with a linkage name called "Symbol1". "Export for actionScript",
"Export for runtime sharing", and "Export in first frame" are all
checked. URL: "Assets.swf"
2. Created a Movie.swf that imports "Symbol1" from
Assets.swf (using the Open External Library dialog).
3. Attached a Document class to Movie.swf that contains the
attached Movie.as code below.
Result: Two compiler errors:
Movie.as,Line 9 1046: Type was not found or was not a
compile-time contant: Symbol1
Movie.as,Line 9 1180: Call to a possibly undefined method
Symbol1.
Movie.as code:I wonder why Adobe even enables the "export for runtime
sharing" checkbox if it doesn't do anything for AS3? This
definately lead me down the wrong rabbit hole trying to get that
approach to work.
Anyway, I made the suggested code changes to Movie.as
(attached). Unchecked the "export for runtime sharing" box on
Symbol1 in Assets.fla. Removed the Symbol1 import from Movie.fla.
And, sure enough, the Symbol1 import now works. Thanks, kglad.
So in summary, the two points that I missed were:
Every exported symbol must have as
associated class definition in a corresponding .as file. so that
symbol can in imported using the AS3 "import" directive.
Ignore the "Export for runtime
sharing" mechanism entirely and use the Loader class
instead. -
Flash Runtime Sharing Challenge 2008
Hi everyone!
So I've been looking more into the "Import/Export for runtime
sharing" of flash, and have run into some frustrating behavior. The
problem I'm running into is that Flash's management of swf paths is
confusing, and there is not a lot of documentation as to how the
engine links files together.
First some background; forgive me if it's verbose, I just
want to make sure I supply enough information for this complex
scenario.
Basically, I'm trying to make a simple 2D fighting game like
Street Fighter, so I'll use a character... Let's say... Ryu(cause
he's the coolest!)
I'm using external linking to try and reduce the sizes of the
swfs from the FX in the game w/o having to create a complex dummy
system. I've got most of the research completed, the final hitch
that I've encountered is how Flash CS3 handles the linkage setup.
Here's the setup I have with Ryu:
/game/rsrc/characters/ryu/flash/Impact.fla
/game/rsrc/characters/ryu/flash/
Impact.swf
/game/rsrc/fx/
ImpactFX.fla
/game/rsrc/fx/
ImpactFX.swf
/game/bin-debug/Game.swf
So ImpactFX is the VFX that will be used in all character's
animations. It's a dust cloud that appears when ryu hits the
ground.
Ryu's Impact file references ImpactFX's library. There will
probably be others like WallImpact, etc.
Game is the main game.
So if I have 200 Impact animations with Ryu, w/o using
runtime sharing, I have to take the size hit, roughly 200 * sizeof(
ImpactFX.swf), since the assets are burnt into each
individual Impact animation's swf. With runtime sharing, I only
have to download
ImpactFX.swf, so I get major savings over that VFX. Right?
I've been able to get runtime sharing to work in specific
instances, but not in a general system.
So the first thing I did:
I setup the shared symbols in
ImpactFX.fla to 'Export for runtime sharing'. I used the
default symbol names, and used the URL '
ImpactFX.swf.'
Dragged the folder that contained the shared symbols from
ImpactFX.fla to
Impact.fla. This setup all the symbol's correctly.
Added them to my scene and ran(
Impact.swf). No dice! I got this error:
Error opening URL
'file:///H|/flash/game/rsrc/characters/ryu/flash/ImpactFX.swf'
From this, I ascertained that
Impact.swf was looking for
ImpactFX.swf in the same directory as it.
As a quick test I copied the
ImpactFX.swf to the same directory as
Impact.swf. Re-ran, and success! The swf savings are there,
but it's not ideal at all, I have to copy the swfs to the same
directory???
From there I changed the linkage up a bit. From the library
in
Impact.fla, I changed the Import URL to
../../../fx/ImpactFX.swf. Still success! But... Some more
weirdness here, I only changed it on one symbol, and during runtime
it worked for all symbols... Even though the other symbols still
point to just
ImpactFX.swf...
So this works fine when I run and test the animation from the
fla. However, when I try to run it from the
Game.swf, DISASTER! This one was even more frustrating; the
flash player doesn't seem to give the previous error message(even
though it's the same issue.) I traced this problem down before and
found that the
Impact.swf would never return a 'loaded' event. Not cool. Of
course, copying the
ImpactFX.swf to the appropriate path fixes this and it runs
beautifully.
So where does that leave me? There's a way to get this to
work, but it's not pretty at all, especially for artists. The ideal
setup I would like to have the artist working is:
1. Open the FX library fla, pin the library, and drag drop
the appropriate symbols for the animation.
2. Save and export.
3. Run and confirm in the fla's test frame work.
4. Run and confirm in the game.
Unfortunately, with all the swf location copying and pathing
this adds too much complexity for an art pipeline.
So that's my dilemma. The main question I am trying to figure
out now is, what's the best pipeline solution for this scenario? I
want to be able to runtime share these files with multiple shell
programs. A solution is forming, but I don't think it's the best.
It seems like when you setup a symbol to 'export for run-time
sharing', the URL defines the path the parent importing swf uses to
find the runtime resources, which seems a little backwards...
I tried loading
ImpactFX.swf before
Impact.swf. That didn't work, even though they are in the
same security sandbox.
Other questions:
1. Is there a way to make loading swfs throw that 'Error
opening URL' error?
2. Is there a way to say 'hey flash player, the file you are
looking to link is over here!'
3. Or even better, 'hey load these runtime assets before you
load the assets that reference them!'
4. Is this necessary? I'm assuming this is a required
savings, because if we have a lot of animations with FX, we're
going to want to cut down on our download size. Figuring out this
pipeline may also allow us to load one large library file for the
game animations, and just load that.
5. Does the security sandbox system have anything to do with
this.
Any thoughts or ideas? Feel free to point me towards
documentation, I haven't had much luck finding any detailed
documentation for this topic.Hi Legos,
Did you ever solve this problem? I'd like to organize my flash files similarly, but I too have had weird issues with runtime sharing.
Also, how do you debug into the imported symbol?
Aaron -
Hi there, i have a flash movie (main.swf) which loads shared
resources from another flash movie (resources.swf) using 'import
for runtime sharing'. The problem is that the flash movie which
stores all the shared items (resources.swf) is in a subdirectory,
and that subdirectory url sometimes changes. The problem is that if
the directory URL changes, i have to then re-edit my main flash
movie and specify the new URL to resources.swf. I was wondering if
it is possible to change the
import URL at runtime
or to store it in a txt file , for example, so it can be
easily changed in the future, other than re-editing it.
I really hope someone can help or give me any alternatives as
this is driving me crazy
ThanksYou have a couple of different options. You could pass the
variable in on a query string in the by adding a query string to
the program path in the object tag which calls the program in the
first place. Here's how I get my current url:
<param name="movie"
value="<cfoutput>flash/navscroller/navscrollerl.swf?S1=#URL.S1#&S2=#URL.S2#</cfoutput>"
/>
Or you can use LoadVaribles. Or perhaps even Load the data in
from a database via ASP or Coldfusion or whatever.
Maybe you are looking for
-
I upgraded and to newest version and computer froze on checking add-ons and plug-ins. I restarted compter and could not open Mozilla Firefox. So. I removed MFF and went to you website and downloaded latest version. It put an icon on desktop and put M
-
SSH to PIX works but HTTP does not work
Hi I can SSH to pix but not HTTP to pix although http is enabled.I am using ACS/RSA for user authentication.I see SSH is allowed in ACS but I do not know How to configure ACS so that I can HTTP to pIX ?I am trying to connect to pIX with Cisco Network
-
IWeb O8 Won't Publis After Upgrade- Help Please
Hey All, So I finally upgraded to iWeb 08 and now my sites won't publish at all. Every time I select Publish or Publish All it goes through the paces connects then goes through updating all of the pages and then reaches the publishing in the backgrou
-
Get current directory(without user.dir)!!!!
Dudes, need help badly... i need to get the current directory of the jar file where it gets launched from. Since the launching takes place from an html file, the system property "user.dir" does not get set to the current directory. Both the html as w
-
Software License Mgt in SAP-CRM
Dear All, Greetings.. One of our customer is looking for license issuance functionality for their software product. The process that need to be mapped is ~ Manage Licenses - Create Server - Assign Products - Generate Licenses Can you please help us i