This content has been marked as final.
Show 5 replies
-
1. Re: How to reference an ActionScript file in an custom MXML component
Gregory Lafrance Dec 8, 2008 3:07 PM (in response to rtalton)src/com/LoginForm.mxml
src/as/SharedObjects.as
so maybe:
<mx:Script source="../as/SharedObjects.as"/>
or
include "../as/SharedObjects.as";
or if they don't work:
<mx:Script source="..\as\SharedObjects.as"/>
or
include "..\as\SharedObjects.as"; -
2. Re: How to reference an ActionScript file in an custom MXML component
ntsiii Dec 8, 2008 6:16 PM (in response to rtalton)Yeah, sometimes relative paths can be tricky.
Sometimes I just do it a step at a time, moving the include up one level and making sure I can find it, then down, check again, then down again....
Tracy -
3. How to reference an ActionScript file in an custom MXML component
rtalton Dec 8, 2008 7:44 PM (in response to ntsiii)Thanks Greg and ntsiii. I will try these ideas tomorrow at work. -
4. Re: How to reference an ActionScript file in an custom MXML component
rtalton Dec 9, 2008 7:26 AM (in response to rtalton)Greg,
The line:
<mx:Script source="../as/SharedObjects.as"/>
worked!
Thanks for the assist. I just couldn't "get it"! It was the ".." that I hadn't tried.
ntsiii, thanks for your help, also.
Have a great day. -
5. Re: How to reference an ActionScript file in an custom MXML component
wendy888 Nov 11, 2009 8:54 AM (in response to Gregory Lafrance)Hi, Greg,
I tried all ways that you mentioned, but I still get error : unable to open the file
My path like below:
src/
views/xxx.mxml
loader/xxx.as
My .mxml file is in views folder and my .as file is in loader. If I move .as file under views folder, it works fine ,but I want to put all .as load files into loader folder and all .mxml files into views.
Can you help on this?
Thank you in advance.



