Yes, or <mx:Script source="myFolder\myFile.as" />

 

Doing this essentially copies the included file into the script block,
so it can not be a class.

 

A full path should work.  

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeffry Houser
Sent: Monday, February 09, 2009 9:23 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] ActionScriot file in Componet

 


 Can you share some code?  Something like this should work:

<mx:Script>
 include 'myfile.as';
</mx:Script>

 However, if you're "myfile.as" is an actual class definition, as
opposed to ActionScript snippets I would expect that to cause odd
errors.  

 Additionally, how do you define "Whole Path?"  I've always used a
relative path from the includee file.  

cool buddy wrote: 

        
        HI all,
        
        I am trying to include an actionscript file in a MXML component
file by including the whole path of the file. But it gives me an error
saying "Unable to open the included file"..
        
        When i include the file in main application file  there is no
error. is there any that i need to change.
        
        Please let me kow,.
        
        Thanks,

         





-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
<http://tinyurl.com/684b5h> 
http://www.twitter.com/reboog711 <http://www.twitter.com/reboog711>   |
Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com.com?c=104 <http://www.flextras.com.com?c=104> 
--
http://www.theflexshow.com <http://www.theflexshow.com> 
http://www.jeffryhouser.com <http://www.jeffryhouser.com> 
--
Part of the DotComIt Brain Trust



Reply via email to