Posts Tagged ‘API’
At the Flash Games Summit today there was good news from Unity and Adobe about the Flash 3D API called Molehill. Adobe’s Flash 3D API Molehill public preview was released and Unity announced they will be adding export support for it.
New features available in the current Incubator build include:
- “Molehill” 3D APIs for Flash Player and AIR — A new set of low-level, GPU-accelerated 3D APIs that enable advanced 3D experiences across devices through the Adobe Flash Platform runtimes.
- Cubic Bezier Curves — Using the cubicCurveTo drawing API, developers can easily create cubic Beziers without requiring custom ActionScript code.
This is really a new era of browser based game development support that is going to be very exciting. It was announced at the Flash Games Summit by Thibault Imbert (Adobe Product Manager) and Lee Brimelow (Adobe Platform Evangelist) after they explained and showed examples to the audience of what “Molehill” could do for flash games.
Thibault has a list of available Molehill enabled 3D engines already:
Also a test of hardware accelerated molehill vs software rendered flash:
- Check 2D animation with the display list (check your CPU usage)
- Check 2D animation with Molehill (check your CPU usage)
AIR is very popular for creating twitter clients, Sönke Rohde just made it much easier to make AIR apps for twitter with an AS3 library for Twitter. This library is built on top of core oauth as3 library by iotashin. Core OAuth as3 library is a standard OAuth library this can be used for your own OAuth backends or connecting to other OAuth services as well.
A very nice feature of this library, in addition to being coded cleanly and as3 style, is the ability to have the Twitter OAuth page render inside of Flash.
Instead of opening the Twitter authorization page in the browser the library also contains OAuthLoader which is a wrapper around HTMLLoader which enables to directly show the authorization page within an AIR window:
// use this in the requestTokenHandler instead of navigateToURL var loader:OAuthLoader = new OAuthLoader(); loader.load(request); loader.percentWidth = 100; loader.percentHeight = 100; var w:Window = new Window(); w.width = 800; w.height = 400; w.title = req.url; w.addChild(loader); w.open();
The YouTube Chromeless Player works with AS3/ActionScript 3.
The project is hosted on Google Code [youtubechromelesswrapper-as3]
Looks like they maybe had a contribution for this, so do it where you can.
This is something we’ve been wanting to provide for a while, and the YouTube API team greatly appreciates the work of developer Matthew Richmond of The Chopping Block for making it happen. Thanks Matthew!
- Google Code [youtubechromelesswrapper-as3]
- Article about the library
- Download the source (get from google code recommended)
player.loadVideoById(id:String, startSeconds:Number = 0):void
- Loads and plays video based on specified id.
player.cueNewVideo(id:String, startSeconds:Number = 0):void
- Loads but does not automatically play video based on specified id.
- Clears currently cued/loaded video.
- Sets the size of YouTubePlayer instance.
- Plays the currently cued/loaded video.
- Pauses the currently cued/loaded video.
- Stops the currently cued/loaded video.
- Seeks to specified time within the currently cued/loaded video.
- Returns the current state of the currently cued/loaded video.
- Returns the value of current bytes loaded of the currently cued/loaded video.
- Returns the value of total bytes loaded of the currently cued/loaded video.
- Returns the current position in time of the currently cued/loaded video.
- Returns the current duration of the currently cued/loaded video.
- Returns the start bytes of the currently cued/loaded video.
- Sets the volume of the currently cued/loaded video.
- Returns the current volume of the currently cued/loaded video.
- Stores the current volume and changes the volume of the currently cued/loaded video to 0.
- Returns the volume of the currently cued/loaded video to the last stored value when muted.
- Returns the current YouTube embed code of the currently cued/loaded video.
- Returns the current YouTube video url of the currently cued/loaded video.
- Fired once the Chromeless Player has successfully completed loading and is ready to accept operations calls.
state. Possible values are unstarted, ended, playing, paused, buffering, video cued. When the SWF is first loaded, it will broadcast an unstarted event. When the video is cued and ready to play, it will broadcast a video cued event.
- Fired when an error in the player occurs. There are two error codes possible: 100 is broadcasted when the video requested is not found. This occurs when a video has been removed (for any reason), or it has been marked as private. 101 is broadcasted when the video requested does not allow playback in the embedded players.