Simple AS3 Slideshow Widget: Part 3

This is the final post in a three part tutorial detailing the creation of a Flash slideshow widget using ActionScript 3.0. Have a look over Part 1 and Part 2 before moving ahead. In this post, we are examining the two methods which actually handle image loading and display within our module. 1 2 3 4 5 6 7 8 9 10 11 12 private function switchImage(e:TimerEvent):void { imageBitmapData.draw(this); imageBitmap.bitmapData = imageBitmapData; imageBitmap.alpha = 1; if(currentImage < imageArray.length-1){ currentImage++; }else{ currentImage = 0; } urlRequ.url = appPath + "path/to/images/" + imageArray[currentImage]; imageLoader.load(urlRequ); }private function switchImage(e:TimerEvent):void { imageBitmapData.draw(this); imageBitmap.bitmapData = imageBitmapData;

Continue reading »

Simple AS3 Slideshow Widget: Part 2

In Part 1, we had a look at the basic structure of what we are working toward, including a PHP file to read images from a directory and return a list of images to Flash, the setup of our FLA, and the basic construction of our document class. This widget, being so simple, will only require the document class. We will now go through each method and describe what is happening… 1 2 3 4 5 6 7 8 9 10 11 12 13 public function SlideShow():void { if (root.loaderInfo.parameters.appPath != undefined) { appPath = root.loaderInfo.parameters.appPath; } else { appPath

Continue reading »

Simple AS3 Slideshow Widget: Part 1

This is a simple example of how to build a dynamic slideshow widget in Flash using ActionScript 3.0 such as the one seen here. The first thing you’ll need to do is set up an FLA with the properties you’d like to exhibit. Stage resolution is set to 500×300 with a black background. This will vary depending on the size of your generated images. Be sure that your FLA is set to use ActionScript 3.0 and declare your document class, in this case “SlideShow”. Let’s set up a PHP file to read from the directory of our choosing and return

Continue reading »

Aptana, Eclipse Europa, and AIR

I fist tried Eclipse as a web development IDE a little over one year ago. At the time, I had mostly just stuck with Dreamweaver for all of my general web/PHP/ColdFusion needs. I had heard that the new version of Flex Builder was being built on Eclipse and figured to give it a shot. I was severely disappointed initially- the IDE was slow, clunky, and configuration was a nightmare. Performing a quick uninstall and returning to Dreamweaver took all of 30 minutes. I tried installing again from time to time, but things were always the same. When JRE 6 was

Continue reading »

Google Gears and Apollo… and Tubes?

Since reading this announcement on the Google Gears API Blog last evening, I’ve been wondering to myself (from time-to-time) how this would/could/will apply to the Apollo runtime. Apollo’s integrated web engine is WebKit which is the same engine the Safari browser runs on… but Safari is not supported by the Gears API as of yet. Though as stated on the Gears site- it will be. It is mentioned in that same announcement that Adobe is one of the “industry partners” working with Google on this project. I can only imagine that there will be some base shared technology between Google

Continue reading »