Mar 8
Damn you Line Golfer!!!

From the guy who brought you Line Rider, here comes Line Golfer. The game must be laced with crack cocaine because I couldn’t stop playing with it. At Wrigley’s CandyStand you can play other courses others have drawn or draw your own and submit it for consideration. The concept of the game incorporates multiple levels of genius; the simplicity, allowing others to build the courses for you, the addictiveness of it… don’t get me started. The game is built using APE, the flash Physics engine written by Alec Cove from what I understand. Very kool. It’s great to see people build on Flash technology that is out there. I guess that is why some thing like this is so inspiring for me. Let me know what you think.
Mar 8
From days of old
I remember back in the days of Flash 5 and 6 where you had to write everything from scratch. Things like easing (Tweening) and physics all needed to be coded and modified by hand. Usually you would need to look at someone else’s source files, gut out what you think you needed and change the code to fit your needs. Not that we still don’t do that now to an extent. Back then there were no classes as we know of them today, just a bunch of functions (prototypes) in the first frame of your movie that you would call globally. If you were really fancy you would have an external AS file that would get included. I remember in Flash 7 it being so hard to get out of the old practices and start working more Object Oriented with true classes. Thank God that with the maturity of ActionScript the options are wide open. Developers build for reusability and even create API’s that facillitate life. PaperVision, APE, Box2D, Caurina Tweener… imagine where we would be if these technologies weren’t out there for us to use. This is only my take on it, others I’m sure had different experiences. I can only speak for myself. Stay tuned, I have more physics tutorials coming!
Mar 5
APE Tutorial 1 - Flash Physics Engine: Getting started
I have searched for days now looking for good APE tutorials and I have found little to no help. I decided to gather what I know, digest it for the average human being and post tutorials. I will try to make this concise.
For this first tutorial I have decided to strip down using APE to it’s basic necessities; present a good foundation that can be easily built off of. The following is the sequence of what needs to happen to get a firm understanding of how APE is used.
- Import the APE package
- Create an instance of the engine
- Create a group that you will add particles to (wheels, circles, rectangles, etc)
- Create your particles
- Add your particles to the group
- Add the group to the engine
- Run the engine
Thats it, once you grasp this concept you are on your way to leading the industry with richer internet applications and you can promise the world a better tomorrow. I suggest going thru the APE documentation to see what you can add on to my file. I will do more Tutorials soon where I will go more in depth on how to use the bells and whistles. Below is the code I used to make the example. You can actually plug this code into the root of the timeline with no graphics and it will work as long as you have APE hooked up to your Flash AS3 class path. Hit me up with questions.
// Imports
import org.cove.ape.*;
import flash.events.Event;
// listeners
addEventListener(Event.ENTER_FRAME, run);
// Create an instance of the APEngine.
APEngine.init(1/4);
APEngine.container = this;
APEngine.addForce(new VectorForce(false,0,2));
// Create group
var group1:Group = new Group();
group1.collideInternal = true;
// Create wheel with motion.
var wheel1:WheelParticle = new WheelParticle(0, 0, 30);
wheel1.addForce(new VectorForce(false,30,0))
// Create rectangle to serve as the floor.
var rect1:RectangleParticle = new RectangleParticle(200, 300, 300, 10, 0, true)
// Add particles to group.
group1.addParticle(wheel1);
group1.addParticle(rect1);
// Add group to engine.
APEngine.addGroup(group1);
// Constantly run these functions to keep the engine running.
function run(evt:Event):void {
APEngine.step();
APEngine.paint();
}
Mar 1
Jeniuses at work
I thought this was hilarious. There is alot of traffic that goes by our room in the office. People yelling and laughing like angy hyenas down the hall. You know, just like every other office. So every once in a while we close the door. I figured we could keep people from thinking we were antisocial by placing a sign on the door that said “Jeniuces at work”. Everyone felt they had to add or correct it in some way I guess. The picture of me was so great I had to leave it.
Feb 27
So little time
I miss experimenting with Flash. I’m always working on projects and other stuff that needs to get done. I am going to make it a point to start fiddling with some of the new physics Technologies that are out. I have some ideas that could be pretty kool. WOW and APE, here I come!
Feb 20
looking for interns and applicants at ichameleon/group/
Whether you are a seasoned veteran or new to the Interactive game, you may have a home at ICG. We are especially looking for interns. You don’t need to know a whole lot about Flash, you just have to be very interested in growing in Interactive, be likable, hardworking and willing to learn alot. Either apply thru the website or reply to this post.
No commentsFeb 14
AS3 - MovieClipUtil.getFrame() - get frame number by passing frame label
Download Class
Very easy to use:
MovieClipUtil.getFrame(clip, “FRAME_LABEL_1″)
This is a handy tool we had in AS2 but is much more efficient to implement in AS3. In AS2 we had to duplicate the MovieClip, go to that specific frame label, return the current frame, then remove that MovieClip. It was a true ghetto work-around, but it worked. The AS3 is much more clean.
/*
Returns a frame number. Returns MovieClip current frame if nonexistent.
*/
function getFrame($clip:MovieClip, $label:String):Number
{
var arr:Array = $clip.currentLabels
for(var i:Number = 0; i < arr.length; i++ ){
if($label == arr[i].name){
return (arr[i].frame);
}
}
return ($clip.currentFrame);
}
2 comments
Feb 9
Problems using the MovieClip’s “enabled” property - AS3
UPDATED: This is a more in depth look at mouseEnabled and mouseChildren.
I’ve racked my brain and scoured the internet for 2 days now wondering why I’m having so much trouble getting the enabled property of a MovieClip to work correctly. It should be as easy as saying:
mcClip.enabled = false;
All Button functionality should be disabled right?! Not so in AS3 my friend. The situation goes awry when using event listeners. But the thing is that AS3 is completely event based, so I’m not even sure what use the enabled property is, but that could be my bias. Here is what was really going on. Instead of using enabled = false, you need to use mouseEnabled = false. But here is the kicker: if you have any MovieClips inside of the MovieClip that you are applying events to (regardless if there are instance named or not), that container MovieClip will continue to receive events (CLICK, ROLL_OVER, etc). You need to use mouseChildren = false on that container clip, and THEN the disable/enable toggle will work. Place the following code on the timeline with aMovieClip containing another MovieClip inside it on stage.
// Importsimport flash.events.MouseEvent
// MovieClip on the timeline with other MovieClip inside
this.mcContainer.buttonMode = true ;
this.mcContainer.mouseChildren = false ;
this.mcContainer.addEventListener(MouseEvent.CLICK, this.run)
// Event handler
function run ($event:MouseEvent) {
trace(”RUN”)
}
// Toggle enabling
function manageButtonState ($clip:MovieClip, $state:String = “ON”):void {
switch ($state.toUpperCase()) {
case “ON” :
$clip.mouseEnabled= true;
break;
case “OFF” :
$clip.mouseEnabled = false;
break;
default :
$clip.mouseEnabled= true;
}
}
// Call toggle
this.manageButtonState (this.mcContainer, “OFF”);
No commentsFeb 5
Logging Project hours - experiment
Personal Task Manager
This is a software that we are testing out at work to log our actual productivity. It asks you what project you are currently working on every predetermined interval. We just started using it and it seems pretty detailed and helpful. I’ll document my experience. If you want to try it out download it here:
Software download
IF you don’t have the .net 2.0 framework installed, download and install from here:
.net 2.0 framework download
