Dear Community,

I’m pleased to announce that the Spring ActionScript 0.8 release is now available.

Download | API Documentation | HTML Docs | PDF Docs | Changelog

This release includes the Spring ActionScript framework, the Cairngorm extensions and the PureMVC extensions.

For more info, please see the official announcement at http://www.herrodius.com/blog/176


No Tags

General

I started the library to support Google’s Ajax search API.
Later on, when I found some new webservices, I added those too. At the end, the entire library was one messy organically grown library.
So I decided a while ago to clean that mess up.

Changes & new features

  • I reordened the package structure, meaning I devided the API in ajaxapi (searchtranslation and, the newly added, feeds), apicore (where you can store your api key), suggest (using the Google Suggest webservice) andweather (using the weather services).
  • I changed the name of the event GoogleSearchEvent to GoogleApiEvent, which is more relevant since the library is more than the Ajax search API.
  • Dito for the class that unites all features called GoogleSearch, it’s now called GoogleApi
  • As already mentioned, I also added the ability to use an api key.

I hope those changes make the library at least a bit more transparent and easier to get.

Updating

If you want to update the library your using, the easiest way is using FDT.

  1. Delete the old library and at the new one instead.
  2. Right-click your source folder, goto Source and click ‘Organize imports’.
  3. This will change your imports and correct them accordingly, so they point to the correct classes.
  4. Correct the eventname, GoogleSearchEvent becomes GoogleApiEvent. You can do that by using a find & replace, same for GoogleSearch to GoogleApi

Gimme, gimme , gimme

The classes are still on Google Code, where a new version of the library has been committed into the SVN.
The old classes have been moved to the branch folder. There is also a new update for GoogleEyes, containing the new libraries.

You can download those libraries here.
GoogleEyes demo app can be found here.

The project is hosted on Google Code (see).
This is a crosspost, originally posted on Joris Timmerman’s blog.


No Tags

Never wondered how cool it would be when your AIR application runs on 2 or more monitors at the same time?

Adobe AIR supports multi-screen by offering the developer a Screen-class.
This class makes it possible to detect screens, get some info, and that’s it.
To open a window on a screen, you’ll have to do some calculations yourself.

To make positioning screens, moving screens, … easier , I quickly build a ScreenManager that takes care of your NativeWindow(s).
Make an instance of the nativewindow and send it throught the manager.
Like this:

var nw:NativeWindow=new NativeWindow(new NativeWindowInitOptions());
nw.width=250
nw.height=90
var mc:MovieClip=new MovieClip(); //movieclip with content
nw.stage.addChild(mc);
ScreenManager.openWindowCenteredOnScreen(nw,2);

The ScreenManager is a static class.
It allow the developer to control a NativeWindow through the following methods:
(incorrect signatures)

  • ScreenManager.centerWindowOnScreen()
  • ScreenManager.getActualScreenBounds()
  • ScreenManager.getScreenColorDepth()
  • ScreenManager.getVisibleScreenBounds()
  • ScreenManager.moveWindow()
  • ScreenManager.openWindowCenteredOnScreen()
  • ScreenManager.openWindowOnScreen()
  • ScreenManager.stretchWindowToAllScreens()
  • ScreenManager.stretchWindowOnScreen()
  • ScreenManager.openWindowFullScreenOn()
  • ScreenManager.setWindowFullScreenOn()
  • ScreenManager.moveWindowToCorner()
  • ScreenManager.openWindowInCorner()

and the following properties:

  • ScreenManager. mainScreenIndex
  • ScreenManager.numScreens
  • ScreenManager.maximumAvailableResolution

The ScreenManager can be downloaded here .


No Tags

We released a new 0.7 version of the Spring ActionScript framework yesterday. This release is the first official release since moving from the Prana framework to the Spring ActionScript framework and contains a bunch of fixes and enhancements to the IoC container, an experimental MVCS package and a lot of new utilities. We also removed the Reflection API and now provide that as a separate library called AS3Reflect.

For more info on Spring ActionScript 0.7, please see the official annoucement at http://www.herrodius.com/blog/160

More info on AS3Reflect can be found at http://code.google.com/p/as3reflect/

Hope you enjoy this release. Happy coding!

- Christophe Herreman, Spring ActionScript project lead


No Tags

December 19th, 2008Flash mp3 player - Seeking bug

A few days ago I was asked to make a simple mp3 player with only a few controls:
- Play / Pause / Stop
- Mute / Unmute sound
- Clickable seek bar

I thought: “That’s going to be easy”, and off I was, programming the mp3 player.
I had everything programmed except the seek bar and tested my player… Which at that moment worked like a charm. Although, when I paused and unpaused my song, I did notice something weird at the end of the song. It seemed like the song missed half a second or just a few milliseconds at the end. Not thinking it was such a big deal and that it would solve itself, I continued programming the seek bar.

When this was finished I tested my mp3 player again, the seek bar worked as intended… Clicking on it made the song jump to that certain moment. Then I decided to use the seek bar and then let my song finish to see if everything was still in order… But to my surprise it wasn’t, after seeking it seemed like my song was missing about 1-2 seconds. It just stopped playing and the Event.SOUND_COMPLETE was fired. At first I thought it had something to do with my code because I used some calculations to calculate the new starting point of the song. But how could “soundChannel = sound.play(position)” affect my song, I wondered. It was simply impossible.

After some research on the net I found out that this bug wasn’t caused by my code but by the mp3.
Apparently the sample rate of the mp3 has a big influence on the seeking of a flash mp3 player. So I decided to do some tests and the results were quite shocking to me. I started with an mp3 of 320 kbps and a sample rate of 44.1 kHz (which is, as far as my limited knowledge of sound, bit rate and sample rate goes, of very good quality), I took that mp3 and converted it to several other files with different bitrates and sample rates to see how the mp3 would react to the seeking in my flash mp3 player. As you can see in the list below the seeking only worked good/excellent with mp3’s that have a sample rate of 44.1 kHz.

Seeking results

So before you start looking for the problem in your code, check your mp3 to see what its sample rate is. The bit rate, as far as I know, doesn’t affect the seeking. Although I wasn’t able to produce mp3’s with sample rates of 44.1 kHz that had a lower bit rate than 96.
Guess you can still learn something new from things that you thought you’d already know.


No Tags


© 2007 labs.boulevart | iKon Wordpress Theme by TextNData | Powered by Wordpress | rakCha web directory