Posts Tagged ‘AS3’
UPDATE: The Drop.io service has been purchased by Facebook and thus the Drop.io service and website are no longer available. It was a good ride guys and I greatly appreciate the support for the Droplet app!
Using the flash.display.Loader class in AS3, you can load in external image files to display in flash. The loader class supports loading in JPG, SWF, PNG, or GIF file types. The Loader class sounds more like a loading manager that watches load progress, rather than a display object. Fact is, the Loader is treated as a DisplayObject, so when it’s ready you just add it to the stage. Pretty simple, so let’s get started!
Setting up a webcam in Flash has always been pretty simple. I feel there are two cases in flash that you would use the webcam in a project: Streaming video for video chat or using it as a tool to take a photo. These two cases have completely different purposes and thus you want your camera setup properly for each.
As you may have read in my last post, I was lucky enough to get my hands on a beta version of “Tweensy“. Tweensy is an actionscript 3 tweening library from Shane over at Lost In Actionscript. Within the short time that I have been able to use the library I have been amazed at the speed and simplicity of it’s use. As of today, Tweensy has officially gone public!
There are two main libraries available plus an FX expansion package: Tweensy Original and Tweensy Zero. In Shane’s latest post he describes why Tweensy is better than any other as3 tweening engine. To sum it up, he uses Object Pooling and utilizes DoubleLinked lists rather than a Dictionary or Array. I could try and go into more detail, but Shane does a better job at explaining.
Ease of use is the main seller for me. Yes performance is great to have when you are working on high profile, bleeding edge projects. However I am often working on more basic projects that need to be completed on a tight deadline. Currently I use Tweener. It is so simple to setup and use. There are a couple of extra steps that you will need to take with Tweensy to accomplish the same ol’ tween as Tweener. Tweensy Zero should make it more worth my while though on the smaller projects. The entire library is compressed down to 2.9kb! I’m not sure to what extend this version is limited, but it will be great to help spiffy up some boring banners!
Of course what I’m most excited about is the effects package that Shane has created that pairs with Tweensy well. It currently is somewhat limited to creating emitters and glowing blurry objects (as you can tell in my first demo and many of Shane’s), but he has also used it to create a cool BumpMap and Bulge demos. Also, Shane claims it’s easy to create better tweens that animate on complicated motion guides with Tweensy.
Now I’m off to download the latest source from Google Code! Be sure to snag your copy and post your demos!
I was lucky enough to recently acquire a beta version of the Tweensy library from Shane McCartney over at Lost In Actionscript. I’ve taken my first crack at using the engine and I have to say I’m very excited to see what is still in store for this promising library. Currently I use Tweener for all my projects. It is quick, painless and very simple to use. It doesn’t support filters and uses mainly static methods. Tweensy on the other hand has support for many different types of effects that all developers yearn for (BitmapLayer is my favorite). Tweensy is broken down in easier to manage pieces that help keep the file size down. Be sure to check back often for more demos as I expand my knowledge of this great new piece of work. Oh, and I almost forgot to mention…Tweensy has support to “yo yo” a tween!
UPDATE 2: UPDATE: The Drop.io service has been purchased by Facebook and thus the Drop.io service and website are no longer available. It was a good ride guys and I greatly appreciate the support for the Droplet as3 library!
UPDATE: I have posted what there is for files on Google Code. The code currently is considered as-is with no support.
So as I mentioned in this post, I have been working on an AS3 library for interfacing with the new Drop.io API. Since my announcement, I’ve been getting some great support from both developers and the Drop.io team. It has been a while and I wanted to let you know I’m still working on the library. I’ve got some free time coming up soon, so I hope to use that time to get something ready for a beta stage.
Keep checking back for more updates! My goal is to have it complete by the end of the year.
Shane from Lost In Actionscript has a great writeup on some tips and tricks for working with the Camera class in AS3. One that I never thought about was:
When recording to a Flash Media Server make sure the camera has activity via the Activity Status Event before publishing the stream. Otherwise you may get a static or black frame at the beginning of the recorded stream.
The June 2008 edition of Adobe EDGE has a great article on geocoding. Geocoding is getting popular with the release of Yahoo Maps, Mapquest, and Google Maps APIs. Suddenly any user can apply for one of those keys and start mapping locations on their site or even using those APIs to get geo location data to then use within their own mapping engine. That is where this example comes in. Adobe has written up a great article on getting started with using the Yahoo Maps API to get the longitude and latitude of a location, then converting that to 3D coordinates to place on a globe built in Papervision. The example is simple, but feels good and responsive.
Jeff Winder has taken the WiiFlash library and an WiiMote to rotate a papervision cube using the accelerometers of the Wiimote. To top it off, he has a Phidgets Servomotor that spins also to matech the papervision cube.
Most of these are new to me, great writeup!
RTMP is the protocol used by Adobe’s Flash Media Server to stream content into flash. Most of the help documentation doesn’t touch much on this method of connection and is limited to sources not easily available to users.
Read more »
Great layout manager, super simple and easy to setup. Give it a go and let me know what you think.
Recently I found out that Flash Media Server has it’s own built-in bandwidth checker. A bandwidth check comes in handy when you want to stream a different quality of video to the user depending on their connection speed instead of forcing them to download a higher quality than they can handle.
A very important part of streaming any type of media is the bandwidth. You want to stream the best quality possible, but keep the stream constant. This can be a very tricky thing since all your users will most likely not be at the same connection speeds. Adobe has a great article on the math behind calculating different kinds of bandwidth for one-to-many (video on demand) setups and many-to-many (video conference) setups.
[ via Adobe FMS Dev Center ]
Anyone who has worked with a client knows that when the project launches, the work is never over. Often after launch you are prompted with a list of changes the client requests. In another case, you may have missed a large bug that hinders the user’s experience. In either case, you are left with a common problem when you are ready to push your new changes live: Flash Caching. By default a user’s browser will cache your swf files, rendering the user unable to see the new changes you just pushed. It is almost always a guarantee that that “user” is in fact your client on the other end of the phone telling you in a heated tone “NO, I still do not see the changes”. I have found the common tactic of tacking on random URL parameters to the swf’s location doesn’t always work for those in IE. It seems the browser often ignores the extra parameters when decided to load the new swf file or pull it from cache.
To fix this problem once and for all, I have been using a similar method. Instead of tacking on parameters to the URL, I include version numbers in the actual file name. This will ensure the browser will reload the new file. I embed my “shell_v1.swf” in the HTML and pass it a variable called “app_location” with a value of “myApp_v1.swf”. “app_location” is the URL path to to my actual app swf. The shell then loads the app and displays it. The app swf should also be labeled by version to ensure it will be reloaded with new versions. This should be easy for users programming in AS3, since you will most likely have your preloader in a separate swf.