May 24, 2012, 08:49:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Prowlie Welcome back! The site migration is complete and normal service resumed.
Advanced search
Pages: [1]   Go Down
Print
Author Topic: Need super help.  (Read 1002 times)
0 Members and 1 Guest are viewing this topic.
Juggleballz
Funk Junky
MotM
Heroic
**
Offline Offline

Gender: Male
Posts: 4924



WWW
« on: March 09, 2010, 06:50:30 AM »

I have a logo i need to animate. But it requires some action script, hopefully from your beautiful minds.

So what I kinda need is a simple particle animation. Imagine a dust cloud, or molecular nucleus with loads (like 100) electrons flying around it, but really small electrons. There are 3 colours of electrons flying around, blue green and white (needs to be editable when i figure out the correct colours) The nucelus itself will be logo text.

Any visual effects like motion blur or depth of field focus etc would be sweet too. Smiley

After about 5 seconds of random swirling and spinning, the 3 different coloured electrons group respectively, based on their colours.

Now this isn't exactly what im 100% after but it is enough for now, and hopefully it will progress.

And by the way, thank you to whoever takes this upon themselves to do. I love you already.Smiley
Logged

The value of life lies not in its length, but in its depth and breadth.
adzy-2k6
Senior Member
****
Offline Offline

Posts: 720


« Reply #1 on: March 09, 2010, 08:07:32 AM »

Interesting idea. Im not very good at actionscript but ill have a try if i get some free time tomorrow night. Might be better if one of the resident super scripters takes this on though Tongue
Logged

supermoose
Full Member
***
Offline Offline

Gender: Male
Posts: 240


Yes. I beat IWBTG. Only took ~60 hours of play.


« Reply #2 on: March 09, 2010, 08:22:40 AM »

I'd be willing to give this a shot. A couple of additional questions for you, though:

-Do the electrons circle the words?  Specifically, to the spin randomly in front of the words, or do they need to disappear behind the logo?

-Do you have a .fla with the electrons and logo to work with?  (even if its not final)

-What is the timeframe for this?
Logged

Juggleballz
Funk Junky
MotM
Heroic
**
Offline Offline

Gender: Male
Posts: 4924



WWW
« Reply #3 on: March 09, 2010, 08:19:43 PM »

I'd be willing to give this a shot. A couple of additional questions for you, though:

-Do the electrons circle the words?  Specifically, to the spin randomly in front of the words, or do they need to disappear behind the logo?

-Do you have a .fla with the electrons and logo to work with?  (even if its not final)

-What is the timeframe for this?

Unfortunately no. I don't have a fla of this just yet. Its still in the early stages of a brain fart to be honest. And yeah having the electrons float behind is a good point. I should have mentioned that. I also need tot be able to edit the electron's appearance as well, so if they were actual movie clips or graphics that would help a lot. Smiley

Timeframe....good question. Obviously the sooner the better, but I don't want to pressure anyone who agrees to helping me. I really appreciate your time in reading and attempting to give it a shot. Smiley

To adzy: thanks mate, means a lot. Could be a nice exercise to get you more familiar with action script Smiley

Thanks chaps, i love you. Smiley SmileySmiley
Logged

The value of life lies not in its length, but in its depth and breadth.
Vector
Resident Actionscript Guru
Assistant Admin
Heroic
****
Offline Offline

Gender: Male
Posts: 3803


~ Programmer | National Laser Tag Player | Bent ~


WWW
« Reply #4 on: March 10, 2010, 12:27:28 AM »

If anyone's interested on working on this, I've thrown something of a starting point together (AS3).
Create a new file, add a movieclip called mcAtom to the library (make sure you export it for actionscript). Give it 3 frames, one with a circle of each colour.

Put this code on the root timeline:

Code:
var aAtoms:Array = new Array();

for( var i:int = 0; i < 300; i++ )
{
var mc:mcAtom = new mcAtom();
mc.gotoAndStop( Math.ceil( Math.random() * 3 ) );
mc.cX = 400;
mc.cY = 300;
mc.radius = 200;

mc.phase = Math.random() * 360;
mc.velocity = 2 + Math.random() * 2;

mc.phaseX = Math.random() * 360;
mc.velocityX = 2 + Math.random() * 2;

mc.phaseY = Math.random() * 360;
mc.velocityY = 2 + Math.random() * 2;

addChild( mc );
aAtoms.push( mc );
}

And put this code in mcAtom.as:
Code:
package
{

import flash.display.*;
import flash.events.*;

public class mcAtom extends MovieClip
{

public var cX:Number;
public var cY:Number;
public var radius:Number;
public var phase:Number;
public var phaseX:Number;
public var phaseY:Number;
public var velocity:Number;
public var velocityX:Number;
public var velocityY:Number;

public function mcAtom() : void
{
addEventListener( Event.ENTER_FRAME, this.atomize );
}

public function atomize( e:Event ) : void
{
this.phase = ( this.phase + this.velocity ) % 360;
this.phaseX = ( this.phaseX + this.velocityX ) % 360;
this.phaseY = ( this.phaseY + this.velocityY ) % 360;
this.x = this.cX + Math.cos( this.phaseX * Math.PI / 180 ) * this.radius * Math.cos( this.phase * Math.PI / 180 );
this.y = this.cY + Math.sin( this.phaseY * Math.PI / 180 ) * this.radius * Math.sin( this.phase * Math.PI / 180 );
this.scaleX = ( Math.cos( this.phase * Math.PI / 180 ) + 1.1 ) / 2;
this.scaleY = this.scaleX;
}

}

}

Not the most elegant, but it seems to do the job so far. Can probably be improved on, but I really need to get some sleep before work in 5 hours. Tongue
Logged

~Vector
Vector
Resident Actionscript Guru
Assistant Admin
Heroic
****
Offline Offline

Gender: Male
Posts: 3803


~ Programmer | National Laser Tag Player | Bent ~


WWW
« Reply #5 on: March 10, 2010, 12:32:43 AM »

Or, just try this... Smiley

Atoms.fla
mcAtom.as

<a href="http://www.vector.id.au/drop/Atoms.swf" target="_blank">http://www.vector.id.au/drop/Atoms.swf</a>
Logged

~Vector
Juggleballz
Funk Junky
MotM
Heroic
**
Offline Offline

Gender: Male
Posts: 4924



WWW
« Reply #6 on: March 10, 2010, 01:07:05 AM »

Dude....Vector...Daniel!....I love you.

This is very much what I am after "like a dust cloud" effect. Thank you so much my friend.
Is there a way, that after 5 seconds, that the particles can group together based on their colours?

Man I love this effect so much. Oh and can subtle motion blur be added to the balls, or a glow etc. I know it might become a process hogger if too complex, but I intend on producing it as a video anyway. Smiley

Logged

The value of life lies not in its length, but in its depth and breadth.
Vector
Resident Actionscript Guru
Assistant Admin
Heroic
****
Offline Offline

Gender: Male
Posts: 3803


~ Programmer | National Laser Tag Player | Bent ~


WWW
« Reply #7 on: March 11, 2010, 01:01:10 AM »

Same swf file so you might need to do a control-F5 refresh.
Also, it will only play through once so be quick! If you want to see it again refresh the page.

<a href="http://www.vector.id.au/drop/Atoms.swf" target="_blank">http://www.vector.id.au/drop/Atoms.swf</a>

Atoms.zip

Change this stuff at the top of the flash file for desired timing and effects:
Code:
var particleCount:Number = 150; //total number
var timeUntilAnimation:Number = 5 * 1000; //milliseconds
var animationLength:Number = 150; //frames
var finalRadius:Number = 50; //pixels
var timeUntilKill:Number = 11 * 1000; //milliseconds

Move the targets on the stage around to make the "atoms" go to the desired locations.

If you want blur you'll just have to apply it inside the movieclip when you put your own ones in; You can't do rotational motion blur easily and it's 2am and I have to get up in 4 hours to go to work so I can't be stuffed. Tongue

Enjoy
Logged

~Vector
Juggleballz
Funk Junky
MotM
Heroic
**
Offline Offline

Gender: Male
Posts: 4924



WWW
« Reply #8 on: March 12, 2010, 11:57:14 PM »

Daniel. that is brilliant mate. Really I love it!

Thank you so so much man.

If i were gay I would so kiss you right now lol Wink  Kiss
Logged

The value of life lies not in its length, but in its depth and breadth.
Brackenwood
   

 Logged
Pages: [1]   Go Up
Print
Jump to:  

Theme by Pieter, based on Black Rain by Crip Powered by SMF 1.1.16 | SMF © 2011, Simple Machines XHTML | CSS

Page created in 0.072 seconds with 25 queries.