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

  • Home
  • SEARCH
  • 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 544389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:38:58+00:00 2026-05-13T10:38:58+00:00

We’re working on a Flash CS4 project where the main .fla file has ballooned

  • 0

We’re working on a Flash CS4 project where the main .fla file has ballooned in size and ‘Publish’ is taking forever. I suspect a large amount of the size (and at least some of the compile time) is due to the quantity of audio symbols in the library.

I would love to remove this unnecessary bloat from the .fla file. I’ve experimented with removing an audio symbol from the library and using the metadata tag instead, like so:

[Embed(source="audio/music/EndOfLevelDitty.mp3")]
public var EndOfLevelDitty:Class

The resulting published file works perfectly, but there is a problem. Our game uses a preloader on the first frame of the timeline, so all other classes need to be exported in frame 2 (as set in Publish Settings > ActionScript 3.0 Settings). So a size report normally begins like this:

Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    ----------------
      1         284515         284515    Scene 1
      2        5485305        5769820     (AS 3.0 Classes Export Frame)

However, if I use an tag on a small sound, my size report is now:

Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    ----------------
      1         363320         363320    Scene 1
      2        5407240        5770560     (AS 3.0 Classes Export Frame)

As you can see, the embedded sound has been exported into frame 1 rather than frame 2. If I were to embed all sounds in this manner, the size of frame 1 would grow to be huge, and users would be looking at a white screen for ages before the preloader frame even loaded.

So my question is this: can I use an tag but have the embedded asset export in frame 2 instead of frame 1?

Project constraints:

  • Our team composition means we can’t change to pure Flex at this stage.
  • The compiled .swf needs to be ‘all in one’, so we can’t split the preloader into a separate file, and we can’t access external resources.

Edit: I’d also settle for having the audio in an embedded library SWC, but there seems to be no way to make that embed in frame 2 either; it always ends up in frame 1.

  • 1 1 Answer
  • 1 View
  • 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-13T10:38:58+00:00Added an answer on May 13, 2026 at 10:38 am

    In the end I just got fed up with all the mucking around in Flash, and decided to build the preloader (only) in Flex, embedding the game SWF in the preloader and loading it with SWFLoader. (This is based on Myk’s suggestion.) I still get to have a single SWF at the end, with Flex’s more robust preloading system handling the preloader display.

    I didn’t use the full Flex Builder in the end; I just compiled the Flex stuff with mxmlc from the free Flex SDK.

    Here’s my mxml file (I don’t really know what I’m doing with mxml, so please someone tell me if this approach is wrong):

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" preloader="CustomPreloader" width="755" height="500" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#000000, #000000]" frameRate="30">
    <mx:SWFLoader source="@Embed(source='../../trunk/Game.swf')" width="755" height="500" x="0" scaleContent="false" y="0"/>
    </mx:Application>
    

    (CustomPreloader is a simple class that extends mx.preloaders.DownloadProgressBar.)

    What I like about this approach is that I can now do whatever I like over on the Flash side; I can stop worrying about what frame classes are exported on.

    One concern I have is that the game possibly seems to be running slightly slower now. Are there performance issues when using SWFLoader? Is there a more speedy alternative?

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

Sidebar

Ask A Question

Stats

  • Questions 303k
  • Answers 303k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Using the File.createNewFile() you can atomically create a file and… May 13, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer public static string XmlSerializeToString(this object objectInstance) { var serializer =… May 13, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer I was able to accomplish the task with the following… May 13, 2026 at 8:39 pm

Related Questions

We are developing a little application that given a directory with PDF files creates
We have been using CruiseControl for quite a while with NUnit and NAnt. For
We have a requirement in project to store all the revisions(Change History) for the
We have a remoting singleton server running in a separate windows service (let's call
We have an SVN repository running on a Windows server, and I want to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.