Thanks,
Naveen for reply.

Naveen regarding this issue we can't make new changes in our exist application.
The isssue is i have abc.as( which is contain only variable name and
some function)

Before I am using this abc.as like

C:\\workspace\flex\abc.as
Its working fine,

But Now I want to add abc.as in library project after then use in
whole application.so i follow below approach but its not good
approach,so i try to find best solution for this.

 include "../../MyLibProjectName/src/includes/abc.as"

but same file, some places like
include "../../../../../../../../MyLibProjectName/src/includes/abc.as"

Please advice me

Thanks
atul

On 4/24/11, naveen SR <[email protected]> wrote:
> Hi Atul,
>
> Well if the file has only Constants I dont think you need to put this in a
> SWC unless you have lot more constants and custom components to be packed.
>
> 1) You need an SWC for packing custom components or large number of
> application constants to be used across the application.
>
> 2) If your looking just to share constant variable. Have a Action Scrip
> class say ApplicationConstants.as and expose your variables as static and
> use them across application.
>
> 3) Still if you wish to separate these constants to the SWC, just convert
> the Action Sccript file to a class and create a SWC project. Action Script
> file is not a good way to code constants on the first place. I would
> recommend changing that approach.
>
> We generally use include file only to separate out the AS part in mxml file
> to make the code readable. I hope you get the idea.
>
> Hope this helped you.
>
> Cheers,
> Naveen
>
> On Sun, Apr 24, 2011 at 10:01 AM, atul parihar
> <[email protected]>wrote:
>
>> sorry naveen this is not a class. its simple action script file which
>> is contain only variable name and some function, now how can do?
>>
>> Naveen i havw done this thing via include tag but its not perfect, so
>> i am waiting for another approach.
>>
>> I am using as file like,
>>
>> include "../../MyLibProjectName/src/includes/abc.as"
>>
>> but same file, some places like
>> include "../../../../../../../../MyLibProjectName/src/includes/abc.as"
>>
>> So this is my problem
>>
>> Please advice me for another perfect  approach
>>
>>
>> Thanks
>> Atul
>>
>> On 4/24/11, naveen SR <[email protected]> wrote:
>> > Atul,
>> >
>> > You can create a library project. Add your Action script class there.
>> Output
>> > will be an SWC. Use this swc in your project as required.
>> >
>> > Add teh SWC to library in ur original project and import just as any
>> other
>> > flex component.
>> >
>> > Cheers,
>> > Naveen
>> >
>> > On Wed, Apr 20, 2011 at 11:14 PM, atul parihar
>> > <[email protected]>wrote:
>> >
>> >> Hello guys,
>> >>
>> >> I have one issue with flex 3.4
>> >>
>> >> How to include action script file(this is simple as file not class) in
>> >> swc and how we can access different swc and swf ?
>> >>
>> >> Thanks
>> >> Atul
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Flex India Community" group.
>> >> To post to this group, send email to [email protected].
>> >> To unsubscribe from this group, send email to
>> >> [email protected].
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/flex_india?hl=en.
>> >>
>> >>
>> >
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to