Tuesday, March 28, 2006

Flash Master

ActionScript blows.

Moving things around in Flash is now a piece of cake for me - but the real power of Flash is in the code. Code that I'm not very good at. But code that allows you to 'cheat' in Flash.

Flash has a 16,000 frame limit. From what I can gather from the internet ( cuz you know if it's on the internet, then it has to be true ) - the limit is a holdover from earlier flash versions - but the programmers have just never taken the limit away.

16000 might sound like alot, and it is... but to record on DVD, you have to be at 30 frames per second... which means there's now a limit of just under nine minutes.

But there's a roundabout way to cheat. You can insert ActionScript code, which will load a movie 'inside' your other movie, thus increasing the number of frames. Say you have a movie with 1000 frames. You are allowed to use ActionScript on the 1001st frame, and in effect, embed another movie in the 1001st frame.

So for our example, lets say the second movie has 750 frames. When you load the finished product, flash thinks there's only 1001 frames - when the actual playback will include 1750 frames.

The code required to do that looks like this:

//var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.onRelease = function():Void {
trace(this.image._url); // annivlogo1.swf
}
var image:MovieClip = mc.createEmptyMovieClip("image", mc.getNextHighestDepth());
image.loadMovie(annivlogo1.swf);

Are you kidding me?!?!? There has got to be something simpler in the programming world.

Thank goodness for cut and paste. Cuz I have NO idea what the hell all that means. Sheesh.

3 Comments:

At 9:55 PM, Anonymous Anonymous said...

Makes sense to me. Love, MomWoman

 
At 10:18 AM, Blogger Nick said...

That's strange... 16000 doesn't make sense at all. 32,768 would make much more sense, or 65,536... but 16,000?

 
At 4:32 PM, Anonymous Anonymous said...

Did I ever give you that flash book? Or do I still have it?

-chris

 

Post a Comment

<< Home