Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 908053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:39:12+00:00 2026-05-15T16:39:12+00:00

I have implemented some utility classes in Flex that I want to use in

  • 0

I have implemented some utility classes in Flex that I want to use in multiple AIR projects. I have created a swc which contain these classes. I am working on a Linux machine and do not have FlashBuilder. So I am using the compc and mxmlc command line SDK tools. My problem is that I have not been able to find a way to specify the swc when building the standalone project. A tutorial suggested the following command:
mxmlc -load-config /opt/flex/4.1.0/frameworks/air-config.xml -library-path=/path/to/utility.swc hello.mxml. However, using that gives me the error hello.mxml: Error: Unable to locate specified base class 'mx.core.WindowedApplication' for component class 'hello'. Everything works fine if I move all code from the swc to a single monolithic pro ject. Can anyone help me out here? The code for the standalone project is:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" windowComplete="completeHandler();">
<mx:Script>
<![CDATA[
import com.example.Ext;
private function completeHandler():void
{
    var e: Ext = new Ext();
    e.hi();
}
]]>
</mx:Script>
<mx:Label text="Hello World" />
</mx:WindowedApplication>

The type Ext is contained in utility.swc.

UPDATE:
I fixed the previous error. The commandline should have been mxmlc -load-config /opt/flex/4.1.0/frameworks/air-config.xml -library-path+=/path/to/utility.swc hello.mxml. This appends my swc to the existing library path instead of replacing it. However, I have a new problem. Now the error is hello.mxml(10): Error: Type was not found or was not a compile-time constant: Ext. I am pasting the code for utility.swc as well:

package com.example {
    public class Ext {
        public function Ext {
            // do something
        }   
        public function foo( ): void {
            return;
        }   
    }   
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:39:13+00:00Added an answer on May 15, 2026 at 4:39 pm

    Use -library-path+=/path/to/my.swc. If you use = instead of +=, the compiler will discard all the platform libraries already in the path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented PullRefreshTableViewController with some classes that take no delegates, and it works
I have some classes as below, i have implemented the Equals(Object) method for almost
I frequently find myself writing utility classes that can be re-used throughout my projects.
I have implemented some version of tuple class , and really want to learn
I have implemented some code that will automatically set a UIScrollView's ContentOffset when the
I have a main parent winform in which I have implemented some features and
I want to stop threads by using a boolean field. I have implemented some
I have a little game, where I implemented some collision detection. Now I want
I have just implemented some classes: public abstract class Job<T extends ViewerUnion>{ [...] }
Sometimes we have several classes that have some methods with the same signature, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.