Skip to main content
Participant
February 10, 2009
Question

How do you compile Flex-dependent classes with ASC?

  • February 10, 2009
  • 4 replies
  • 953 views
Hi,

I've been trying unsuccessfully for most of the evening to compile a .as file that relies on mx.collections.ListCollectionView using asc. I figured I could just import the Flex framework SWCs from the command line with asc, but asc doesn't seem to respect SWCs - it only seems to respect .abc files.

So, I've spent most of my time trying to compile the Flex framework into a single .abc file that I can import whenever I want to compile a class that relies on Flex. I figured I could make a base .as file with include statements for all of the Flex .as files (copying the approach I saw for files like builtin.as) and compile that, but all I seem to get are compiler errors - mostly "[Compiler] Error #1181: Forward reference to base class (base class name)."

I have a feeling I'm doing this completely the wrong way. I'd very much appreciate any assistance that anybody can offer me.

Thanks,

- max
This topic has been closed for replies.

4 replies

Participant
February 10, 2009
Thanks Robin - I've actually got a good discussion going with the guys on the Tamarin mailing list who suggested the same thing. The problem is exactly what you described (as I suspected), but the issue is that there are hundreds of classes in Flex and figuring out the import order could take ages. I was hoping that the asc compiler would be smart enough to figure this out and set up the order, but that doesn't seem to be the case.

Erik Tierney suggested that I just compile a SWF the old-fashioned way and use abcdump to get the ABC code if I want to look at it. I'll probably just do that.

Thanks,

- max


On Feb 10, 2009, at 10:19 AM, Robin Berjon wrote:

A new message was posted by Robin Berjon in

Developers --
  How do you compile Flex-dependent classes with ASC?

Maxim,

have you tried changing the order of your imports? I couldn't find documentation for that error but it sounds like you have a class that inherits from another that isn't defined yet (a quick look at the source seems to concur). Try moving the import for the base class right above the one that is giving the error and see if you don't get a different error. You might have to do a few times before it works.


View/reply at How do you compile Flex-dependent classes with ASC?
Replies by email are OK.
Use the unsubscribe form to cancel your email subscription.


Participant
February 10, 2009
Maxim,

have you tried changing the order of your imports? I couldn't find documentation for that error but it sounds like you have a class that inherits from another that isn't defined yet (a quick look at the source seems to concur). Try moving the import for the base class right above the one that is giving the error and see if you don't get a different error. You might have to do a few times before it works.
Participant
February 10, 2009
Alex,

Yes, I am familiar with the regular command line tools for the SDK. That is not the issue. I need to create .abc files since I'm working on a bytecode instrumentation project.

One option would be to create SWFs with the regular SDK tools and crack them to pull out the bytecode (there's an open source project called SwfUtils that does just that), but I'd like to solve the mystery with how to do this with asc.

If anybody can assist with the original question, that would be great.

Thanks,

- max
Participating Frequently
February 10, 2009
<div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I use MXMLC to compile my .as file projects.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Maxim Porges<br />[mailto:member@adobeforums.com] <br><br /><b>Sent:</b> Monday, February 09, 2009 9:22 PM<br><br /><b>To:</b> flexsdk-dev@adobeforums.com<br><br /><b>Subject:</b> How do you compile Flex-dependent classes with ASC?<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />Maxim Porges in <br><br /><br><br /><b>Developers</b> --<br><br />  How do you compile Flex-dependent classes with ASC?<br><br /><br><br />Hi, <br><br /><br><br />I've been trying unsuccessfully for most of the evening to compile a .as file<br />that relies on mx.collections.ListCollectionView using asc. I figured I could<br />just import the Flex framework SWCs from the command line with asc, but asc<br />doesn't seem to respect SWCs - it only seems to respect .abc files. <br><br /><br><br />So, I've spent most of my time trying to compile the Flex framework into a<br />single .abc file that I can import whenever I want to compile a class that<br />relies on Flex. I figured I could make a base .as file with include statements<br />for all of the Flex .as files (copying the approach I saw for files like<br />builtin.as) and compile that, but all I seem to get are compiler errors -<br />mostly &quot;[Compiler] Error #1181: Forward reference to base class (base<br />class name).&quot; <br><br /><br><br />I have a feeling I'm doing this completely the wrong way. I'd very much<br />appreciate any assistance that anybody can offer me. <br><br /><br><br />Thanks, <br><br /><br><br />- max <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d5d2">How do you compile<br />Flex-dependent classes with ASC?</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d5d2!folder=.3c060fa3">unsubscribe</a><br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>