header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Suresh
Points:0
Posts:0
Answered

5/24/2010 9:47:14 PM

Title: File sharing between Applications


Hi all..

I have 3 diff projects each of which has 1 an app..

initially proj1 will b loaded, then some action on proj1 will load proj2 and some action on 2 will load proj3..


Will i b able to share a single class file across all these projects..
Thanks in advance





1
MaxFlash
Points: 600
Posts:0
5/24/2010 11:09:35 PM



you can create a swc library of any such classes that you are using in multiple projects. The advantage is that its cached by browser and not downloaded again and again.

Here is the step to create mentioned in the article :
http://askmeflash.com/article/9/optimize-flex-swf-filesize-performance-loading

2) Create SWC file of your common code:- If you are using some common classes that are used in many of your flex projects or different swf files then Create a Library Project of your commonly used classes. Now to add this library to your projects :
GO to Project -> Properties -> Flex Build Path -> Library Path and Add folder containing swc file. Now your selected folder path starts appearing in "Build path Libraries".
Remember to change the "link Type” to “Runtime Shared Library (RSL)". This file once downloaded will be used for all your swf files running on that Computer afterwards.

2
bob_senior
Points: 1320
Posts:0
5/24/2010 11:16:04 PM



you cannot share a class in multiple projects. Either create a library, or you can use Local Connection to call another swf(having class inside) and pass it the parameters , get the work done and receive the result. Both swf files should be running if using local connection. But I think you go with the library option that's easy and technically correct.

3
Suresh
Points: 0
Posts:0
5/24/2010 11:31:02 PM



Fine thanks..
The problem is the class gets updated everytime when the user logs in with new data with respect to that user. so making an swc wont work if the data changes everytime..
am i rite?

4
bob_senior
Points: 1320
Posts:0
Accepted Answer
5/25/2010 12:04:13 AM



You are right. If you want to get the class data, In that case you need to communicate between the two project swf files. If your swf files are on the same page you can use javascript else local connection if in different pages to exchange data.

5
Suresh
Points: 0
Posts:0
5/25/2010 12:06:32 AM



Yup.. they will b loaded on the same page.. i'll try the JS thing n let u knw if i find a problem. Thanks!!


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 5+2 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions