Author Archive
Tuesday, May 31st, 2011 | Author: dehash

Spent a couple hours playing with easelJS and tried emulating something from Flash AS1 era which still needs some work but uploaded here . It uses a single Shape on the Stage with a single Graphic instance inside it which gets drawing commands in the Ticker timer producing a “Flash” type animation using only Javascript. Using JS rather than SWF means testing how different browsers display it. FF4 and Opera 11.50 labs work, FF3.6 partly works but stops after the first animation (there should be about 10 different Webdings font characters displayed one after another).
Category: Code Examples, Javascript | Comments off
Monday, January 31st, 2011 | Author: dehash
Just gathering some links together in one place for Corona and Lua which is a fairly new and improving way to develop apps and games for multiple mobile platforms. There is more than a bit of an Actionscript feel to the Lua code too and you can get up and running to try it out with just the Corona trial Emulator and any text editor. There is an intro for Actionscript Developers here and some interesting libraries like middleclass which aims to bring a more OOP approach to Lua and classes like the Director Class to help separate code into scenes and something called CrawlSpaceLib is on the horizon so there is plenty to play with.
Definitely worth a try out and I will update with some more links and some examples soon.
–UPDATE
There is a series of video tutorials here
The Corona SDK Emulator requires a main.lua. One technique I have found useful during testing is to just require in the code that you want to compile rather than rewrite main.lua:
–main.lua
local App = require(‘main4′) — include main4.lua
–end
Category: Code Examples | Comments off
Monday, December 13th, 2010 | Author: dehash
The TweetDeck Adobe Air App is a great way to manage your use of Twitter and I like it a lot but I like my lightweight Desktop Environment LXDE on Ubuntu even more. Problem is that TweetDeck and any Air Apps can run into problems if you use anything other than KDE or Gnome on Ubuntu because of the way it stores your data. There are some help files on the Adobe site but they would not work for me. But there is a solution at mindby.com where you use a shell script to pass the Gnome Keyring to the app on startup. Works perfectly and allows the wonderful TweetDeck to work on the super fast LXDE and XFCE apparently also
Category: Code Examples, Linux | Comments off
Saturday, September 04th, 2010 | Author: dehash
OpenFrameworks is a C++ toolkit designed for creative coding. The Code::Blocks IDE works in a familiar way and the two combine well.
Did a quick port of an old Yugo Flash4 example to AS3 and then to OpenFrameworks C++ to try it out. Very impressed with the toolkit and IDE - if you know some AS3 and some programming you will certainly have a head start. Definitely going to experiment some more with it.
The swf movie is here and the port is below:
C++:
-
#include "testApp.h"
-
-
//--------------------------------------------------------------
-
void testApp::setup(){
-
-
ofSetFrameRate(50);
-
i =0;
-
a = 5;
-
b = 1.66;
-
k = 20;
-
-
for(i=0; i<NBALLS; i++) {
-
ball = &ballArray[i];
-
ball->x = 200+(i*k);
-
ball->y = 400;
-
}
-
-
for(i=0; i<NBALLS; i++) {
-
ball = &ballArray[i];
-
ball->x_value = ball->x;
-
ball->y_value = ball->y;
-
ball->vx = 0;
-
ball->vy = 0;
-
}
-
-
}
-
-
//--------------------------------------------------------------
-
void testApp::update(){
-
-
for(i=1; i<NBALLS; i++) {
-
ball = &ballArray[i];
-
prevBall = &ballArray[(i-1)];
-
ball->vx = (ball->vx + ( prevBall->x_value + k - ball->x_value) /a) /b;
-
ball->vy = (ball->vy + ( prevBall->y_value - ball->y_value) /a) /b;
-
ball->x_value += ball->vx;
-
ball->y_value += ball->vy;
-
}
-
-
ballArray[0].x_value = ballArray[0].x = mouseX;
-
ballArray[0].y_value = ballArray[0].y = mouseY;
-
-
for(i=0; i<NBALLS; i++) {
-
ball = &ballArray[i];
-
ball->x = ball->x_value;
-
ball->y = ball->y_value;
-
}
-
-
}
-
-
//--------------------------------------------------------------
-
void testApp::draw(){
-
-
for(int i=0; i<NBALLS; i++) {
-
ball = &ballArray[i];
-
ball->draw();
-
}
-
-
}
Category: Code Examples, Flash, OpenFrameworks | Comments off
Friday, August 20th, 2010 | Author: dehash
Added a GUI and a search facility to the previous example. The demo movie is here and the source code is here . Still needs some work to improve the GUI and performance which will be added some time.
Category: Code Examples, Flash, RobotLegs, YouTube API | Comments off
Monday, August 09th, 2010 | Author: dehash
Was asked about an updated Flash YouTube example as the previous ones were quite old and Flex based. So here is a work in progress which I will update later. Still need to add a GUI and a search facility but this is the basic version for now. It uses MVCS in RobotLegs and MinimalComps to interface with YouTube. The demo movie is here and the source code is here and the demo search was Ronettes...
Some ideas used in the code were taken from three excellent articles here and here and here
Category: Code Examples, Flash, RobotLegs, YouTube API | 2 Comments