Actionscript 3.0 :: Accessing Runtime Shared Libraries, Crossdomain & Security?
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
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
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
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
Nov 2, 2010
How can I disable crossdomain.xml check when the executing swf has been loaded on localhost?
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox violation: http://localhost:2541/xxx.swf cannot load data from http://www.com/xxx.swf.
I want to assign full trust to the HTML5 web application running locally. I want to disable any crossdomain checks.
Some external servers do not provide crossdomain.xml for their hosted SWF files.
I am running locally. I want to have full trust for debugging purposes.
How do I do that?
I will not consider AIR as it cannot be used from HTML5 application.
Adding the url "http://localhost:2541/xxx.swf" to "C:UsersArvoAppDataRoamingMacromediaFlash Player#SecurityFlashPlayerTrustu.cfg" did not help.
[URL]
View 3 Replies
Mar 4, 2011
I know I started a topic with a similar name a couple weeks ago, but this is actually a different question.
I have a crossdomain.xml file in both my server's root and the working directory:
<?xml version="1.0"?><cross-domain-policy> <allow-access-from domain="*" /></cross-domain-policy>
I have a flash file that is connecting to my server using Socket:
sock = new Socket('[ip address]', 80); Everything works perfectly in Flash, but the swf file throws this error:
[Code]...
View 5 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
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
Apr 20, 2009
I am using the XML/MX/Syndication libraires and getting a Security Error #2048 error. The error seems unreasonable to me in that there is no forward solution to it on the Internet. I have tried hardcoding security methods in AS 3 and also using a crossdmain.xml file in my root directory to no success. I am about to give up and use pure PHP. There should be a more simple solution to this.
View 11 Replies
Aug 10, 2009
I have written a simple upload component in Flash, but I am now having issues in uploading due to a Security Sandbox error. I now know this is due to the fact I am uploading from one domain, to another, but 1, this used to work, 2, i have implemented a cross domain xml file by placing it in the root of the domain I'm serving from. There is also the following code at the top of my movie that used to work:
System.security.allowDomain("*"); Here is the plan, upload from admin.subdomain.serveraddress.net to serving.serveraddress.net, but it doesn't work
[Code]...
View 1 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
Oct 25, 2009
what's wrong with this picture? Why is this security error happening? Is there something I need to change with my crossdomain.xml file?
[Code]...
View 1 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
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
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
Apr 18, 2010
How do I specify files to be accessed only in a specific folder via a crossdomain?
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "[URL]">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="[URL]"/>
<allow-access-from domain="*.newdomain.com" secure="true" />
</cross-domain-policy>
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
Apr 7, 2011
How can i settings crossdomain.xml my flex project.* this is my crossdomain.xml.
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
[code].....
I've tried lots of different methods but my project send error message "Security error accessing url Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL [URL]"
put the file in different places
C:wampwwwMYPROJECTin-debugcrossdomain.xml
(my swf url : http://localhost/bin-debug/test.html checked http://localhost/bin-debug/crossdomain.xml its ok)
C:wampwwwcrossdomain.xml
I added the load line of the project
protected function application1_initializeHandler(event:FlexEvent):void
{
Security.loadPolicyFile("http://localhost/MYPROJECT/bin-debug/crossdomain.xml");
}
if flex server type select none everythings ok. but server type select PHP need crossdomain.xml how can i fix.
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
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
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
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