Author Topic: Embedding files bigger than 500K makes Flash crash.  (Read 1022 times)

lnBetween

  • Member
  • **
  • Posts: 59
  • Karma: +0/-0
    • View Profile
When I embed files using one of those lines of code:

Code: [Select]
[Embed(source="myfile.mp3")] public var MyMusic:Class;
or

Code: [Select]
[Embed(source = "myfont.ttf", fontFamily = "myFont", embedAsCFF = "false")] protected var FontClass:String;
If either of the files are above ~500K it makes the Flash CS5 player either crash or show a blank screen for the game.

Is this standard? I mean is there a maximum load size of around 500K?

DelishusCake

  • délicieux gâteau
  • Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: Embedding files bigger than 500K makes Flash crash.
« Reply #1 on: Wed, Nov 3, 2010 »
Is this standard? I mean is there a maximum load size of around 500K?
Hmm...that has never happened to me before. The problem could be you are embedding too much in one class, so you could try spreading the embeds out, I would try streaming the music from the web to reduce lag.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Embedding files bigger than 500K makes Flash crash.
« Reply #2 on: Wed, Nov 3, 2010 »
Hmm there must be something else causing it, I've got a 2MB MP3 embedded quite happily. Mind you I never compile through CS5, always through flex. Have you tried it in Debug FlashPlayer? I'd imagine it throws a proper error for you then.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

carls

  • Member
  • **
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Embedding files bigger than 500K makes Flash crash.
« Reply #3 on: Sun, Nov 7, 2010 »
I've this problem too..
My assets is not bigger than 500k, but I embed more then 6 pngs. Before, this error never happened and work fine, someday I did open my flash and pffff....
If I comment some embedds, works fine. Sometimes 4 embedds work, sometimes only 3, sometimes all embedds works...I don't understand it.
Maybe is some problem with CS5?