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 8569871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:26:07+00:00 2026-06-11T18:26:07+00:00

I want a few Flex (SDK 4.6) applications to share the same stylesheet (stored

  • 0

I want a few Flex (SDK 4.6) applications to share the same stylesheet (stored in CSS file). However I do not want to distribute standalone file along those applications’ SWFs, but rather want to embed the CSS file into Flex application file (just as you embed images etc.). CSS declarations include font-embeddings so it is (I think) impossible to load CSS at runtime.

What I already found out:

  1. I cannot simply use <fx:Script source="@Embed(stylesheet.css)" />. Wrong syntax.

  2. I cannot use inline stylesheet in some MXML component that is shared among applications because CSS contains type declarations which are not allowed in components.

  3. I can choose to compile CSS to SWF but this creates standalone SWF file (so I can embed Flex framework into SWF but not a standalone CSS ;]).

I hope I am missing something obvious and this is fairly easy to achieve.

  • 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-06-11T18:26:08+00:00Added an answer on June 11, 2026 at 6:26 pm
    • Create a library project (producing a swc file)
    • Add the stylesheet as a resource
    • Put this project (or the compiled swc) on your other project’s build path
    • You can now use this resource from within your other projects:
      <fx:Style source="stylesheet.css" />

    As an example:
    In the librabry project you have src/stylesheet.css
    If src is a source folder, the file should automatically be packaged into the library
    If it’s not, you’ll have to manually add the files: in FlashBuilder this can be done through the Assets tab of the Build path editor. On the command line, add it with the -include-file option.

    An alternative to using the swc as a library dependency, is to define it as a theme dependency. In FlashBuilder there’s a Theme wizard in the project properties. On the command line do:

    mxmlc -theme="/path/to/my/theme.swc" MyApp.mxml
    

    If you use it as a theme, you don’t even have to include the fx:Style tag in your Application. The CSS is included by default. But I think it has to be named defaults.css.

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

Sidebar

Related Questions

I want to copy few files into an existing zip file using ANT script.
I want a few constructors defined in a PHP class. However, my code for
In my flex app there are a few custom components. I want to create
I want to load an image into the background of my Flex app. However,
I have a few HTML pages that I want to display in a Flex
I want to restrict few file types format and allow all others in regular
I want to block few mobile numbers from my application. I mean can receive
Lets say I want to make few classes to determine behaviour of agents. The
I am new to web programming,learning VBScript.I want to display few text boxes in
I am invoking camera from my application. i want to remove few menu items

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.