Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411516 Posts in 69380 Topics- by 58436 Members - Latest Member: GlitchyPSI

May 01, 2024, 07:03:20 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Animation
Pages: [1]
Print
Author Topic: Animation  (Read 1301 times)
nqe
Level 0
**


View Profile
« on: July 20, 2010, 05:15:36 AM »

What would be the best way to do animation with flex + flashdevelop? For example, say I make an explosion animation using blender and want to export it for use with flex with a transparency layer, how should I save the animation?

I've tried as a gif, but it doesn't seem like that is one of the supported embed types. I've also tried converting it to swf, but then I can't seem to figure out how to make the background transparent.

Any suggestions?
Logged
davidp
Level 6
*



View Profile WWW
« Reply #1 on: July 20, 2010, 05:34:53 AM »

i'm sorry for not helping you, but i'm wondering what tool did you use for swf creation?
Logged

raigan
Level 5
*****


View Profile
« Reply #2 on: July 20, 2010, 06:08:38 AM »

I think .png should work if you want transparency..
Logged
nqe
Level 0
**


View Profile
« Reply #3 on: July 20, 2010, 08:50:38 AM »

i'm sorry for not helping you, but i'm wondering what tool did you use for swf creation?

Trial version of "Easy GIF Animator". I am hoping to find a free solution for this, so if anyone has suggestions... I think there might be a Blender plug-in for exporting animations as swf, but I have yet to check that out.

I think .png should work if you want transparency..

As far as I know .png is very resource intensive, and not a standard way to do animation.
Logged
nqe
Level 0
**


View Profile
« Reply #4 on: July 20, 2010, 09:27:17 AM »

Yes! Got it!

This sweet sweet, shady looking product seems to do the job:
http://www.develotec.com/png2swf/

It takes a list of png files and produces an SWF with transparency. And it's freeware. Yay for the Internet!

Logged
bateleur
Level 10
*****



View Profile
« Reply #5 on: July 20, 2010, 11:16:54 AM »

As far as I know .png is very resource intensive
Not that it will affect you now you've found a tool (hurrah!) but in fact this is not the case. PNG is a compressed format and is generally quite efficient.
Logged

nqe
Level 0
**


View Profile
« Reply #6 on: July 20, 2010, 03:13:24 PM »

Gah, another problem making me go Crazy. If there is a flash master reading this I would be very appreciative of any hints.

I load the swf anim by embedding it as:
Code:
[Embed(source = "../graphics/explosion1.swf")] public static var ExplosionSwf:Class;

Then I create a MovieClip object and init:
Code:
expl = new Assets.ExplosionSwf;	

And the animation works wonderfully except for the part where the expl.stop() function doesn't work and the animation just keeps looping...

Any suggestions  Beg
Logged
iopred
Level 0
**


Gutsch


View Profile
« Reply #7 on: July 21, 2010, 02:04:43 PM »

Gah, another problem making me go Crazy. If there is a flash master reading this I would be very appreciative of any hints.

I load the swf anim by embedding it as:
Code:
[Embed(source = "../graphics/explosion1.swf")] public static var ExplosionSwf:Class;

Then I create a MovieClip object and init:
Code:
expl = new Assets.ExplosionSwf;	

And the animation works wonderfully except for the part where the expl.stop() function doesn't work and the animation just keeps looping...

Any suggestions  Beg

The [Embed] tag strips code from swfs.

Two solutions: 1. Use a swc instead, and add it to the compiler libraries.

2. Use addFrameScript to put the stop() in:

{
expl = new Assets.ExplosionSwf;
expl.addFrameScript(expl.totalFrames, stopExpl);
}

function stopExpl():void {
expl.stop();
}

You may be able to get away with anonymous functions, except they are ugly and are likely to stop the MovieClip from being garbage collected:

expl.addFrameScript(expl.totalFrames,
    function():void {
        expl.stop();
        expl.addFrameScript(expl.totalFrames, null }
    );
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic