This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getPointAt(progress : Number) : Point | |
{ | |
var i : int; | |
var length : int = _points.length; | |
var pointProgress : Number; | |
var totalProgress : Number = 0; | |
for(i = 1 ; i < length; i++) | |
{ | |
pointProgress = Point.distance(_points[i], _points[i - 1]) / _length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function star(items : Array, points : uint, innerRadius : Number = 50, outerRadius : Number = 100, align : String = null) : Distribute | |
{ | |
var path : Path = new Path(); | |
path.offset = DistributeAlign.getOffset(Math.max(innerRadius, outerRadius) * 2, Math.max(innerRadius, outerRadius) * 2, align); | |
var step : Number,halfStep : Number, rot : Number, px : int, py : int, i : int; | |
step = (Math.PI * 2) / points; | |
halfStep = step / 2; | |
rot = Math.PI / (points % 4 ? 2 : 4); | |
px = Math.round(Math.cos(- rot) * outerRadius); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You just have to call the static method "star" and set the parameters of your star | |
var instance : IDistribute = Distribute.star(items : Array, points : uint, innerRadius : Number = 50, outerRadius : Number = 100, align : String = null); | |
// And if you want your items rotate according to the path, do this: | |
var instance : IDistribute = Distribute.star(items, 5, 50, 100, null).orientToPath(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fashion.nugget.motion | |
{ | |
import com.greensock.TimelineLite; | |
import com.greensock.TweenLite; | |
import com.greensock.easing.Expo; | |
/** | |
* @author Grifo.tv / Danilo Figueiredo - http://www.grifo.tv | |
* Lucas Motta - http://lucasmotta.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var text : ColumnText = new ColumnText("The content goes here"); | |
text.htmlText = "You can also change the content at any time"; | |
text.columns = 4; | |
text.margin = 30; | |
text.width = 600; | |
text.height = 400; | |
text.apply(); // Create the columns | |
addChild(text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.imageSequence = function(options) { | |
var params = $.extend({ | |
interval: 100, | |
height: parseInt(this.find("li").css("height")), | |
skipFirst: false | |
}, options); | |
var interval, total, id = 0; | |
var current = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Script to deploy to FTP after a commit using dandelion | |
# This hook will look for any of those tags on your commit message: #deploy, #stage, #production and #dev | |
# If found, it's going to deploy to the given server. | |
# | |
# The following commit message would deploy to the Production and Stage servers: | |
# git commit -m "Fixed bugs on the header #production #stage" | |
# | |
# But you need to have the dandelion config file with the same name of the tag. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trick to execute AppleScript directly on a shell script. | |
# The code below will look for the given url to refresh the tab | |
/usr/bin/osascript << EOF | |
tell application "Google Chrome" | |
activate | |
set theUrl to "http://your-site-url.com" | |
if (count every window) = 0 then | |
make new window | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open /Applications/Google\ Chrome.app/ --args --disable-web-security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body * { | |
-webkit-tap-highlight-color: rgba(0,0,0,0); | |
} |
OlderNewer