This library is already included as part of next Flex version, Gumbo and Adobe Flash CS4 Professional. Check the list of features of this beta release, follow link above. Also, amazing Online Text Editor is available for testing.


words by
flanture
at
3:46 PM
0
comments
Links to this post
Labels: actionscript, adobe, AS3.0, code, components, flex, FXG, gumbo, news, open source, programming, web development

words by
flanture
at
3:54 PM
0
comments
Links to this post

function drawBackground() {
var limitWidth = Math.floor(Stage.width / pattern._width)+2;
var limitHeight = Math.floor(Stage.height / pattern._height)+2;
var counter = 0;
pattern._visible = false;
for(var i=0; i<limitWidth; i++) {
for(var j=0; j<limitHeight; j++) {
var current:MovieClip = pattern.duplicateMovieClip("tile"+counter, counter);
current._x = i*pattern._width;
current._y = j*pattern._height;
counter += 1;
}
}
}
words by
flanture
at
4:36 AM
0
comments
Links to this post
Labels: actionscript, AS2.0, code, examples, flash, open source, programming, tutorials

this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.lineStyle(1, 0x111111, 100);
mc.beginFill(0x111111, 100);
mc.moveTo(1,2);
mc.lineTo(4,2);
mc.lineTo(4,1);
mc.lineTo(5,1);
mc.lineTo(5,4);
mc.lineTo(4,4);
mc.lineTo(4,5);
mc.lineTo(1,5);
mc.endFill();
this.createEmptyMovieClip("back", this.getNextHighestDepth());
var mcw = mc._width;
var mch = mc._height;
var limitWidth = Math.floor(Stage.width / mcw)+1;
var limitHeight = Math.floor(Stage.height / mch)+1;
back.lineStyle(1, 0x111111, 100);
back.beginFill(0x111111, 100);
for(var i=0; i<limitWidth; i++) {
for(var j=0; j<limitHeight; j++) {
back.moveTo(i*mcw+1,j*mch+2);
back.lineTo(i*mcw+4,j*mch+2);
back.lineTo(i*mcw+4,j*mch+1);
back.lineTo(i*mcw+5,j*mch+1);
back.lineTo(i*mcw+5,j*mch+4);
back.lineTo(i*mcw+4,j*mch+4);
back.lineTo(i*mcw+4,j*mch+5);
back.lineTo(i*mcw+1,j*mch+5);
}
}
back.endFill();
words by
flanture
at
11:07 AM
0
comments
Links to this post
Labels: actionscript, AS2.0, code, examples, flash, open source, programming, tutorials
onLoad = function() {
stool._x = line._x;
stool._y = line._y;
}
onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
map_mc._x -= 5;
}
else if (Key.isDown(Key.LEFT)) {
map_mc._x += 5;
}
else if (Key.isDown(Key.UP)) {
map_mc._y += 5;
}
else if (Key.isDown(Key.DOWN)) {
map_mc._y -= 5;
}
}
stool.onMouseDown = function () {
var ypos = _ymouse-line._y;
var distance = Math.abs(_xmouse-line._x);
if (distance < 20) {
if(ypos<-10 && ypos>-20) {
this._y = line._y-20;
map_mc._xscale = 50;
map_mc._yscale = 50;
}
if(ypos<0 && ypos>-10) {
this._y = line._y-10;
map_mc._xscale = 75;
map_mc._yscale = 75;
}
if(ypos<10 && ypos>0) {
this._y = line._y;
map_mc._xscale = 100;
map_mc._yscale = 100;
}
if(ypos<20 && ypos>10) {
this._y = line._y+10;
map_mc._xscale = 120;
map_mc._yscale = 120;
}
if(ypos<30 && ypos>20) {
this._y = line._y+20;
map_mc._xscale = 150;
map_mc._yscale = 150;
}
}
}

words by
flanture
at
5:31 AM
5
comments
Links to this post
Labels: actionscript, AS2.0, code, examples, flash, tutorials

template by blogger templates