Red & Blue
Friday, August 14th, 2009little actionscript experiment I did during a break.
download the code: Red-Blue
little actionscript experiment I did during a break.
download the code: Red-Blue
this version introduces many changes and improvements. I am finally moving towards completing all features I want to have built in before the app goes into beta stage. The only big thing that is still missing is the detail view for tasks that lets users edit all properties like Urls and tags.
download: version 0250
I want to thank Mike for is great work on the UI and I want to thank Justin for for his patience in debugging the “stuck at loading tasks bug”. I really appreciate the help and the additional thoughts that improve the app.
English is only my second language and I really really hate spelling in general which manifests itself in the docs and the changelog. So if you have time to look them over, or just found a mistake please let me know. At some point I want everything to be correct, just now the coding is way more interesting than writing the docs.
new UI
this version includes a major change in the UI. Credits for this go to Mike who came up with most of it. its more mac like now and looks a lot nicer in general I think.
selection of tasks
I got rid of the edit mode which was kind of useless. you can now select tasks right away and move / postpone / delete them right from the main UI.
postponing tasks
along with the new UI came a button for postponing tasks. it behaves just like the rtm website. I plan on giving more options in the future, like for 1 hour, 1 day and 1 week.
displaying tasks from just one list
the button on the very left is the view button. it lets you select the two standard views + just viewing the tasks from a single list.
the icon, again
the icon is new again, and I think this time its quite okay. the first one was admittedly crap.
the icon badge
its now the standard red mac badge. due to less space I removed the sepearte number for overdue tasks and replaced it with an exclamation mark. so if there are over due tasks there is an exlamation mark after the digit.
application size and position
the app now remebers its size and position. so if you aranged it nicely it will come up just the same way next time you launch it. note: this is not yet tested on multi screen setups! let me know!
bugfixes
the “stuck at loading tasks bug” is currently under review from the rtm server team since I could pin point the problem to be a bad response from the rtm server. Thanks a lot Justin!!! see docs for further details.
I will work on finishing the new UI and then implement the detail view for editing tasks.
today I published my first air application, called iSurveill. A simple webcam surveillance application that takes snapshots with a webcam and saves them to the computer. It’s not very sufisticated but as a first try it will do. The application is now available on my website http://www.chrillo.info/isurveill/ and hopefully it will soon be available in the adobe air market place.
In Mac OS X when you close the window of an application the app usually keeps running in the dock. Wheter this is a good thing or not is totally different story, but for apps like mail and ical it certainly is since I want my mail app to keep checking for new mail without the window cluttering up my screen. So what if I want to add such behaviour to an Adobe Air Application.
var appIsPersistant:Boolean=false
var app=NativeApplication.nativeApplication
var window=stage.nativeWindow;
public function set appPersistant(b:Boolean):void{ // adding a simple property to your app b:Boolean whether its stays on or not
appIsPersistant=b
if(b){
if(app!=null){
app.autoExit=false // preventing the app to exit if all windwows are closed
window.addEventListener(Event.CLOSING,hideWindow) // listening for the closing event of the main window
app.addEventListener(InvokeEvent.INVOKE,initWindow) // listening for the invoke event if the user clicks on the dock icon
app.addEventListener(Event.EXITING,appClose) // listening if the app should be terminated, to prevent the hiding of the window and allow termination
}
}else{
if(app!=null){
app.autoExit=true // if app is not persistant the app can close just as usual
}
}
}
public function appClose(e:Event):void{
window.removeEventListener(Event.CLOSING,hideWindow) // if the app should terminate with command + Q we have to remove the listener for the Closing event. Otherwise only the window will close but the app will not terminate
}
public function hideWindow(e:Event):void{
if(window.visible){ // if the window is visible the event behaviour is canceld and the window is hidden
e.preventDefault()
window.visible=false
}
}
function initWindow(e:Event=null):void{
window.activate() // if the user clicks on the dock icon the window commes back up
}
public function get appPersistant():Boolean{
return appIsPersistant // just the getter for the appPersistant propery
}
by adding these few methods your app will exit just fine with command + Q but if you click the close button only the window will close and the app keeps running and comes back up if you click the dock icon

I just finished the makeover of the web appearance of the clothing company odem. Since their distribution is working via ebay, I am creating a flash app that is reading the ebay rss feed of their store and displays their catalog of products in their corporate layout. That way the catalog is automatically kept up to date.www.odem.eu this is a screenshot of the old site.

I am currently moving from AS2 to AS3. This animation was one of the results while playing around with AS3
I just recently bought the book Essential Actionscript 3 by Collin Mook. I havent gotten really far into the book yet but there are few things that one must understand in order to get even started with actionscript 3. The first thing is AS 3 is pretty much OOP only, which means for you to forget about timeline code which i personally used very often especially for small projects. So where do I put my code now, was the first thing I asked my self. The answer to this question is the document class. When using the flash authoring tool you find this setting in the document preferences.
![]()
.png)
so none of your code will go to the timeline. You will need to follow a few simple steps:
package{
import flash.display.Sprite //
public class yourClass extends Sprite{
public function yourClass(){
// your first timeline frame code goes here
}
}
}
Now this is a very simplified approach to this topic, there is a lot to know about the naming of packages, classes and the scope of objects and methods within them. I highly recommend the book i mentioned above. just note that the document class must either extend the sprite or the movieclip class, and you have to import every class you want to use. In general Actionscript 3 is a lot more strict but thereby a lot more effective. It forces good OOP programing, and won’t let you get by with several hundred lines of code in you first frame.
In this post I want to describe a very simple technique I use in order to read Mysql data into flash via a php-dynamically created xml file. So what do you need to get this work:
This is another simple website I did for a tech company. Basic html site, with a small flash slideshow.