<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6954879969662628948</id><updated>2024-11-05T18:52:59.030-08:00</updated><category term="Beginner"/><category term="Bitmap"/><category term="Books"/><category term="Game"/><category term="Intermediate"/><category term="Move objects"/><category term="Sound in Flash"/><category term="VideoTutorial"/><category term="Web cam access"/><category term="case of a string"/><category term="load image"/><category term="load video"/><category term="papervision3d"/><category term="shared object"/><title type='text'>Flainfo- Flash Info-Flash and Actionscript - Tutorials , Source ,Support and More -</title><subtitle type='html'>The world of Flash</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flainfo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-9168704424962571435</id><published>2012-01-24T10:48:00.000-08:00</published><updated>2012-01-24T10:52:29.945-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bitmap"/><category scheme="http://www.blogger.com/atom/ns#" term="Game"/><category scheme="http://www.blogger.com/atom/ns#" term="Intermediate"/><title type='text'>how to load a bitmap and cut into pieces using ationscript 3.0</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Loading a Bitmap&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
A Loader object is a special version of a Sprite that pulls its data from an external&lt;br /&gt;
source. You need to pair it up with a URLRequest, which handles the network file access.&lt;br /&gt;
Here is a simple class that loads a single JPG file and places it on the screen. After creating&lt;br /&gt;
a new Loader and a new URLRequest, we pair them with the load command. The&lt;br /&gt;
entire process takes only three lines of code. Then, we use addChild to add the Loader&lt;br /&gt;
object to the stage, just like a normal display object like a Sprite:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
package {&lt;br /&gt;
import flash.display.*;&lt;br /&gt;
import flash.net.URLRequest;&lt;br /&gt;
public class BitmapExample extends MovieClip {&lt;br /&gt;
public function BitmapExample() {&lt;br /&gt;
var loader:Loader = new Loader();&lt;br /&gt;
var request:URLRequest = new URLRequest(&quot;myimage.jpg&quot;);&lt;br /&gt;
loader.load(request);&lt;br /&gt;
addChild(loader);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
It is positioned in the upper-left corner.&lt;br /&gt;
Because the Loader object acts like a normal display object, we can also set its x and y&lt;br /&gt;
position to center it on the screen or place it anywhere we want.&lt;br /&gt;
&lt;br /&gt;
This can prove useful for loading introductory or instruction graphics in a game. For&lt;br /&gt;
instance, your company logo can appear on the introduction screen using this simple&lt;br /&gt;
set of commands. Instead of embedding your logo in each Flash game, you can have a&lt;br /&gt;
single logo.png file and use a Loader and URLRequest to bring it in and display it.&lt;br /&gt;
Then, one change to logo.png and all your games are using the new logo.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Breaking a Bitmap into Pieces&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Loading a single bitmap and displaying it is useful, but we need to dig into the data and&lt;br /&gt;
extract puzzle pieces from the image to build the games in the rest of this chapter.&lt;br /&gt;
The first change we need to make to the simple example from before is to recognize&lt;br /&gt;
when the bitmap is done loading and start processing it. This can be done with an&lt;br /&gt;
Event.COMPLETE listener. We add that to the Loader object, and then we can put all our&lt;br /&gt;
manipulation code into the loadingDone function that it calls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the start of the new class. We need the flash.geom class later. I’ve also put the&lt;br /&gt;
loading code into its own function, called loadBitmap, so it is easy to transport to the&lt;br /&gt;
games later in this chapter:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
package {&lt;br /&gt;
import flash.display.*;&lt;br /&gt;
import flash.events.*;&lt;br /&gt;
import flash.net.URLRequest;&lt;br /&gt;
import flash.geom.*;&lt;br /&gt;
public class BitmapExample extends MovieClip {&lt;br /&gt;
public function BitmapExample() {&lt;br /&gt;
loadBitmap(&quot;testimage.jpg&quot;);&lt;br /&gt;
}&lt;br /&gt;
// get the bitmap from an external source&lt;br /&gt;
public function loadBitmap(bitmapFile:String) {&lt;br /&gt;
var loader:Loader = new Loader();&lt;br /&gt;
loader.contentLoaderInfo.addEventListener(&lt;br /&gt;
Event.COMPLETE, loadingDone);&lt;br /&gt;
var request:URLRequest = new URLRequest(bitmapFile);&lt;br /&gt;
loader.load(request);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
When the image is completely loaded, the loadingDone function is called. The first&lt;br /&gt;
thing it does is to create a new Bitmap object. It takes the data for this from&lt;br /&gt;
event.target.loader.content (in other words, the content property of the original&lt;br /&gt;
Loader object):&lt;br /&gt;
&lt;br /&gt;

&lt;div class=&quot;codeview&quot;&gt;
private function loadingDone(event:Event):void {&lt;br /&gt;
// get loaded data&lt;br /&gt;
var image:Bitmap = Bitmap(event.target.loader.content);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
piece:&lt;br /&gt;
// loop through all pieces&lt;br /&gt;

for(var x:uint=0;x&amp;lt;6;x++) {&lt;br /&gt;
for (var y:uint=0;y&amp;lt;4;y++) {&lt;/div&gt;
Creating a puzzle piece is done by first making a new Bitmap object. We specify the&lt;br /&gt;
width and height to create one. Then, we use copyPixels to copy a section of the original&lt;br /&gt;
image into the bitmapData property of the puzzle piece.&lt;br /&gt;
The copyPixels command takes three basic parameters: the image to copy from, the&lt;br /&gt;
Rectangle specifying the part of the image to get, and the Point that defines where the&lt;br /&gt;
piece of the image goes in the new bitmap:&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
&lt;br /&gt;
// create new puzzle piece bitmap&lt;br /&gt;
var newPuzzlePieceBitmap:Bitmap =&lt;br /&gt;
new Bitmap(new BitmapData(pieceWidth,&lt;br /&gt;
pieceHeight));&lt;br /&gt;
newPuzzlePieceBitmap.bitmapData.copyPixels(&lt;br /&gt;
image.bitmapData,new Rectangle(x*pieceWidth,&lt;br /&gt;
y*pieceHeight,pieceWidth,&lt;br /&gt;
pieceHeight),new Point(0,0));&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
A bitmap by itself isn’t our end goal. We want to have a Sprite to show on the screen.&lt;br /&gt;
So, we create a new one, and then add the bitmap to it. Then, we add the Sprite to&lt;br /&gt;
the stage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// create new sprite and add bitmap data to it&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
var newPuzzlePiece:Sprite = new Sprite();&lt;br /&gt;
newPuzzlePiece.addChild(newPuzzlePieceBitmap);&lt;br /&gt;
// add to stage&lt;br /&gt;
addChild(newPuzzlePiece);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
Finally, we can set the location of the sprites. We want to place them on the screen&lt;br /&gt;
according to their column and row, plus about five pixels to create some blank spacing&lt;br /&gt;
between the pieces. We also offset the horizontal and vertical positions of all pieces by&lt;br /&gt;
20 pixels.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
&lt;br /&gt;
// set location&lt;br /&gt;
newPuzzlePiece.x = x*(pieceWidth+5)+20;&lt;br /&gt;
newPuzzlePiece.y = y*(pieceHeight+5)+20;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/9168704424962571435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/9168704424962571435'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2012/01/how-to-load-bitmap-and-cut-into-pieces.html' title='how to load a bitmap and cut into pieces using ationscript 3.0'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-1348710678962445983</id><published>2012-01-24T10:33:00.000-08:00</published><updated>2012-01-24T10:33:25.845-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Beginner"/><category scheme="http://www.blogger.com/atom/ns#" term="VideoTutorial"/><title type='text'>Linking and Removing Event Listener easy video tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
These videos are aimed 
at complete newcomers to programming and are primarily made for 
pre-university students.&lt;br /&gt;
&lt;br /&gt;
You are expected to have an understanding of Flash drawing/animation before completing these tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;600&#39; height=&#39;366&#39; src=&#39;https://www.youtube.com/embed/AGii7mfehSg?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1348710678962445983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1348710678962445983'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2012/01/linking-and-removing-event-listener.html' title='Linking and Removing Event Listener easy video tutorial'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-4609289053587646316</id><published>2012-01-24T10:27:00.000-08:00</published><updated>2012-01-24T10:28:47.490-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Beginner"/><category scheme="http://www.blogger.com/atom/ns#" term="Bitmap"/><title type='text'>Embedding or loading assets in flash</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The best way to get at a bitmap is to upload the bitmap in your SWF, which is handled&lt;br /&gt;
in two different techniques, based on your compiler. First, if you are using Fold Designer, the&lt;br /&gt;
mxmlc compiler through the control range, or the Fold compiler as an option in the Flash&lt;br /&gt;
IDE, you can use the upload metatag to upload your bitmap resource, as was mentioned in the&lt;br /&gt;
“Introducing Bitmap” area previously this part.&lt;br /&gt;
&lt;br /&gt;
If you are using the Present IDE, you can transfer the bitmap into your collection and move it for&lt;br /&gt;
ActionScript (in this situation, perhaps as the category LogoImage). As these two techniques are not&lt;br /&gt;
consistent for all conditions, we will not use them in the illustrations in this publication. Please&lt;br /&gt;
see the Fold or Present certification for further details on these techniques.&lt;br /&gt;
&lt;br /&gt;
No issue your strategy of option for embedding, you can instantiate the bitmap using the&lt;br /&gt;
class constructor and thrown it as a Bitmap. Since Bitmap is a DisplayObject, you can then add&lt;br /&gt;
it immediately to the display record for rendering:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
var logo:Bitmap=new LogoImage as Bitmap;&lt;br /&gt;
addChild(logo);&lt;/div&gt;
The strategy we will use to accessibility bitmaps in our illustrations, and the one you saw in the&lt;br /&gt;
previous part, is to use the Loading machine category to fill in a bitmap at playback. This performs the&lt;br /&gt;
same no issue your compiler or progression atmosphere. Generally, Loading machine, which is a&lt;br /&gt;
DisplayObject itself, is a wrapper that you can add to the present record and location, range,&lt;br /&gt;
rotate, set awareness, and so on, while it a lot displayable information, like a SWF or bitmap graphic,&lt;br /&gt;
asynchronously behind the curtain.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
var loader:Loader=new Loader();&lt;br /&gt;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,imageloaded);&lt;br /&gt;
loader.load(new URLRequest(imagePath));&lt;/div&gt;
However, we will not be including the Launching machine to the present record in our illustrations, although you&lt;br /&gt;
certainly could (if all you are doing is loading and showing, there is no purpose why not).&lt;br /&gt;
We will need use of the hidden bitmap if you want to accessibility its bitmap information, so it is&lt;br /&gt;
best to pick up this from the Launching machine example once the bitmap completely a lot and add this directly&lt;br /&gt;
to the present list:
&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
private function imageloaded(evt:Event)&lt;br /&gt;
{&lt;br /&gt;
var loaderinfo:LoaderInfo=evt.target as LoaderInfo;&lt;br /&gt;
var bitmap:Bitmap=LoaderInfo.content as Bitmap;&lt;br /&gt;
bitmap.x=100;&lt;br /&gt;
bitmap.y=100;&lt;br /&gt;
addChild(bitmap);&lt;br /&gt;
}&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/4609289053587646316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/4609289053587646316'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2012/01/embedding-or-loading-assets-in-flash.html' title='Embedding or loading assets in flash'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-1604873164097919506</id><published>2011-10-21T08:55:00.000-07:00</published><updated>2011-10-21T08:56:02.538-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Move objects"/><title type='text'>Move a Sprite at a certain speed in a specific angular direction</title><content type='html'>&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-7740306457036274&quot;;
/* fla inline */
google_ad_slot = &quot;1827240092&quot;;
google_ad_width = 728;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
You can use some basic trigonometric functions to convert this angle 
and speed to component x and y velocities. First, you need to make sure 
the angle is in radians. If the angle is in degrees, convert it by using
 the following formula:

&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
radians = degrees * Math.PI / 180;
&lt;/div&gt;
If you ever need to convert the opposite way, use:
&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
degrees = radians * 180 / Math.PI;
&lt;/div&gt;
Once you have the angle in radians, use the Math.sin and 
Math.cos functions, along with the speed, to find the x and y 
velocities, using the following formulas:
&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
vx = Math.cos(angle) * speed;
vy = Math.sin(angle) * speed;
&lt;/div&gt;
&lt;span class=&quot;fullpost&quot;&gt;

Here is an example using 135 degrees and a speed of 4 pixels per frame:
&lt;div class=&quot;codeview&quot;&gt;
&lt;pre&gt;package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    
    public class AngularVelocity extends Sprite {
        private var _sprite:Sprite;
        private var _angle:Number = 135;
        private var _speed:Number = 4;
        private var _timer:Timer;
        
        public function AngularVelocity (  ) {
            _sprite = new Sprite(  );
            _sprite.graphics.beginFill(0x0000ff, 100);
            _sprite.graphics.drawCircle(0, 0, 25);
            _sprite.graphics.endFill(  );
            _sprite.x = 200;
            _sprite.y = 100;
            addChild(_sprite);
            _timer = new Timer(30);
            _timer.addEventListener(&quot;timer&quot;, onTimer);
            _timer.start(  );
        }
        
        public function onTimer(event:TimerEvent):void {
            var radians:Number = _angle * Math.PI / 180;
            var vx:Number = Math.cos(radians) * _speed;
            var vy:Number = Math.sin(radians) * _speed;
            _sprite.x += vx;
            _sprite.y += vy;
        }
    }    
}&lt;/pre&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-7740306457036274&quot;;
/* fla_link_ad */
google_ad_slot = &quot;3765676643&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1604873164097919506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1604873164097919506'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2011/10/move-sprite-at-certain-speed-in.html' title='Move a Sprite at a certain speed in a specific angular direction'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-840782653048611383</id><published>2011-10-09T11:19:00.000-07:00</published><updated>2011-10-21T08:56:22.656-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Web cam access"/><title type='text'>access your web cam and take a snapshot using flash actionscript 3.0</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this post i will help you how to access your web cam and take a snap shot and save it as in JPEG format.&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Create a new flash file with name WebCam.&lt;/li&gt;
&lt;li&gt;Create a button with instance name &quot;_capt &quot; in the stage&lt;/li&gt;
&lt;li&gt;Then create a new actionscript 3 file with name &quot;vido&quot;. copy and paste the following code into that and save it..
&lt;span class=&quot;fullpost&quot;&gt;
&lt;div class=&quot;codeview&quot;&gt;
package
&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import com.adobe.images.JPGEncoder;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.display.Bitmap;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.display.BitmapData;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.media.Video;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.media.Camera;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.display.Sprite;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.events.*;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.display.MovieClip;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.net.FileReference;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.utils.ByteArray;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;import flash.geom.Matrix;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;[SWF(width=640,height=480,frameRate=24)]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;public class vido extends Sprite&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public var _camera:Camera;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public var _video:Video;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public var _capt:MovieClip;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public var _snap:Bitmap;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public var _snapContent:BitmapData;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public var _fileRefer:FileReference;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public var bytes:ByteArray;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public function vido()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_camera=Camera.getCamera();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_video=new Video(320,240);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_video.attachCamera(_camera);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;addChild(_video);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_capt.addEventListener(MouseEvent.CLICK,takeCapt);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public function takeCapt(evt:MouseEvent)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var _snapContent:BitmapData=new BitmapData(320,240, false, 0);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;BitmapData(_snapContent.draw(_video));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var _snap:Bitmap=new Bitmap();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_snap.bitmapData=_snapContent;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;addChild(_snap);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_snap.x = 304;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var jpgEncode:JPGEncoder = new JPGEncoder();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var bytes:ByteArray = jpgEncode.encode(_snapContent);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var _fileRefer=new FileReference();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_fileRefer.save(bytes, &quot;image.jpeg&quot;);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
}&amp;nbsp;&lt;/div&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
5. You can download the JPEG Encoder from &lt;a href=&quot;https://github.com/mikechambers/as3corelib&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
6. Goto the webcam fla and give the class name =vido.&lt;br /&gt;
7.Run&amp;nbsp; the flash file and take the snapshot and save it as jpeg.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-7740306457036274&quot;;
/* fla_link_ad */
google_ad_slot = &quot;3765676643&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/840782653048611383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/840782653048611383'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2011/10/access-your-web-cam-and-take-snapshot.html' title='access your web cam and take a snapshot using flash actionscript 3.0'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-4859697346905038376</id><published>2011-10-09T10:59:00.000-07:00</published><updated>2011-10-09T12:00:18.317-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="case of a string"/><title type='text'>change the case of a string or perform a case-insensitive comparison in action script</title><content type='html'>
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this post i will help you how to change a string to uppercase,to lower case and also capitalize a first letter of a words.&lt;br /&gt;
The &quot;&lt;b&gt;toUpperCase( )&lt;/b&gt;&quot; and&quot;&lt;b&gt;toLowerCase( )&lt;/b&gt;&quot; methods return new strings in which all the characters are uppercase or lowercase, respectively, without modifying the original string. &lt;br /&gt;
&lt;span class=&quot;fullpost&quot;&gt; &lt;br /&gt;
you can use toLowerCase( ) or toUpperCase( ) to perform case-insensitive searches within strings&lt;br /&gt;
&lt;div ;=&quot;&quot; class=&quot;codeview&#39;&amp;gt;var ex:String = &quot; designer?=&quot;&quot; flash=&quot;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
// Displays: flash develop?&lt;br /&gt;
trace( ex.toLowerCase(  ) );&lt;br /&gt;
&lt;br /&gt;
// Displays: FLASH DEVELOP?&lt;br /&gt;
trace( ex.toUpperCase(  ) );&lt;br /&gt;
&lt;br /&gt;
// The original string value is unchanged: Flash designer?&lt;br /&gt;
trace( example );&lt;br /&gt;
//you want to change original string, reassign the return value to it, as follows:&lt;br /&gt;
&lt;br /&gt;
var example:String = example.toLowerCase(  );&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
The following will help you to change the any word for example &quot;DeSigner&quot; into &quot;Designer&quot; to capitalize the first letter of the word.The following is the code in the &quot;main&quot; class&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;fullpost&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
public static function initialcap( theword:String ):String {&lt;br /&gt;
return theword.charAt( 0 ).toUpperCase(  ) + theword.substr( 1 ).toLowerCase(  );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//The following is an example usage of the method:&lt;br /&gt;
&lt;br /&gt;
var example:String = &quot;DeSigner&quot;;&lt;br /&gt;
trace( StringUtilities.toInitialCap( example ) );    // Displays: Designer &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
The &quot;&lt;b&gt;initialcap( )&lt;/b&gt;&quot; method converts a string to so-called title case (initial letters capitalized).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;fullpost&quot;&gt;The following is the definition of the method:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;fullpost&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
public static function titleCase( originalword:String ):String&lt;br /&gt;
{&lt;br /&gt;
var words:Array = originalword.split( &quot; &quot; );&lt;br /&gt;
for (var i:int = 0; i &amp;lt; words.length; i++)&lt;br /&gt;
{&lt;br /&gt;
words[i] = initialcap( words[i] );&lt;br /&gt;
}   return ( words.join( &quot; &quot; ) );&lt;br /&gt;
}&lt;br /&gt;
//And the following is a sample usage of the method:&lt;br /&gt;
var examp:String = &quot; flash developer&quot;; &lt;br /&gt;
trace( main.titleCase( examp ) );   &lt;/div&gt;
&lt;/span&gt;&lt;span class=&quot;fullpost&quot;&gt;// Displays: Flash D&lt;/span&gt;&lt;span class=&quot;fullpost&quot;&gt;eveloper&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;fullpost&quot;&gt; &lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-7740306457036274&quot;;
/* fla_link_ad */
google_ad_slot = &quot;3765676643&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/4859697346905038376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/4859697346905038376'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2011/10/change-case-of-string-or-perform-case.html' title='change the case of a string or perform a case-insensitive comparison in action script'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-496166125357329504</id><published>2011-04-09T11:24:00.000-07:00</published><updated>2011-10-09T12:01:58.796-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="papervision3d"/><title type='text'>carousel (3d reflected Gallery) papervision3d and As3 tutorials</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://pv3d.org/2008/12/01/carousel-with-proper-rotation-and-reflection/&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiZ577qXxOLdvhBESiv3blGttj6OEJwQ7ewm6hOSUCJnGymCzof0MQAmbz2n4yj3H9bi2YgL0sEeCQUu-odbAVhNSD39B5ei6ejb23u0AWOQFvK22NVhLiXJJz58ZrXyRp5Fb4luDnZyI/s1600/papervision3d.png&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;Click on the above image you can get carousel (3d reflected Gallery) created using actionscript 3.0 and Papervision3d &lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-7740306457036274&quot;;
/* fla inline */
google_ad_slot = &quot;1827240092&quot;;
google_ad_width = 728;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/496166125357329504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/496166125357329504'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2011/04/carousel-3d-reflected-gallery.html' title='carousel (3d reflected Gallery) papervision3d and As3 tutorials'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiZ577qXxOLdvhBESiv3blGttj6OEJwQ7ewm6hOSUCJnGymCzof0MQAmbz2n4yj3H9bi2YgL0sEeCQUu-odbAVhNSD39B5ei6ejb23u0AWOQFvK22NVhLiXJJz58ZrXyRp5Fb4luDnZyI/s72-c/papervision3d.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-8621766394925804407</id><published>2010-12-15T06:23:00.000-08:00</published><updated>2011-10-09T11:50:37.376-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="shared object"/><title type='text'>You want to store information in memmory using flash sharedObject</title><content type='html'>
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-7740306457036274&quot;;
/* fla_link_ad */
google_ad_slot = &quot;3765676643&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Local shared Objecct are to Flash what cookies are to web browsers but more so. some developers because they allow you to store large amounts of data and store and retrieve.This is mainly using for saving &quot;username&quot; and &quot;Passwords&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
var example:SharedObject = SharedObject.getLocal( &quot;example&quot; );&lt;/div&gt;
The static getLocal( )in shared object are both created and opened for reading.&lt;br /&gt;
You want to add data to a SharedObject use the following code.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
// Store a username value to the example shared object.&lt;br /&gt;
example.data.username = &quot;myname&quot;;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
You can store several datatypes to the shared object&#39;s data property, as follows.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
example.data.exampleArray = new Array( &quot;a&quot;, &quot;b&quot;, &quot;c&quot; );&lt;br /&gt;
example.data.exampleDate = new Date();&lt;br /&gt;
example.data.exampleObject = { key1: &quot;example&quot;, key2: -12, key3: null };&lt;/div&gt;
You want to save data in a Shared Object to the client computer.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;
var flushResult:String = example.flush(  );&lt;/div&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-7740306457036274&quot;;
/* fla_link_ad */
google_ad_slot = &quot;3765676643&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/8621766394925804407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/8621766394925804407'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2010/12/you-want-to-store-information-in.html' title='You want to store information in memmory using flash sharedObject'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-3079109968860416575</id><published>2010-12-13T23:22:00.000-08:00</published><updated>2011-04-09T11:40:58.461-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="load video"/><title type='text'>You want to load and playback progressive download Flash video.</title><content type='html'>The following code constructs a &lt;b&gt;NetConnection &lt;/b&gt;object and initializes it  for use with progressive download video.This code comes under the &lt;b&gt;flash.net.Netconnection&lt;/b&gt;.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;var videoConnection:NetConnection = new NetConnection(  );&lt;br /&gt;
videoConnection.connect(null);&lt;br /&gt;
&lt;/div&gt;This code constructs a &lt;b&gt;NetStream object&lt;/b&gt; &lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;var videoStream:NetStream = new NetStream(videoConnection);&lt;br /&gt;
&lt;/div&gt;This code constructs a new Video object and then adds it to the display list:&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;var video:Video = new Video(  );&lt;br /&gt;
addChild(video);&lt;br /&gt;
&lt;/div&gt;You can associate a &lt;b&gt;NetStream object &lt;/b&gt;with a Video object by using the Video object&#39;s &lt;b&gt;attachNetStream( )&lt;/b&gt; method, passing a reference to the &lt;b&gt;NetStream object&lt;/b&gt; as a parameter to the method:&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;video.attachNetStream(videoStream);&lt;br /&gt;
&lt;/div&gt;The &lt;b&gt;NetStream&lt;/b&gt; class defines a play( ) method that loads and starts the Flash video playback. The parameter can be a relative or absolute URL.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;videoStream.play(&quot;example.flv&quot;);&lt;br /&gt;
or&lt;br /&gt;
videoStream.play(&quot;http://www.mysite.com/example.flv&quot;);&lt;br /&gt;
&lt;/div&gt;The full code is :&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;var videoConnection:NetConnection = new NetConnection(  );&lt;br /&gt;
videoConnection.connect(null);&lt;br /&gt;
var videoStream:NetStream = new NetStream(videoConnection);&lt;br /&gt;
var video:Video = new Video(  );&lt;br /&gt;
addChild(video);&lt;br /&gt;
video.attachNetStream(videoStream);&lt;br /&gt;
videoStream.play(&quot;example.flv&quot;);&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/3079109968860416575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/3079109968860416575'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2010/12/you-want-to-load-and-playback.html' title='You want to load and playback progressive download Flash video.'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-1858566791660149629</id><published>2010-12-09T01:29:00.000-08:00</published><updated>2011-04-09T11:38:19.389-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Books"/><title type='text'>Flash Action Script eBook free  download links</title><content type='html'>&lt;div style=&quot;color: black; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;1.Animation with Scripting for Adobe Flash Professional CS5 Studio Techniques&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #444444;&quot;&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Book Description&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
The definitive guide to creating animation for the web and mobile    devices with top animation designer Chris Georgenes and    designer/developer Justin Putney. They reveal how to create and    successfully animate characters in Adobe Flash Professional CS5 and how    to push the limits of timeline animation with stunning visual effects    using ActionScript® 3.0.&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Download:&lt;/b&gt; &lt;/div&gt;&lt;a href=&quot;http://hotfile.com/dl/77854209/0f71a71/joinebook.com_Adobe.Press.Animation.with.Scripting.for.Adobe.Flash.Professional.CS5.Sep.2010.rar.html&quot;&gt;http://hotfile.com/dl/77854209/0f71a71/joinebook.com_Adobe.Press.Animation.with.Scripting.for.Adobe.Flash.Professional.CS5.Sep.2010.rar.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Mirror:&lt;/b&gt;&lt;/div&gt;&lt;a href=&quot;http://www.fileserve.com/file/xVCKgvJ&quot;&gt;http://www.fileserve.com/file/xVCKgvJ&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Pass (If need) : joinebook.com&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;2. ActionScript 3.0 Bible&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Book Description&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444;&quot;&gt;If you want to build interactive applications on the desktop, in the browser, or on mobile devices, this new edition of the &lt;i&gt;ActionScript 3.0 Bible&lt;/i&gt;  is all you need. If you’re a beginner, it guides you through the whole    ecosystem of the Flash Platform, ActionScript 3.0 language and syntax,    object oriented programming, and even error handling techniques and    debugging tips. For intermediate programmers, the Bible is packed with    detail on every part of the expansive Flash Player 10.1 API. For    experienced programmers, it includes interactive examples with    real-world applications, a UML table of contents for finding the right    chapter immediately, and comprehensive coverage of the very latest    features including multitouch, Pixel Bender, and more.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Download:&lt;/b&gt; &lt;/div&gt;&lt;a href=&quot;http://hotfile.com/dl/77783847/b13abea/joinebook.com_Wiley.ActionScript.3.0.Bible.Apr.2010.rar.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://hotfile.com/dl/77783847/b13abea/joinebook.com_Wiley.ActionScript.3.0.Bible.Apr.2010.rar.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Mirror:&lt;/b&gt;&lt;/div&gt;&lt;a href=&quot;http://www.fileserve.com/file/mMnV4mZ&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.fileserve.com/file/mMnV4mZ&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Pass (If need) : joinebook.com&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;3.ActionScript 3.0 for Adobe Flash Professional CS5 Classroom in a Book&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #444444;&quot;&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Book Description&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
This project-based guide from Adobe will teach readers all they need  to   know to create engaging interactive content with ActionScript 3.0 for    Flash Professional CS5. Using step-by-step instructions with projects    that build on the knowledge acquired in each lesson, readers will  learn   the fundamentals of adding interactivity to Flash files using    ActionScript, starting with using prewritten Code Snippets, but    progressing to customizing and writing their own ActionScript code.&lt;/div&gt;&lt;div style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt; &lt;span style=&quot;font-size: small;&quot;&gt;Download:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://hotfile.com/dl/86762747/cb8afe5/joinebook.com_Adobe.Press.ActionScript.3.0.for.Adobe.Flash.Professional.CS5.Classroom.in.a.Book.Jun.2010.rar.html&quot; target=&quot;_blank&quot;&gt;http://hotfile.com/dl/86762747/cb8afe5/joinebook.com_Adobe.Press.ActionScript.3.0.for.Adobe.Flash.Professional.CS5.Classroom.in.a.Book.Jun.2010.rar.html&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Mirror:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;a href=&quot;http://www.fileserve.com/file/e6sEkYn&quot; target=&quot;_blank&quot;&gt;http://www.fileserve.com/file/e6sEkYn&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Pass (If need) : joinebook.com&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;4. Learning ActionScript 3.0, 2nd Edition&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Book Description&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
If you’re new to ActionScript 3.0, or want to enhance your  skill set,   this bestselling book is the ideal guide. Designers,  developers, and   programmers alike will find &lt;i&gt;Learning ActionScript 3.0&lt;/i&gt;  invaluable for navigating ActionScript 3.0′s learning curve. You’ll    learn the language by getting a clear look at essential topics such as    logic, event handling, displaying content, classes, and much more.&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Download: &lt;/b&gt; &lt;/div&gt;&lt;a href=&quot;http://hotfile.com/dl/81243553/8e2f4b6/joinebook.com_Oreilly.Learning.ActionScript.3.0.2nd.Edition.Oct.2010.rar.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://hotfile.com/dl/81243553/8e2f4b6/joinebook.com_Oreilly.Learning.ActionScript.3.0.2nd.Edition.Oct.2010.rar.html&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;b&gt;Mirror: &lt;/b&gt;&lt;/div&gt;&lt;a href=&quot;http://www.fileserve.com/file/yc7AXmG&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.fileserve.com/file/yc7AXmG&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Pass (If need) : joinebook.com&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1858566791660149629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1858566791660149629'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2010/12/flash-action-script-ebook-free-download.html' title='Flash Action Script eBook free  download links'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-1134589355278043428</id><published>2010-12-07T01:17:00.000-08:00</published><updated>2011-04-09T11:39:31.335-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Beginner"/><title type='text'>Basic Event Listeners and Hadlers (AS3)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMnzBz3I2yEPsExZuKMmwqmrRcOfzy2KVaLNCxMB_oWPIr2UVmwEnaWD00MbFvxNeDgZiYBkqSJckGFuJZ3Si_bkOxOiAoluqkgDUakopviZbu8VcsW-I4wSl8uRluHTdX9ICaE01xM7A/s1600/image1.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;When you run a flash movie every time the mouse is clicked, it dispatches or broadcasts an event.&lt;br /&gt;
&lt;br /&gt;
For example the below image shows an instance of simple button.This button has also been given the instance name of button1 in the Property inspector.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMnzBz3I2yEPsExZuKMmwqmrRcOfzy2KVaLNCxMB_oWPIr2UVmwEnaWD00MbFvxNeDgZiYBkqSJckGFuJZ3Si_bkOxOiAoluqkgDUakopviZbu8VcsW-I4wSl8uRluHTdX9ICaE01xM7A/s1600/image1.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkZmMtVcS7jV9dQackl2oFR8M7iWeeMBg4Sa30QBwzz76XtNa2GH781-txZx-ws6Oh-ne39EwdU09XlphCnbuPvyZvhO0dSM592IaDfyIKqHYm9wI66XnpdSz5pWj5_dKPYvR4PtV3R6c/s1600/images1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkZmMtVcS7jV9dQackl2oFR8M7iWeeMBg4Sa30QBwzz76XtNa2GH781-txZx-ws6Oh-ne39EwdU09XlphCnbuPvyZvhO0dSM592IaDfyIKqHYm9wI66XnpdSz5pWj5_dKPYvR4PtV3R6c/s1600/images1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;If you select frame 1 of the Actions layer and open the Actions panel, you will notice the following code, which will be responsible for detecting and responding to the CLICK event:&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;//Event Listerner&lt;br /&gt;
button1.addEventListener(MouseEvent.CLICK,Clicked)&lt;br /&gt;
//Event Handler&lt;br /&gt;
function Clicked(Evt:MouseEvent)&lt;br /&gt;
{&lt;br /&gt;
trace(&quot;Button1 Clicked&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;The first two lines of code demonstrate what is needed for the invocation of the event listener.The second parameter in the addEventListener() method is the name of a function that&lt;br /&gt;
will execute when the event is detected, in this case Clicked().</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1134589355278043428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1134589355278043428'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2010/12/basic-event-listeners-and-hadlers-as3.html' title='Basic Event Listeners and Hadlers (AS3)'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkZmMtVcS7jV9dQackl2oFR8M7iWeeMBg4Sa30QBwzz76XtNa2GH781-txZx-ws6Oh-ne39EwdU09XlphCnbuPvyZvhO0dSM592IaDfyIKqHYm9wI66XnpdSz5pWj5_dKPYvR4PtV3R6c/s72-c/images1.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-1326758135221117542</id><published>2010-12-06T01:40:00.000-08:00</published><updated>2011-04-09T11:39:58.535-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sound in Flash"/><title type='text'>how to play a internal sound file in action script 3</title><content type='html'>1. First create a flash file named Mysound.fla&lt;br /&gt;
2. Impor sound into library. File -Import-Import to Library&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;goog_268377170&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_268377171&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbeYscq9GVUKbBC7ZnTXY1vg3KsJiyVKWY9MRpqQIVT8YwAh4zhyphenhyphen6TVVadcB5HX0Ik82V8BuCAAvys0bDIRmjxeUCZHWbDo0rC-F9w6udMnYTETTKmOFbl5D6cmGJq9aWaQ9H_b5HXGdc/s1600/image_import_library.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbeYscq9GVUKbBC7ZnTXY1vg3KsJiyVKWY9MRpqQIVT8YwAh4zhyphenhyphen6TVVadcB5HX0Ik82V8BuCAAvys0bDIRmjxeUCZHWbDo0rC-F9w6udMnYTETTKmOFbl5D6cmGJq9aWaQ9H_b5HXGdc/s1600/image_import_library.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Select the file you want to play. the selected file go to the Library window.&lt;br /&gt;
5.Then right click the sound file you want to play you can see the &quot;Linkage &quot;. Select the Linkage a window will open.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBLa90VVexPhQkDeFTOv0dkhOogToJIyPh51grmuj49mj4xWP7eDFpC1WO9NWHaaWtAUcYDGKnmDP9wFGRAljd6IjmU1M9ASG8X_IQIFHSNHOBVCn6fXoG8WYn3EimmxrH7goWfdJHus/s1600/linkage_image.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBLa90VVexPhQkDeFTOv0dkhOogToJIyPh51grmuj49mj4xWP7eDFpC1WO9NWHaaWtAUcYDGKnmDP9wFGRAljd6IjmU1M9ASG8X_IQIFHSNHOBVCn6fXoG8WYn3EimmxrH7goWfdJHus/s1600/linkage_image.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.Give the class name to &quot;mysound&quot;. &lt;br /&gt;
7. Tick&amp;nbsp; the Export&amp;nbsp; for Action Script then Click Ok button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYMzCW0rLHLODw0e8fV29QEv5gNF9YdGSYCvLuTqHkgRxImZz6j58WfEye_H8K8VSlawS36sOqICSX4M-RLKq2CUTs8PvdLwsbwMfG3_MrAe_67hwPTecYqQi4zaltKdnByk7UHpGSrnU/s1600/warning.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYMzCW0rLHLODw0e8fV29QEv5gNF9YdGSYCvLuTqHkgRxImZz6j58WfEye_H8K8VSlawS36sOqICSX4M-RLKq2CUTs8PvdLwsbwMfG3_MrAe_67hwPTecYqQi4zaltKdnByk7UHpGSrnU/s1600/warning.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7.The flash give a warning window. It will create a class for sound file. Then clik ok.&lt;br /&gt;
&lt;br /&gt;
8.Click the top frame. and Press F9 for the action script window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Then type the following code.&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;var _mysound:mysound=new mysound();&lt;br /&gt;
var _channel:SoundChannel=new SoundChannel();&lt;br /&gt;
_channel=_mysound.play();&lt;/div&gt;&lt;br /&gt;
10.Then press the &quot; Ctrl+Enter&quot;.The sound file will play.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1326758135221117542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/1326758135221117542'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2010/12/how-to-play-internal-sound-file-in.html' title='how to play a internal sound file in action script 3'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbeYscq9GVUKbBC7ZnTXY1vg3KsJiyVKWY9MRpqQIVT8YwAh4zhyphenhyphen6TVVadcB5HX0Ik82V8BuCAAvys0bDIRmjxeUCZHWbDo0rC-F9w6udMnYTETTKmOFbl5D6cmGJq9aWaQ9H_b5HXGdc/s72-c/image_import_library.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-6954879969662628948.post-480532275094584569</id><published>2010-12-02T05:51:00.000-08:00</published><updated>2011-04-09T11:40:34.068-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="load image"/><title type='text'>How to load an external image using Action Script 3.0</title><content type='html'>This is tutorial will help you to how to load an external Image usign action script 3. &lt;br /&gt;
1. First create a flash document and save Sample.fla.&lt;br /&gt;
2. Go to the first frame..then type the following code&lt;br /&gt;
&lt;div class=&quot;codeview&quot;&gt;var img_load:Loader = new Loader();&lt;br /&gt;
img_load.load(new URLRequest(&quot;myPhoto.jpg&quot;));&lt;br /&gt;
addChild(img_load);&lt;/div&gt;3.The &quot;myPhoto&quot; is a image stored where you are saving your flash file.&lt;br /&gt;
4.Press &quot;Ctrl+Enter&quot; See the result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I think this will help you..</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/480532275094584569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6954879969662628948/posts/default/480532275094584569'/><link rel='alternate' type='text/html' href='http://flainfo.blogspot.com/2010/12/how-to-load-external-image-using-as3.html' title='How to load an external image using Action Script 3.0'/><author><name>Libin</name><uri>http://www.blogger.com/profile/18283059721603447799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS84WUtUQAFUHNtNTRqzTEZwJ388rZHaXk_h3pq6x8CjK5cmZyUFf2axp5TKePERgYbzXddj7OXEluSTffEHhchHLMRsP643hwbKm7rEoxXENgtqTF9nO_kZGXl181Jw/s220/ss+copy.jpg'/></author></entry></feed>