Subscribe
Stay Updated
Movieclips in Random Movement
Posted on Mar 18, 2010 by Makubex, 0 comments
Random movement of movieclip's on the stage.

Demo


Download Source Files


ball.as


package
{
import flash.display.MovieClip;
import flash.events.Event;

/**
* ...
* @author Karthikeyan VJ
*/
public class ball extends MovieClip
{

private var w:Number = 550;
private var h:Number = 400;

private var xOffset:Number = 2;
private var yOffset:Number = 0;

public function ball():void {

trace("ball init");

this.addEventListener(Event.ADDED_TO_STAGE, addedHL);
}

private function addedHL(e:Event):void
{
removeEventListener(Event.ADDED_TO_STAGE, addedHL);


rand();
this.addEventListener(Event.ENTER_FRAME, loopHL);
}

private function loopHL(e:Event):void
{
this.x += xOffset;
this.y += yOffset;

if (this.x >= w || this.y >= h || this.x <= 0 || this.y <= 0) {
trace("off")
rand();
//xOffset = -xOffset;
//yOffset = -Offset;
}
}

private function rand():void {

if (this.x < 0) {
xOffset = Math.floor(Math.random() * 4) + 1;

} else {
//xOffset = 5 + Math.floor(Math.random() * ( -5 - 5));
xOffset = -Math.floor(Math.random() * 4) + 1;
}


if (this.y < 0) {
yOffset = Math.floor(Math.random() * 4) + 1;

} else {

yOffset = -Math.floor(Math.random() * 4) + 1;
}

if (xOffset == 0 && yOffset == 0) {
xOffset = 1;
}


trace(xOffset);
trace(yOffset);
}

}

}

Labels:

Continue Reading!
weee... I won the Mochi Media's latest game contest!!
Posted on Feb 20, 2010 by Makubex, 1 comments
Today morning I was really surprised to see the results of latest Mochi Media's contest. One of my game Ladybug! Ladybug! bagged the runner up price.. :D

Mochi Media conducts monthly flash game development contest. The contest theme was based on Fairytale Fights or nursery rhymes. I decided to make a game on nursery rhyme called "Ladybug! Ladybug!", the rhyme goes like this...

Ladybug! Ladybug!
Fly away home.
Your house is on fire.
And your children all gone.

All except one,
And that's little Ann,
For she crept under
The frying pan.


The objective of the game was really simple, you have to help the mother ladybug to save her children.

First price was won by blu3bird for his game Finding Fairytales: Castle Party and Best Use of Fairytale Character Honorable Mention goes to cartoon64 for his game Pig Freaks.

Congratulations to blu3bird and cartoon64.

Take time to checkout the wining games,
Finding Fairytales: Castle Party
Ladybug! Ladybug!
Pig Freaks

Read more about the contest here.

Labels: , ,

Continue Reading!
Every Flash Developer is a iPhone Developer now
Posted on Oct 6, 2009 by Makubex, 0 comments



Adobe has done it, once again. In Flash Professional CS5 now you can develop applications for iPhone. Flash CS5 converts your application to native Objective-C code when the content is published. These application can be delivered to iPhone and iPod users through the App Store.

This doesn't mean iPhone supports Flash Player. Flash CS5 allows the developers to repackage the existing web content as application for iPhone.

Public beta of Flash Professional CS5 is planned to be released later this year.

Watch the video below as Adrain Ludwig of Adobe demonstrates the Flash technology inside iPhone,




Labels: ,

Continue Reading!
Dashed Rectangle Border in Flash Actionscript 3
Posted on Oct 4, 2009 by Makubex, 3 comments
I have created class file for drawing dashed rectangle in Actionscript 3. Check out the demo below and click here for the Actionscript file.
Flash CS3, AS 3.0



Demo:





Usage:

import dashed;

dashed.drawRect(this, { x: 50, y: 50, width:100, height: 250, borderColor: 0xff0000, borderAlpha: 1, bgColor: 0xf5f5f5, bgAlpha: 1 } );



Parameters:

First Parameter:
Is the movieclip name where you want to place your dashed rectangle.
In my case I have used "this" which refers to stage. You can use movieclip name instead of "this".

Second Parameter:
They are the properties of the dashed rectangle. There are totally 8 properties.
1. x
2. y
3. width
4. height
5. borderColor : dashed border color of the rectangle.
6. borderAlpha : dashed border alpha of the rectangle.
7. bgColor : background color of the rectangle.
8. bgAlpha : background Alpha of the rectangle.


Download: dashed.as

Labels: , , ,

Continue Reading!
Google Chrome Frame to fix Internet Explorer
Posted on Sep 24, 2009 by Makubex, 0 comments
Google Chrome Frame is a plug-in that brings open web technologies and Google Chrome's speedy V8 JavaScript engine to Internet Explorer.

Google Chrome Frame is currently at beta version early release intended mainly for web developers and open source developers. With Google Frame you can easily start using open web technologies (like HTML5).

You can download Google Chrome Frame plug-in from here.

Check out the video below, Google software engineer Alex Russell explains all about Google Chrome Frame.





Links:
Google Chrome Frame
Developers Guide

Labels: , , ,

Continue Reading!

Hi, I am Karthikeyan VJ (aka makubex). I am a independent Interactive Developer and I am currently focusing on Flash, Flex and AIR