• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Here's one for the bored :)

Guest
May 05, 2009 May 05, 2009

Copy link to clipboard

Copied

This is another one of those things that I can do from the timeline, but haven't been able to build just using AS3.  I get the opinion that all of the good Flash guys are doing more with just code than using the timeline.  I'm assuming this allows them to re-use code thereby giving them faster build time.  But then again, it may be just so that they can show off

Whatever the case, here's one that I'm thinking should be fairly simple if you're good!

http://gtwebconcepts.com/Junk/JetTween.html

PS. Don't bother with the XML stuff...that's way beyond me (for the moment).

TOPICS
ActionScript

Views

446

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2009 May 05, 2009

Copy link to clipboard

Copied

that's a simple rotation and fade.  what about it are you having trouble with.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2009 May 05, 2009

Copy link to clipboard

Copied

uhhhh...

pretty much everything between the package braces

This was the general idea that I had looking at it starting (and then realized I'd have it done in about 10 minutes if I used the timeline).  I'm not sure if this would be along the right track or not though.

package{

import transitions, easing, movieClip

public class ___ extends movieClip{

     public function(){

     build an array to hold the photos

          loop through

               rotate ()

               alpha ()

               timer()

               counter()

          end loop

}

}

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 05, 2009 May 05, 2009

Copy link to clipboard

Copied

LATEST

All's you really need is a set of coded tweens in a function for the rotation, scale, and alpha, along with a listener for one of them, for an object--and probably a counter to manage the image movieclips with a conditional attached to start over. Each clip is set back to full upright scale at the back of the pack upon completion. The listener completion triggers the next object to be subjected to the same tweens.  You don't want to use a straight out loop (for, etc), more like a recursive call via the tween listener.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 05, 2009 May 05, 2009

Copy link to clipboard

Copied

Those guys that do everything just in code are masochists, I reckon! But in this case, code can cope:
This is the frame 1 script of a library movieclip, shared as SpinPic, and with its contents centered at 0,0:

var t:Timer=new Timer(30,0);
t.addEventListener(TimerEvent.TIMER,spinout);
t.start();
function spinout(e:TimerEvent) {
rotation+=5;
alpha-=.03;
scaleX-=.03;
scaleY-=.03;
if (alpha<=0) {
t.stop();
t.removeEventListener(TimerEvent.TIMER,spinout);
t=null;
this.parent.removeChild(this);
}
}
and this in frame 1 of the main time line:

stage.addEventListener(MouseEvent.CLICK,addpic);
function addpic(e:MouseEvent) {
var p:SpinPic = new SpinPic();
p.x=stage.stageWidth/2;
p.y=stage.stageHeight/2;
addChild(p);
}
Each time you click you'll get another one of the SpinPics appearing, and rotating and shrinking and fading, until it's faded out, and then it removes itself.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines