2008
09.25

I’m pleased to announce that the AS3 Apex user group now has Adam Longaway on board. Adam is a talented web/multimedia developer from build a bear workshop.  So  be sure to stop and stay hi to Adam if you see him at our meeting or in the forums.

- Josh Chernoff.

2008
09.17

We have an update to inform you of, the October 4th meeting will now start at 3pm and not 6pm. Other then that, same host, same day, same location. Hope to see you there!

- Josh Chernoff

2008
09.15

I give credit to BigSpaceShip for this idea found at this post. Thanks your guys rock!

The thing that has always bugged the heck out of me is the naming convention for loop iterator variables.
Example: loop One would be named “i”, I always thought because it was i for iterator. What about the Second loop named “j”. Whats that stand for? and what do you name the Third loop if there is one? Well if your like me that always kinda confused you and felt convoluted.

Now here’s the cool new idea, use “i” as in Roman Numerals.
Example: loop One would be “i”, loop Two “ii”, loop Three “iii”, ect….. Now that makes sense!
Not only can you quickly identify what loop iterator your looking at but you now have a reason for name the next iterator if you need to.

I know this is not ground breaking or big news but it’s this type of thinking AS3 needs more of and I will continue to promote it so long as I see it.

2008
09.08

[UPDATE]::::: Meeting will now start at 3pm NOT 6pm::::: [UPDATE]

Come to a joint event with AS3 Apex and Flex and Fuse the Arch for a night with Joey Lott. There is limited space available so please RSVP by emailing me at josh@gfxcomplex.com And for you who may not know Joey Lott he has written a few O’reilly books such as Action Script Cook book and some online video tutorials about Action script over the years.

The event will be at the Drive Agency, located at 1617 Locust at 3pm on October the 4th.

Hope to see you there.
- AS3 Apex, Fuse and Flex the Arch.

2008
09.04

I have been playing with BitmapData type and getPixelAt to make histograms. When I seen that the flash 10's BitmapData has a new method called histogram I thought it was a new improvement on analyzing BitmapData. Boy was I wrong. it's really really slow and I don't have clue why. Bug maybe??

Here's the code for any one who thinks it maybe that. Whats your thoughts?

FYI: with a for loop and getPixelAt I could still get 25fps at 1ms cycles. Though I have yet to see the frame rate for histogram, I cant event get close to a 1fps.

Actionscript:
  1. package
  2. {
  3.     import flash.display.BitmapData;
  4.     import flash.display.MovieClip;
  5.     import flash.display.Shape;
  6.     import flash.display.Sprite;
  7.     import flash.events.AsyncErrorEvent;
  8.     import flash.events.Event;
  9.     import flash.events.TimerEvent;
  10.     import flash.geom.Rectangle;
  11.     import flash.media.Video;
  12.     import flash.net.NetConnection;
  13.     import flash.net.NetStream;
  14.     import flash.utils.getTimer;
  15.     import flash.display.BlendMode;
  16.     import flash.utils.Timer;
  17.    
  18.     public class Main extends Sprite
  19.     {
  20.        
  21.         private var graphic1:Shape;
  22.         private var graphic2:Shape;
  23.         private var graphic3:Shape;
  24.         private var vect:Vector.<Vector.<Number>> ;     
  25.         private var bmd:BitmapData;
  26.         private var video_mc:MovieClip;
  27.        
  28.         private var rect:Rectangle;
  29.        
  30.        
  31.         public function Main():void
  32.         {
  33.             graphic1 = new Shape();
  34.             graphic2 = new Shape();
  35.             graphic3 = new Shape();
  36.            
  37.             stage.scaleMode = "noScale";
  38.             perspectiveDemo();
  39.  
  40.             bmd = new BitmapData(video_mc.width, video_mc.height);
  41.            
  42.             addChild(graphic1);
  43.             addChild(graphic2);
  44.             addChild(graphic3);
  45.            
  46.             graphic1.blendMode = BlendMode.SCREEN;
  47.             graphic1.x = 30;
  48.             graphic1.y = 200;
  49.             //graphic1.scaleY = .15;       
  50.            
  51.             graphic2.blendMode =BlendMode.SCREEN;
  52.             graphic2.x = 30;
  53.             graphic2.y = 200;
  54.             //graphic2.scaleY = .15;       
  55.            
  56.             graphic3.blendMode = BlendMode.SCREEN;
  57.             graphic3.x = 30;
  58.             graphic3.y = 200;
  59.             ///graphic3.scaleY = .15;
  60.            
  61.         }
  62.  
  63.        
  64.         private function perspectiveDemo():void
  65.         {
  66.            
  67.             video_mc = new MovieClip();
  68.             addChild(video_mc);
  69.             video_mc.x = 30;
  70.             video_mc.y = 30;
  71.            
  72.             var video:Video = new Video(320, 140);
  73.             var nc:NetConnection = new NetConnection();
  74.             nc.connect(null);
  75.             var ns:NetStream = new NetStream(nc);
  76.             ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, handleFakeError);
  77.            
  78.            
  79.             video_mc.addChild(video);
  80.             video_mc.x = 400;
  81.             video.attachNetStream(ns);
  82.             ns.play("http://gfxcomplex.com/labs/wall-e-tlr3_h320.mov");
  83.            
  84.             rect = new Rectangle(0, 0, 140, 300)
  85.            
  86.             var timer:Timer = new Timer(100);
  87.             timer.addEventListener(TimerEvent.TIMER, checkColor3);
  88.             timer.start();
  89.    
  90.         }
  91.        
  92.         private function handleFakeError(e:AsyncErrorEvent):void
  93.         {
  94.                 //
  95.         }
  96.        
  97.        
  98.         private function checkColor3(e:TimerEvent):void {
  99.  
  100.             bmd.draw(video_mc);
  101.            
  102.             vect = bmd.histogram(rect);
  103.            
  104.            
  105.             for (var i:int = 0; i <256; i++)
  106.             {         
  107.                
  108.                
  109.                 graphic1.graphics.lineStyle(.25, 0xff0000);
  110.                 graphic1.graphics.moveTo(i, 0);
  111.                 graphic1.graphics.lineTo(i, -(vect[0][i]));
  112.                
  113.                 graphic2.graphics.lineStyle(.25, 0x00ff00);
  114.                 graphic2.graphics.moveTo(i, 0);
  115.                 graphic2.graphics.lineTo(i, -(vect[1][i]));
  116.                
  117.                 graphic3.graphics.lineStyle(.25, 0x0000ff);
  118.                 graphic3.graphics.moveTo(i, 0);
  119.                 graphic3.graphics.lineTo(i, -(vect[2][i]));
  120.  
  121.             }
  122.             graphic1.graphics.clear();
  123.             graphic1.graphics.clear();
  124.             graphic1.graphics.clear();
  125.         }
  126.     }
  127. }