Objects in AS3. Experiment. January 4, 2011
Posted by samoiloff in Actionscript, Code, Labs, Samples.Tags: Actionsc, Code, Experiment, Sample
add a comment
Today I’m playing around with Flash Object.
Sample code:
var obj:Object = {}
obj[4] = "test";
obj["6"] = "test1";
trace("obj[4] : " + obj[4]);
trace("\n String");
for (var prop:String in obj) {
trace(prop +":" + obj[prop]);
}
trace("\n *");
for (var prop1:* in obj) {
trace(prop1+":" + obj[prop1]);
}
obj["4"] = "test2";
trace("\n int to string : " + obj[4]);
and traces:
obj[4] : test
String
4:test
6:test1
*
4:test
6:test1
int to string : test2
Star Wars. Episode 7 October 16, 2010
Posted by samoiloff in Art, Episode, Photo, Star Wars.Tags: Art, Design, Episode, Photo, Photoshop, Star, Wars
add a comment
Photoshop presents: Star Wars. Episode 7

Crete crosswords online! It’s easy! September 20, 2010
Posted by samoiloff in Actionscript, Debug, Examples, Gigya, LiveJournal, MySpace, Review.Tags: Crossword, Flash, Gigya, Share
2 comments
Recently we’ve published on-line service that allows to create crosswords. A crossword can be shared as html code just click share and copy/paste the code to your site/blog. I conducted tests on livejournal blog Gigya didn’t work and I pasted code by myself but multilanguage is fine. Myspace publish via Gigya works fine. Unfortunaely I haven’t test other networks please let me know if you have difficulties with sharing your crosswords.
Search in TextFlow August 23, 2010
Posted by samoiloff in Builder, Examples, Flash, Flash CS5, Flex, Libraries, Samoiloff, Util.Tags: example, Flash Builder, lib, TextFlow, util
add a comment
I played with Flash Builder, TLF and TextFlow. As a result the following class TLFUtil was created. It’s function “getElementsByType” enables recursive search for elements of concrete class.
TLFUtil.as
package com.samoiloff.util {
import flashx.textLayout.elements.FlowElement;
import flashx.textLayout.elements.FlowGroupElement;
public class TLFUtil {
public function TLFUtil()
{
}
public static function getElementsByType(flowGroupElement:FlowGroupElement, type:Class):Array {
var arr:Array = [];
for (var i:int = 0; i<flowGroupElement.numChildren; i++) {
var element:FlowElement = flowGroupElement.getChildAt(i);
if (element is type) {
arr.push(element);
}
var groupElement:FlowGroupElement = element as FlowGroupElement;
if ( groupElement) {
arr = arr.concat(getElementsByType(groupElement, type));
}
}
return arr;
}
}
}
Drawing tool. March 12, 2010
Posted by samoiloff in Actionscript, Bitmap, Design, Drawing, Examples, Flash.Tags: Actionscript, Design, Drawing, example, Tool
add a comment
Nice drawing tool made by designer Ricardo Cabello.
Greg Martin. Space. February 11, 2010
Posted by samoiloff in Bitmap, Color, Examples, Labs, Photoshop, Samoiloff, Tutorial.Tags: Photoshop, Tutorial
add a comment
Beutiful flash site of talented man. Greg Martin creates incredible very beautiful images of space. He inspired me and I spent 2 hours going through one of his tutorials. The result is my own made of rusty texture planet. Here it is:

AS 3.0 Library. Actions Sequence. February 1, 2010
Posted by samoiloff in Actionscript, Component, Examples, Flash, Game, Labs, Libraries, Queue, Samoiloff.Tags: actions, Actionscript, asynchronous, Class, commands, example, Library, Queue, simple, sources, tasks
add a comment
In game development it’s usual to play around with queue of commands (tasks or actions). In order to handle those queues I developed two very simple classes (actually just one of them contains logic). They are very easy to use and they are very flexible since they contain a few code. All you need to do is to extend the ActionItem class.
The code that I wrote for an example is just of 2 small classes:
1. The Document one:
public class ActionsExample extends MovieClip {
private var _bg:RectMc;
private var _target:RectMc;
private var _actionsItem:ActionsItem;
public var numTf:TextField;
public var xTf:TextField;
public var yTf:TextField;
public function ActionsExample() {
_bg = new RectMc();
addChild(_bg);
_bg.alpha = 0;
_target = new RectMc();
addChild(_target);
_actionsItem = new ActionsItem();
stage.addEventListener(MouseEvent.CLICK, onClick);
stage.addEventListener(Event.RESIZE, onStageResize);
_actionsItem.addEventListener(ActionItem.ACTION_COMPLETE, onActionComplete);
onStageResize();
updateInfo();
}
private function onActionComplete(e:Event):void {
updateInfo();
}
private function onClick(e:MouseEvent):void {
_actionsItem.addAction(new MoveAction(stage.mouseX, stage.mouseY, _target));
_actionsItem.start();
updateInfo();
}
private function updateInfo():void {
numTf.text = _actionsItem.length.toString();
if (_actionsItem.length) {
var moveAction:MoveAction = MoveAction(_actionsItem.getItemAt(0));
xTf.text = moveAction.x.toString();
yTf.text = moveAction.y.toString();
} else {
xTf.text = yTf.text = '';
}
}
private function onStageResize(e:Event = null ):void {
_bg.width = stage.stageWidth;
_bg.height = stage.stageHeight;
}
}
2. The MoveAction class that extends ActionItem:
public class MoveAction extends ActionItem
{
private var _x:Number;
private var _y:Number;
private var _target:DisplayObject;
public function MoveAction(x:Number, y:Number, target:DisplayObject) {
_x = x;
_y = y;
_target = target;
}
public function get x():Number {
return _x;
}
public function get y(): Number {
return _y;
}
override public function start():void {
super.start();
Tweener.addTween(_target, { x:_x, y:_y, time:1, transition:"easeOutCubic", onComplete:onTweenComplete} );
}
private function onTweenComplete():void {
finish();
}
override public function destroy():void {
_target = null;
}
}
Here are the sources.
Farm Frenzy 3: Ice Age February 1, 2010
Posted by samoiloff in Game, Melesta, Monetization, Samoiloff.Tags: farm, Flash, frenzy, Game, Monetization
add a comment

Another Alawar project is released with my and Melesta assistance. It’s a flash port of very popular and addicting Farm Frenzy game sequel called Farm Frenzy 3 – Ice Age. I hope everyone enjoy this online version. Also I appreciate your opinion left via comments or rating stars.



Bilbo – The Four Corners Of The Wold stats. January 29, 2010
Posted by samoiloff in Flash, Game, Melesta.Tags: bilbo, Development, Flash, Game, games, mochi, statistics
add a comment
Recently Melesta provided me with Mochi Ads statistics for January 2010 for the Bilbo game. Here’s it as I promised (click to enlarge).
.
The traffic is increased significantly starting from the middle of the month. And positive dynamics is kept though current traffic is almost 30 000 game plays per day.