Archive for the 'Learnings' Category

Flash: Create background pattern in Flash 8

Tuesday, September 27th, 2005 by Luis

Quick example of how to create a tiled bitmap in Flash 8 using MovieClip.beginBitmapFill method instead of using duplicated movieclips.

SWF sample:

[flash]http://www.blog.lessrain.com/wp-content/upload/tilebackground2.swf,400,200[/flash]

Actionscript:
  1. import flash.display.BitmapData;
  2. var pattern:BitmapData = BitmapData.loadBitmap("img_105");
  3. function createTiles():Void {
  4.    
  5.         with (_level0) {
  6.            
  7.                 beginBitmapFill(pattern);
  8.                 moveTo(0, 0);
  9.                 lineTo(Stage.width, 0);
  10.                 lineTo(Stage.width, Stage.height);
  11.                 lineTo(0, Stage.height);
  12.                 lineTo(0, 0);
  13.                 endFill();
  14.         }
  15.        
  16. }
  17.  
  18. createTiles();


Related Entries:

Flash: EFFECTiveness in Flash 8

Monday, September 19th, 2005 by Luis

Well, probably this is not as fancy as 'fire', 'smoke', 'particles', '3d', but I would like to highlight this post from Tinic Uro where he gives some ideas of how to use the new 'Flash 8 features' in a different and practical way.

Worth to read: Using Flash Player 8 filters for good.

More ideas around this topic:

I think, since the new Flash Player has access to the pixel data of a webcam, we are close to the possibility of creating hands free devices that will enable many disable people to use their computers, such as Mouse Vision.

Related post: Flash 8 and webcams.

Flash: Force Download… No more dirty tricks in Flash 8

Friday, September 16th, 2005 by Luis

Following up our post Force Download where we discussed a few tricks to download a picture directly from flash using getURL and a simple php script, I feel like continue the post adding how you can achieve the same or even better by using the FileReference.download method in Flash 8.

Cleaner better and simpler:

Actionscript:
  1. import flash.net.FileReference;
  2. var myPic = "url to my picture";
  3. var fileRef:FileReference = new FileReference();
  4.  
  5. function bringmethePicture(){
  6.     fileRef.download(myPic, 'IMG_0200.jpg')
  7. }


Sample swf: (just right click the picture to download the image): [flash]http://www.blog.lessrain.com/wp-content/upload/download2.swf,350,200[/flash]

Flash: Cast to Array

Thursday, September 15th, 2005 by Thomas

Now that's weird: it seems to be impossible to cast to an Array in AS2!

The "natural" way of doing it for me would be this:

Actionscript:
  1. var a:Array = [ [1, 2], [3, 4] ];
  2. var b:Array = Array(a[0]);
  3. trace(b[0]);


I'd expect the output to be "1", but it actually prints "1,2"!

Read the rest of this entry »

Flash: Transformation Matrix in Flash 8

Thursday, September 15th, 2005 by Luis

Senocular has put together a comprehensive tutorial about the Transformation Matrix in Flash 8.

Worth to take a look.

Flash: Video Tutorials

Wednesday, September 7th, 2005 by Luis

Flash Extensions

New set of Video Tutorials by flashextensions.

Previous related entries:

Flash: Video Tutorials

Wednesday, August 24th, 2005 by Luis

Flash Extensions

New set of Video Tutorials by flashextensions.

Previous related entries:

Flash: Best Practices for Flash Player Detection

Thursday, August 11th, 2005 by Luis

Interesting article at Macromedia about the pros and cons of several approaches to Flash detection, plus a description of the new Flash 8 detection script and Flash Player Express Install.

Via Marco Casario Blog

Flash: More Video Tutorials

Tuesday, August 9th, 2005 by Luis

Flash Extensions

New set of Video Tutorials by flashextensions and some Flash 8 tutorials coming soon.

Flash: Video Tutorials

Tuesday, August 2nd, 2005 by Luis

Flash Extensions

New set of Video Tutorials by flashextensions.

Flash: Bandwidth Detection

Wednesday, July 6th, 2005 by Luis

Old but interesting notes of how to to detect a specific user's download speed with Flash, by Hayden Porter.

Flash: Sound

Monday, June 6th, 2005 by Luis

It is not up to date but still one of the best resources about Sound and Flash. Worth to take a look Remixology, the craft of building web audio applications by Hayden Porter