contact

Archive for January, 2008

migrating from Actionscript 2 to Actionscript 3

Thursday, January 31st, 2008

 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.

 

so none of your code will go to the timeline. You will need to follow a few simple steps:

  • create an actionscript file, save it to the same folder where your fla file is at
  • inside this file you have to create a package that will hold the document class
  • inside the package create the document class
  • place the code you would have originally put into the first frame of the timeline in the constructor function of the document class the following code:
  • then place the name of your document class in the designated field in the document preferences as shown above
  • you may use this sample code to start from:
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.

Simple Flash Actionscript 2 XML Navigation Concept

Saturday, January 26th, 2008

 

This is a small navigation concept I did using Flash and XML. Its about a hundred lines of code but shows really well how easy it is to use xml data in flash. The code is free to download.

Download: Fla

(more…)

Google Analytics data update interval

Friday, January 25th, 2008

I keep track of my blog usage by using google analytics . A very good tool that gives a huge amount of data and very good reporting, but what bothers me is that you always have to wait about a day till the data gets updated. A very simple trick gives instant data updates – simply click on the field where you set the time interval, go to the timeline mode and drag the slider all the way to the right. Your done. the stats should now be up to date.

Screen shot 2009-12-03 at 6.53.22 PM

Networking issues with Mac OS X 10.5 Leopard

Monday, January 21st, 2008

 I got my mac with Tiger and was amazed how well the networking worked in comparison to windows. Once I upgraded to leopard I wasn’t all that happy anymore. So here I want to address the bugs I came across and how I partially solved them.

Wifi problems:

At my parents house a have a simple WEP encrypted Wifi which used to work great, but Leopard simply can’t connect properly since it wants to force WPA security settings although its WEP. Nothing would solve the problem unless I ran the diagnose assistant. There it was recognized as WEP and I could get a connection. The big drawback is that I had to repeat this step every time my Notebook wakes up from standby. In addition Leopard does not remember the WiFi. It is listet in the Know Networks but I have to go through all these steps again and again.

Windows shares / SMB shares

At the very beging I noticed that my windows shared computers would not show up in the sidebar as they should. One thing you can do if your shared computer does not show up is to connect manually using this command:

smb://yourcomputersnameorIP

This will mount the lost share and you can access it.

 

Using Mysql Data in Flash via php

Sunday, January 20th, 2008

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:

  • a Mysql Database filled with Data of your choice
  • a php capable webserver, if you dont want to upload everytime for testing try installing

Ipod Touch

Sunday, January 20th, 2008

ipod_touch.jpg 

My dad is flying over the US for business and is getting me an Ipod touch since apple is converting euros and dollars I:I which kind of not reflects reality when looking at the actual rate of 1.4877. That means for me in Austria I get a 300 € Gadget for 200€, which is a pretty good discount. I can’t wait to unpack the thing!! 

Installing Bootcamp with Windows XP on Mac OS X 10.5

Saturday, January 19th, 2008

bootcamp.png

 When I first heard about bootcamp I thought why would I ever want windows on my mac if Mac OS X is so much better but after I found out that the Mac Version of C&3 is not avaliable in Austria there was no other way than infesting my mac book pro with the evil. I thought it would be really easy, like Steve said, and followed the steps in the bootcamp assistant. I encountered pretty much every problem you can possibly have when installing bootcamp so here is what I did to finally make it work. 

  •  Start the bootcamp Assistant. When prompted to create A partition you could get this Error ( german only): 

Ihre Festplatte kann nicht partitioniert werden, weil einige Daten nicht verschoben werden können.Legen Sie eine Sicherung der Festplatte an und formatieren Sie sie mit dem Festplatten-Dienstprogramm als Mac OS Extended (Journaled) Einzelvolume. Stellen Sie anschließend die Informationen von der Sicherung wieder her und starten Sie den Boot Camp Assistenten erneut.

  •  In order to solve this Problem you have to boot the Mac from your OS Disc and start the Disc Utility. Select Repair Volume and wait till its done. After completion restart your Mac and you should be good to go. Launch the Bootcamp Assistant again and follow the procedure, it should work now. 
  • Your next step depends on the Windows XP SP2 CD you have. There are some that are capable of Formatting a predefined partition(BOOTCAMP) and some that can’t. I had and Educational License from my University, which was not able to perform the task. So the Setup crashed on my serveral times till I figured this out. In order for Bootcamp to work you somehow need to reformat the partition named Bootcamp which has been created by the Assistant.
  • go to www.freedos.org, download the full CD ISO, burn the Image to a CD using the Disk Utility. Boot the Mac from that CD by restarting and holding down the "C" key. Then select option 5 to run freedos from the cd.

format the partion by typing "format c:" into the dos console

  •  Now you are already on the save side. Restart the Mac and run Bootcamp again, install Windwos and you should be fine.

When putting together this post I found a really good German HowTo on this problem. 

kpicasa wordpress plugin

Tuesday, January 15th, 2008

I spent almost half a day trying to find a working plugin in order to embed my picasa galeries into my blog. I did not want another gallery management system or anything because I use Iphoto and via the iphoto/picasa plugin i can simply publish my galleries to picasaweb. I dont want to upload my pictures more than once so I was looking for a plugin that dynamically grabs the galleries from my picasa account and then displays them on my blog. There are many plugins out there that promise to do so. I used Ajax-Gallery but it stopped working when I updated to version 3.0 plus it is only in spanish. So I ran over the kpicasa plugin, which seemed the most promising to me. I tried to install it but it would not work since it requires php5. My webspace rendered .php files with php 4. I solved this problem by adding these lines to my .htaccess file.

AddHandler x-httpd-php5 .php 
AddType application/x-httpd-php5 .php

That way all your php files will be rendered using php 5. Note: if your webspace does not support php5 this won’t solve the problem. After doing so I still got an error that looked like this:

Error: your PHP configuration does not allow kPicasa Gallery to connect to Picasa Web Albums. Please ask your administrator to enable allow_url_fopen or cURL.

This can mean either what it says, or the author told me it can also mean that your username is spelled the wrong way. Anyhow check if the features are enabled by using the phpinfo() command. If they are disabled talk to your webspace host. I found them to be enabled but it still did not work. The reason was that my webspace host blocked these features externally from the php.ini . I had them unlock the google domain and now it is working.  The Author(Authors Blog) was very helpful in this process and I got quick support. Thanks a lot for this great plugin.

 Plugin Download from WordPress

Macworld 2008

Tuesday, January 15th, 2008

just a few more minutes till the Macworld 2008 kicks off. I am really excited this year since its my first Macworld with actually owning a mac. What do I wish for? I would like to see a G3 iphone since it would be a device that comes pretty close to

My imagniary all in one gadget

Monday, January 14th, 2008

General thoughts

Having watched hours of CES 2008 coverage without being really thrilled about any of the products I have seen, I want to make up a piece of tech that would actually get me excited to buy it. So lets start off by looking at the stuff I already have. I currently carry a mp3 player (ipod G5 30GB), a cellphone (Nokia E65) and a digital camera (Canon IXUS 40). These three devices together have pretty much all the features one may ask for, but one without the other is simply not enough. My intention is to come up with a list of features that, if combined in one device would make me buy it, and most importantly then not think about any compromise I hade to make by choosing the device over another. Anyhow everything written after this line is just my wild imagination and I am sure I have not though about every aspect.

OS

The OS that is running the device should finally start to behave like an OS. A basic platform that offers and open API for software to use the gadgets features and then stop. It does not need to do anything more really. For everything else I want to have an application that is running as an application and is not deeply stuck within the OS. So for example contacts: I am a mac user I will have a Adressbook mini app that’s running on my device and then sync with my mac. If I have a pc, want a app that is designed to work with outlook. Anyhow I want to choose like on my laptop which software I use to perform a certain task. Hearing my self write it kind of sounds like android from Google. Well we haven’t really seen much of it yet but maybe it will make my wish come true.

User Interface

I believe there is no way but using a touchscreen. I wrote above I want many different programs to work for me, but that means a basically different UI for every single app, which would probably result in the worst user experience every with exception of my first cellphone. So one more thing the OS should to is to provide a set of UI elements to be used in the programs. I am thinking about the component library from Flash. Those are not the best UI elements out there but they would allow a cohesive User experience, that can then be customized with themes.

Filemanagement & Memory

I want this device to have one piece of storage that will be used by all apps and that is accesable by all apps using a file management application of my choice. So If a want to attach a picture I just took to an email, the email app calls the file app to show up and let me select a file, without browsing in some proprietary gallery that is different for each filetype.

Browsing & Mobile Office 

It need a  web browsing app – the safari on the iphone is the best thing I have seen so far but since the system is open anyone can come up with a better app. As for the mobile office stuff I guess these apps already exist, so I only have to download them to my device which brings me to my next point.

Carrier provided Content and apps

My cellphones are packed with stuff from you carrier. For the most part these are just as annoying as the ones you get your PC with, when you buy a new one. If the carrier offers special services they should have them as web services I can access using the browser app, if I would like to do so.  

Music playback:

Being a mac user I am a big fan of the Ipod + Itunes concept with only one point of criticism and that is DRM. Like I said above I want this to be done by certain apps, so I could imagine a little mini itunes(never gonna happen since apple wont let their superglued couple be torn apart) that does all my media and then syncs with my mac. Many people dont like itunes, so they should be able to use a different app. But both apps share the resources of the devices audio capabilities

Video playback:

I want a big screen( touch screen, but I will talk about that when it comes to user interface). Today I got to play with an ipod touch of a friend of mine and found this screen to be perfect. Its big enough to watch video but its not as big as other PMPs or mini Pcs that make it impossible to fit this device into your pocket. My ipod offers only limited support for video playback since I have to import and convert everything into itunes in order to view it on my ipod. Like I said for the music, its got to be open AND that would also mean for Itunes to support more video file types.

Pictures:

  • Taking Pictures: In order to get a decent picture taken you neet two things, a camera with more than 3 megapixels and a lightsource(flash). Many mobile devices still don’t offer 3 megapixels, and most of them perform very poorly in the dark. But looking at the Nokia N95, the new LG viewety or some sony-ericsson cybershot phones we see that it is possible to pack all this tech into a small gadget.
  • Viewing Pictures: This is not a very hard task. I am personally satisfied with my ipods picture viewer, and looking at the ipod touch I think there is not that much potential for innovation. Of course as this little gadgets become more and more powerfull computers photo editing is an issue. But personally I never felt the need for editing a picture right on my cellphone or camera. The screen is to small anyways.
  • Managing Pictures: In my eyes the most crucial factor. I just recently switched from simply folder storage to Iphoto which I think is also great solution but only works for the few people that own a mac. So in order for the device to be really good it should behave like a simple digital camera, that mounts as a drive, and would therefor be usable across all platforms. Most of the software that comes with these cameras and cellphones is really bad and I don’t see why companies insist on creating software if their strength really is to build electronic devices.

Connectivity:

Well I guess its pretty simple on this one. GSM,GPRS,UMTS,HSDPA,WiFi,Bluetooth,USB, IRD … did I miss one? 

Conclusion

I developed my ideas more or less while writing the text and the further I got the more I realized I described a personal computer or tablet pc with the size of an Ipod. And thats what it should be. Give me a small computer that is simply not as powerful as my mac but fits in my pocket and does everything a pc does just on a smaller scale. I dont want a walkman phone or a nokia busniess phone with a crapy camera. Make it a small computer that can do calls, sms, mms and data with a decent camera, and by installing certain apps I decide what it exactly is.