I was baffled to find that when I edited the text of a TextField using ActionScript 3 (AS3), I was left with RANDOM GIBBERISH. Hours were lost snooping around in my epic project, trying to figure out how anything could cause this problem.
Turns out it’s a feature in CS5!?!
AN EXAMPLE: Continue reading →
appears that when you load things, they are a loader object.
you may know you loaded a movie, but flash just stops at “it’s a loader”
I was having a problem recently where: I imported a bunch of .swfs into an array; when little buttons are clicked I wanted to display a certain .swf (from this array). Problem is, they were all displaying at the end of their animation.
I dimly remember a similar problem last year, where I loaded in a bunch of .swfs with sound, and this cacophony of noise blared out while they were loading. it seems they were all playing the moment they were loaded.
Is this a loader thing? or a mistake on my part?
the solution I’ve found is that you have to make the .swf go to it’s 1st frame and play (at the same time you are making it visible). like this:
Note that I have to ‘typecast’ it as a movieclip, or else it won’t let me use this gotoAndPlay function.
short version: don’t import external .swf files into your library
So i’m working on a language project where i need to pull in 78 different animations. These animations show you how to draw a letter, stroke by stroke. (When you click certain letters in a sentence, it will show you how to draw that letter – letters in this foreign language).
I’ve already setup an animation for each letter. I placed each stroke on a separate layer, and animated a simple circle mask to reveal each stroke/layer, in turn. I’ve saved each animation out to it’s own uniquely named .swf file. Each file is usually around 20kb in size.
I just imported 25 of these .swf files into my main project’s library.
– All together, they were 450 KB in my Window’s directory.
– but now the .FLA file I’ve imported into has increased in size : from 1.36 MB to 23.5 MB.
– That’s a 22.14 MB file size increase! what is that, like 17 times as large?
It also seemed to lock up Flash for several minutes while it processed the files. It appears they have been converted to individual key frames – each with it’s own unique instance of the stroke and the mask. T
Soooo, point taken: don’t import .swf files into your library if you can help it. bleargh. Now I’ll go program it to import all these .swf files at runtime, and see how this affects performance. weee! If I don’t write more, then it’s to be assumed this is a much better approach.