Revision: 24800
Updated Code
at July 2, 2010 06:30 by IsoJon
Updated Code
// Right click the movieclip you wish to use in the library and // change the linkage name to "Dot" or create your own custom class. // TweenMax is used in this snippet, get it here: http://www.greensock.com/tweenmax/ // and thank Jack Doyle for being great by donating. import com.greensock.TweenMax; import com.greensock.easing.*; var dotLength : int = 870; // the length that you'd like the dot to be createDotLine( dotLength, 50, 100 ); // place this anywhere, this creates your dot, // it takes three parameters: length + x,y of line function createDotLine( dL:int, sX:int, sY:int ) : void { var dotSprite : Sprite = new Sprite(); dotSprite.y = sY; dotSprite.x = sX; addChild(dotSprite); while ( dotSprite.width <= dL ) { var w : int = dotSprite.width; var d : Sprite = new Dot(); d.x = w; dotSprite.addChild( d ); } for ( var i : int = 0; i < dotSprite.numChildren; i++) { var dS = dotSprite.getChildAt( i ); var plusMinusY : int; if ( i % 2 == 0 ) { plusMinusY = dS.y - 50; } else { plusMinusY = dS.y + 50; } TweenMax.from( dS, .7, { alpha:0, y:plusMinusY, x:dS.x - 40, delay:i * .01, ease:Expo.easeInOut }); } }
Revision: 24799
Updated Code
at July 2, 2010 06:30 by IsoJon
Updated Code
// Right click the movieclip you wish to use in the library and // change the linkage name to "Dot" or create your own custom class. // TweenMax is used in this snippet, get it here: http://www.greensock.com/tweenmax/ // and thank Jack Doyle for being great by donating. import com.greensock; import com.greensock.easing.*; var dotLength : int = 870; // the length that you'd like the dot to be createDotLine( dotLength, 50, 100 ); // place this anywhere, this creates your dot, // it takes three parameters: length + x,y of line function createDotLine( dL:int, sX:int, sY:int ) : void { var dotSprite : Sprite = new Sprite(); dotSprite.y = sY; dotSprite.x = sX; addChild(dotSprite); while ( dotSprite.width <= dL ) { var w : int = dotSprite.width; var d : Sprite = new Dot(); d.x = w; dotSprite.addChild( d ); } for ( var i : int = 0; i < dotSprite.numChildren; i++) { var dS = dotSprite.getChildAt( i ); var plusMinusY : int; if ( i % 2 == 0 ) { plusMinusY = dS.y - 50; } else { plusMinusY = dS.y + 50; } TweenMax.from( dS, .7, { alpha:0, y:plusMinusY, x:dS.x - 40, delay:i * .01, ease:Expo.easeInOut }); } }
Revision: 24798
Updated Code
at July 2, 2010 06:30 by IsoJon
Updated Code
// Right click the movieclip you wish to use in the library and // change the linkage name to "Dot" or create your own custom class. // TweenMax is used in this snippet, get it here: http://www.greensock.com/tweenmax/ // and thank Jack Doyle for being great by donating. import com.greensock.; import com.greensock.easing.*; var dotLength : int = 870; // the length that you'd like the dot to be createDotLine( dotLength, 50, 100 ); // place this anywhere, this creates your dot, // it takes three parameters: length + x,y of line function createDotLine( dL:int, sX:int, sY:int ) : void { var dotSprite : Sprite = new Sprite(); dotSprite.y = sY; dotSprite.x = sX; addChild(dotSprite); while ( dotSprite.width <= dL ) { var w : int = dotSprite.width; var d : Sprite = new Dot(); d.x = w; dotSprite.addChild( d ); } for ( var i : int = 0; i < dotSprite.numChildren; i++) { var dS = dotSprite.getChildAt( i ); var plusMinusY : int; if ( i % 2 == 0 ) { plusMinusY = dS.y - 50; } else { plusMinusY = dS.y + 50; } TweenMax.from( dS, .7, { alpha:0, y:plusMinusY, x:dS.x - 40, delay:i * .01, ease:Expo.easeInOut }); } }
Revision: 24797
Updated Code
at July 2, 2010 06:23 by IsoJon
Updated Code
// Right click the movieclip you wish to use in the library and // change the linkage name to "Dot" or create your own custom class. // TweenMax is used in this snippet, get it here: http://www.greensock.com/tweenmax/ // and thank Jack Doyle for being great by donating. import gs.TweenMax; import gs.easing.*; var dotLength : int = 870; // the length that you'd like the dot to be createDotLine( dotLength, 50, 100 ); // place this anywhere, this creates your dot, // it takes three parameters: length + x,y of line function createDotLine( dL:int, sX:int, sY:int ) : void { var dotSprite : Sprite = new Sprite(); dotSprite.y = sY; dotSprite.x = sX; addChild(dotSprite); while ( dotSprite.width <= dL ) { var w : int = dotSprite.width; var d : Sprite = new Dot(); d.x = w; dotSprite.addChild( d ); } for ( var i : int = 0; i < dotSprite.numChildren; i++) { var dS = dotSprite.getChildAt( i ); var plusMinusY : int; if ( i % 2 == 0 ) { plusMinusY = dS.y - 50; } else { plusMinusY = dS.y + 50; } TweenMax.from( dS, .7, { alpha:0, y:plusMinusY, x:dS.x - 40, delay:i * .01, ease:Expo.easeInOut }); } }
Revision: 24796
Updated Code
at March 11, 2010 11:04 by IsoJon
Updated Code
import gs.TweenMax; import gs.easing.*; var dotLength : int = 870; // the length that you'd like the dot to be createDotLine( dotLength, 50, 100 ); // place this anywhere, this creates your dot, // it takes three parameters: length + x,y of line function createDotLine( dL:int, sX:int, sY:int ) : void { var dotSprite : Sprite = new Sprite(); dotSprite.y = sY; dotSprite.x = sX; addChild(dotSprite); while ( dotSprite.width <= dL ) { var w : int = dotSprite.width; var d : Sprite = new Dot(); d.x = w; dotSprite.addChild( d ); } for ( var i : int = 0; i < dotSprite.numChildren; i++) { var dS = dotSprite.getChildAt( i ); var plusMinusY : int; if ( i % 2 == 0 ) { plusMinusY = dS.y - 50; } else { plusMinusY = dS.y + 50; } TweenMax.from( dS, .7, { alpha:0, y:plusMinusY, x:dS.x - 40, delay:i * .01, ease:Expo.easeInOut }); } }
Revision: 24795
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 11, 2010 11:01 by IsoJon
Initial Code
import gs.TweenMax; import gs.easing.*; var dotLength : int = 870; // the length that you'd like the dot to be createDotLine( dotLength, 50, 100 ); // place this anywhere, this creates your dot, // it takes three parameters: length + x,y of line function createDotLine( dL:int, sX:int, sY:int ) : void { var dotSprite : Sprite = new Sprite(); dotSprite.y = sY; dotSprite.x = sX; addChild(dotSprite); while ( dotSprite.width <= dL ) { var w : int = dotSprite.width; var d : Sprite = new Dot(); d.x = w; dotSprite.addChild( d ); } for ( var i : int = 0; i < dotSprite.numChildren; i++) { var dS = dotSprite.getChildAt( i ); var plusMinusY : int; if ( i % 2 == 0 ) { plusMinusY = dS.y - 50; } else { plusMinusY = dS.y + 50; } TweenMax.from( dS, .7, { alpha:0, y:plusMinusY, x:dS.x - 40, delay:i * .01, ease:Expo.easeInOut }); } }
Initial URL
Initial Description
You can replace the library item with whatever you want, or draw a shape in actionscript to use. TweenMax is used in this snippet, get it here: http://www.greensock.com/tweenmax/ and thank Jack Doyle for being great by donating.
Initial Title
Create Dotted Line (made of any shape/MC)
Initial Tags
line
Initial Language
ActionScript 3