Tag: Flash Development

Simple AS3 Preloading

by Sagar Awasthi on May.28, 2009, under Action Script 2.0, Adobe Flex, Dreamweaver, Flash Banners, Flash Website, Simple AS3 Preloading

I recently tried on preloading in AS3, and then I felt like sharing  something much more simple and easier to understand. I was facing lot  of trouble on Preloader earlier. I learned new methods of using the  loader class and loading main swf into a “container” SWF file. But  this one is extremly simple method, like in AS2 we create a preloader  scene, make it the first scene, and then add 3 frames, and two layers,  on one layer just add a progres bar & a text field. There is some code  required to place on each frame to process the loading of the movie. On the first frame there is code to manage the text display, other  will have preloader progress.

On first frame, In Action Script2, we had this

var progressNum:Number = this.getBytesLoaded() / this.getBytesTotal;
myTextField.text = “Loading: ” + Math.round(progressNum * 100);
myCustomProgressBar.width = progressNum * (a number representing the  full width you want at 100%);

But for our AS3 preloader, we’ll place this rather:

var progressNum:Number = this.loaderInfo.bytesLoaded/
this.loaderInfo.bytesTotal;
myTextField.text = “Loading: ” + Math.round(progressNum * 100);
myCustomProgressBar.width = progressNum * (a number representing the  full width you want at 100%);

Note that instead of a custom progress bar we can simply add the AS3  progress bar the stage and use this code in the place of the “myCustomProgressBar.width…” line
For the second frame in AS2, We used

if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
gotoAndPlay(3);
}else{
gotoAndPlay(1);
}

And finally on the third and last frame of the preloader scene, where  we used to have this in AS2:

gotoAndPlay(”Scene 1 Name”, 1);

& now we’ll have:

gotoAndPlay(1, “Scene 1 Name”);

That’s it!

hope I made myself clear…

Almost the exact same code as AS2, just a little tit-bits or shifting  some things here and there.

  • Share/Save/Bookmark
Leave a Comment :, , , more...

Adobe Flash Player 10

by admin on May.25, 2009, under Adobe Flex, Flash Website

Let us Discuss about the current topic Adobe Flash player 10. The current Adobe Flash Player version released is 10.0.22.87 with  some of the known bugs fixed.

Featured Elements

  • 3D object transformations
  • It has a support for the 3D objects with the help of Actionscript 3.0, There are many new class and method libraries of 3D.  With the help of these classes and libraries, Cool 3D effects can be created.

  • Custom filters via Pixel Bender
  • This technology was originally meant for the image processing and creating filter and effects. This feature not only improves the quality and but as well as is meant to act as multi-Core and multiprocessing system. The Pixel Bender graph language is an XML-based language for combining individual pixel-processing operations (kernels) into more complex Pixel Bender filters. Pixel Bender development offers many advantages like Low learning curve, Parallel processing, Supports all bit-depths and Support by multiple Adobe applications

  • Advanced text supportThis is the feature we always think of when we are using dynamic text or using custom fonts and re-size, so using of the text class we can achieve this. Text Object Class is taken from Mitsubishi Electric Research Labs (MERL) which is known as Saffron its some where similar to the concept of Microsoft’s ClearType,  which both works to improve anti-aliasing.

  • Speex audio codec
  • Speex is an Open Source patent-free audio compression format designed for speech. The Speex Project aims to lower the barrier of entry for voice applications by providing a free alternative to expensive proprietary speech codecs. Moreover, Speex is well-adapted to Internet applications and it truely provides useful features that are not available in most other codecs. Finally, Speex is a part of the GNU Project and is available under the revised BSD license.  Speex is based on CELP and is designed to compress voice at bitrates ranging from 2 to 44 kbps. Some of Speex’s features include: Narrowband (8 kHz), wideband (16 kHz), and ultra-wideband (32 kHz) compression in the same bitstream, Fixed-point port, Intensity stereo encoding, Packet loss concealment, Variable bitrate operation (VBR),  Discontinuous Transmission (DTX),  Voice Activity Detection (VAD), Acoustic echo canceller, Noise suppression.

  • Real Time Media Flow Protocol (RTMFP)
  • Real time media flow protocol or RTMFP  is the new communication protocol from Adobe which enables the main user to end user or to multiple users running multiple flash players as peer to peer connection or communication. Generally meant for rich application development using Adobe AIR framework.

  • Dynamic sound generation
  • Dynamic sound generation will extend the existing sound class and create audio content over the existing audio in library, a sampleCallback event handler to extract the raw sound data from existing library. Which will make your application eassier to mix n tune your audio files ex- loading an external mp3 file mixing audio voice from mic and finally create your own.

  • Vector data type
  • Vector data type is meant for creating a simplicity of data collection for improving performance. The advance vector data type is an introduction of a new Class called Vector, which is a Typed Array, as after having lot of POC its clear, that Vector data type has a significant performance improvements over using an Array, goodthing about Vector Class – it has mostly the methods of an Array.

Enhanced Features

  1. Larger bitmap support
  2. Graphics drawing API
  3. Context menu
  4. Hardware acceleration
  5. Anti-aliasing engine (Saffron 3.1)
  6. Read/write clipboard access
  7. WMODE
  • Share/Save/Bookmark
Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...