Skip to content

Instantly share code, notes, and snippets.

⚙️
Workin' on Chrome extensions!

Dave Stewart davestewart

⚙️
Workin' on Chrome extensions!
Block or report user

Report or block davestewart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davestewart
davestewart / gist:1041464
Created Jun 22, 2011
Multiple JSDoc parameters example
View gist:1041464
/**
* Set the Frame of the Context object
* @param value {Context} A Context object with a valid frame property
* @param value {Boolean} Pass true to grab the current frame
* @param value {String} The name of the frame
* @param value {Number} The 0-based index of the frame
* @param value {Frame} A Frame
* @param [allLayers] {Boolean} Optionally search all layers, when specifying a named frame
* @returns
*/
@davestewart
davestewart / gist:1042345
Created Jun 23, 2011
xJSFL reporting output
View gist:1042345
// --------------------------------------------------------------------------------
// core
/core
/assets
/swf
/config
/templates
/errors
@davestewart
davestewart / gist:1042352
Created Jun 23, 2011
xJSFL reporting code
View gist:1042352
// initialize framework
xjsfl.init(this);
// file / folder callback
function callback(element, index, level, indent)
{
var str = ' ' + indent + '/' + element.name;
if(element instanceof File)
{
if(/^jsfl|xml|as$/.test(element.extension))
View Dependency loader test.js
/**
* Dependancy loader test
*/
// --------------------------------------------------------------------------------
// functions
trace = fl.trace;
clear = fl.outputPanel.clear;
@davestewart
davestewart / gist:1151965
Created Aug 17, 2011
Dependency loader test: Output
View gist:1151965
=> LOADING "A" (requires "B", "E")
=> LOADING "B" (requires "A")
"A" is already loaded!
:) "B" COMPLETE!
=> LOADING "E" (requires "F")
=> LOADING "F" (requires "B", "E")
"B" is already loaded!
"E" is already loaded!
:) "F" COMPLETE!
@davestewart
davestewart / prototype demo.js
Created Aug 18, 2011
prototype + for..in demo
View prototype demo.js
// modify Object.prototype
Object.prototype.property = 'NEW PROPERTY';
// decalre datatypes
var datatypes =
[
'hello',
1,
new Date(),
{a:1, b:2, c:3},
@davestewart
davestewart / gist:1170345
Created Aug 25, 2011
Make Animation: Imports a sequence of png files and exports an SWF
View gist:1170345
/**
* Make Animation
* Imports a sequence of png files and exports an SWF
* @author Dave Stewart
* @see www.xjsfl.com
*/
function makeAnimation()
{
var folder = fl.browseForFolderURL();
if(folder)
@davestewart
davestewart / gist:1176129
Created Aug 28, 2011
/libraries/pocket god lib.jsfl
View gist:1176129
// From line 829...
// --------------------------------------------------------------------------------
// add a root node to the xml so we can add two nodes
oXml = "<export>\n" + oXml;
if ( oButtonGroupId != null)
{
View A4Page.as
package utils
{
import flash.display.Bitmap;
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Rectangle;
import flash.net.URLRequest;
import flash.printing.*;
@davestewart
davestewart / auto-comment.js
Created Sep 21, 2011
Auto-Commenting macro for Komodo Edit
View auto-comment.js
/**
* @fileoverview Enter trigger for PHPdoc (code based on TAB trigger for Abbreviations by Stan Angeloff)
* @author Nathan Rijksen (http://naatan.com/)
* @contributor Todd Whiteman
* @contributor Michal Kocarek (http://brainbox.cz/)
* @contributor Alexander Kavoun (http://takkmoil.com/)
* @contributor Dave Stewart (http://davestewart.co.uk/)
* @version 0.3
*/
xjsfl.autocomment =
You can’t perform that action at this time.