RSS

Monthly Archives: May 2011

html 5 game engine

Built by and for professional game developers, Rocket Engine is 
the only fully integrated solution for plugin-free browser game 
development. If you are interested in building multi-platform 
single player games, Facebook games or browser-based MMOs, read 
on!

Read More
 
Leave a comment

Posted by on May 31, 2011 in GAME, HTML 5

 

HTML 5 coverflow image gallery

Nice image gallery in coverflow style

http://coulisse.luvdasun.com/

 
Leave a comment

Posted by on May 31, 2011 in HTML 5

 

HTML5 and physics sand trap game

Nice HTML 5 Physics game
http://gopherwoodstudios.com/sandtrap/sand-trap.htm

 
Leave a comment

Posted by on May 31, 2011 in GAME, HTML 5

 

Mouse Gesture Recognition by Didier Brun

check this demo link

http://www.didierbrun.com/foxaweb/demos/mousegesture/GestureDemo.swf

Download source 

Read More

 
Leave a comment

Posted by on May 28, 2011 in Action Script3, flash

 

iPhone Microphone use with ActionScript3

Here is MicRecorder, which handles internally the ByteArray work with the Event.SAMPLE_DATA event dispatched by the Microphone object introduced in Flash Player 10.1 and the WAV packaging. The WAV encoder is bundled but any other encoder could be used in a near future

Click here for more detail

Download source from below location

http://code.google.com/p/micrecorder/downloads/list

 

stageWebView in actionScript 3 (flash.media.StageWebView)

The StageWebView class displays HTML content in a stage view port.

The StageWebView class provides a simple means to display HTML content on devices where the HTMLLoader class is not supported. The class provides no interaction between ActionScript and the HTML content except through the methods and properties of the StageWebView class itself. There is, for example, no way to pass values or call functions between ActionScript and JavaScript.

AIR profile support: This feature is supported on all desktop operating systems and mobile devices, but is not supported on AIR for TV devices. You can test for support at run time using the StageWebView.isSupported property. See AIR Profile Support for more information regarding API support across multiple profiles.

On devices in the mobile and extended mobile profiles, the StageWebView class uses the system web control provided by the device operating system. Thus, the available features and rendering appearance may vary from device to device. On desktop computers (in the desktop and extended desktop profiles), the StageWebView class uses the internal AIR WebKit engine. The features available and rendering appearance are the same as those of the HTMLLoader class (without the close integration and script bridging between ActionScript and JavaScript provided by an HTMLLoader instance). Test the isSupported property of the StageWebView class to determine whether the class is supported on the current device.

The StageWebView class is NOT a display object and cannot be added to the Flash display list. Instead you display a StageWebView object by attaching it directly to a stage using the stage property. The StageWebView instance attached to a stage is displayed on top of any Flash display objects. You control the size and position of the rendering area with the viewPort property. There is no way to control the depth ordering of different StageWebView objects. Overlapping two instances is not recommended.

When the content within the StageWebView object has focus, the StageWebView object has the first opportunity to handle keyboard input. The stage to which the StageWebView object is attached dispatches any keyboard input that is not handled. The normal event capture/bubble cycle does not apply here since the StageWebView instance is not part of the display list.

Example

package  {
    import flash.display.MovieClip;
    import flash.media.StageWebView;
    import flash.geom.Rectangle;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    import flash.desktop.NativeApplication;

    public class StageWebViewExample extends MovieClip{

        private var webView:StageWebView = new StageWebView();

        public function StageWebViewExample()
        {
            webView.stage = this.stage;
            webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
            webView.loadURL( "http://www.example.com" );

            stage.addEventListener( KeyboardEvent.KEY_DOWN, onKey );
        }

        private function onKey( event:KeyboardEvent ):void
        {
            if( event.keyCode == Keyboard.BACK && webView.isHistoryBackEnabled )
            {
                trace("Back.");
                webView.historyBack();
                event.preventDefault();
            }

            if( event.keyCode == Keyboard.SEARCH && webView.isHistoryForwardEnabled )
            {
                trace("Forward.");
                webView.historyForward();
            }
        }
    }
}

Original Link

 

iPhone image library Access with ActionScript 3 (flash.media.CameraRoll)

package flash.media.examples
{
        import flash.media.CameraRoll;
        import flash.media.MediaPromise;
        import flash.media.MediaType;
        import flash.events.MediaEvent;
        import flash.events.Event;
        import flash.display.Loader;
        import flash.display.Sprite;
        import flash.events.IOErrorEvent;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;

        public class CameraRollTest extends Sprite{
            private var mediaSource:CameraRoll = new CameraRoll();

            public function CameraRollTest() {
                this.stage.align = StageAlign.TOP_LEFT;
                this.stage.scaleMode = StageScaleMode.NO_SCALE;

                if( CameraRoll.supportsBrowseForImage )
                {
                    log( "Browsing for image..." );
                    mediaSource.addEventListener( MediaEvent.SELECT, imageSelected );
                    mediaSource.addEventListener( Event.CANCEL, browseCanceled );

                    mediaSource.browseForImage();
                }
                else
                {
                    log( "Browsing in camera roll is not supported.");
                }
            }

            private var imageLoader:Loader;
            private function imageSelected( event:MediaEvent ):void
            {
                log( "Image selected..." );

                var imagePromise:MediaPromise = event.data;

                imageLoader = new Loader();
                if( imagePromise.isAsync )
                {
                    log( "Asynchronous media promise." );
                    imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, imageLoaded );
                    imageLoader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, imageLoadFailed );
                    imageLoader.loadFilePromise( imagePromise );
                }
                else
                {
                    log( "Synchronous media promise." );
                    imageLoader.loadFilePromise( imagePromise );
                    this.addChild( imageLoader );
                }
            }

            private function browseCanceled( event:Event ):void
            {
                log( "Image browse canceled." );
            }

            private function imageLoaded( event:Event ):void
            {
                log( "Image loaded asynchronously." );
                this.addChild( imageLoader );
            }

            private function imageLoadFailed( event:Event ):void
            {
                log( "Image load failed." );
            }

            private function log( text:String ):void
            {
                trace( text );
            }

        }

    }
Original link