Category: I just thought — joshspoon @ 11:52 am — Comments (0)

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)


Please donate just $1 to help me get an XBox 360

Category: Uncategorized — joshspoon @ 12:30 pm — Comments (0)

Thanks to Alex Bustin. He decided to take the bandwidth hit and upload the Flash Player 10 API to his site.

No you don’t have to download it. Also, Matt Chotin said that some new properties do not code complete currently, so don’t think you did something wrong. It’s Adobe not you.

Category: actionscript, as3, flash — joshspoon @ 7:08 pm — Comments (0)

image of swf flash player 10 guitar tunerSo after 13 year of off and on drumming I have learned a thing or two about music. Not much about tuning a guitar. Thanks to a class that I got a D in, Musical Acoustics, I know every note produces a frequency and a wavelength. With that you can now you Flash to produce a frequency and that is what I did, the six notes from left to right are the notes of a regularly tuned guitar.

Since I lost my Musical Acoustics book from UNT I had to look it up to find the Frequency of All Notes

and that pick the ones I wanted starting w/ E4.

So if you don’t have a guitar tuner…here you go.

To view this you will need Flash Player 10

View Code:

(more…)

Category: Bitmap/BitmapData, actionscript, as3, flash — joshspoon @ 7:23 am — Comments (1)

I miss writing classes w/ 50 or so lines of code and here is one. This is a take off of Lee Brimelow's Example of Dynamic Sound Generation. I'm using the BitmapData to create a tone.

Actionscript:
  1. package
  2. {
  3. import flash.display.*;
  4. import flash.events.*;
  5. import flash.media.*;
  6. import flash.net.URLRequest;
  7. import flash.system.Capabilities;
  8. import flash.text.TextField;
  9.  
  10. public class DynamicSound extends Sprite
  11. {
  12. private var sound:Sound;
  13. private var noise:Number = 0;
  14. private var _loader:Loader;
  15. private var _bm:Bitmap;
  16. private var _verText:TextField;
  17. public function DynamicSound():void
  18. {
  19. stage.align = StageAlign.TOP_LEFT;
  20. stage.scaleMode = StageScaleMode.NO_SCALE;
  21. _verText = new TextField();
  22. _verText.text = Capabilities.playerType + " (" + Capabilities.version + ")";
  23. _loader = new Loader();
  24. _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
  25. _loader.load(new URLRequest("http://www.scarlet.nl/~ivo/photo_ASTRO3.JPEG"));
  26.  
  27. }
  28.  
  29. private function onComplete(evt:Event):void
  30. {
  31. _bm = Bitmap(_loader.content);
  32. addChild(_bm);
  33. addChild(_verText);
  34. sound = new Sound();
  35. sound.addEventListener(Event.SAMPLES_CALLBACK, onCallback);
  36. sound.play();
  37. }
  38. private function onCallback(e:SamplesCallbackEvent):void
  39. {
  40. for(var i:uint=0; i<512; i++)
  41. {
  42. noise += _bm.bitmapData.getPixel(mouseX, mouseY)/ 44100;
  43. var sample:Number = noise * Math.PI * 2;
  44. sound.samplesCallbackData.writeFloat(Math.sin(sample));
  45.  
  46. sound.samplesCallbackData.writeFloat(Math.sin(sample));
  47. }
  48. }
  49. }
  50. }

Quick and Dirty!

Category: as3, flash — joshspoon @ 8:30 am — Comments (0)

Hey so I spent most of the weekend trying to get Senocular's tutorial on loading .pbj into flash player 10.

For some reason it wasn't working for me so I decided to download Pixel Bender Preview Release and copy the file's source code and export it (File > Export Pixel Bender...for Flash) and it worked so I wanted to post it. Just in case some one had the same problem.

AS FILE:

Actionscript:
  1. package {
  2. import flash.display.*;
  3. import flash.events.*;
  4. import flash.net.URLLoader;
  5. import flash.net.URLLoaderDataFormat;
  6. import flash.net.URLRequest;
  7. import flash.utils.ByteArray;
  8. import flash.utils.getTimer;
  9.  
  10. public class astro2 extends Sprite
  11. {
  12.  
  13. // image for shader fill
  14. private var _bitmap:Bitmap;
  15.  
  16. // shader fill shader; it will use
  17. // the image as an input
  18. private var _shader:Shader;
  19.  
  20. // loader to load pixel bender bytecode
  21. // for shader instance
  22. private var _shaderLoader:URLLoader
  23.  
  24. private var _loader:Loader
  25.  
  26. public function astro2()
  27. {
  28. //load image
  29. stage.align = StageAlign.TOP_LEFT;
  30. stage.scaleMode = StageScaleMode.NO_SCALE;
  31. _loader = new Loader();
  32. _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImgLoad, false, 0, true);
  33. _loader.load(new URLRequest("http://bp2.blogger.com/_Y8m29ZLX5ag/RarR3rcAVwI/AAAAAAAAAL4/dtA7xOMrI4g/s400/ASTRO_jpg.jpg"));
  34.  
  35. }
  36.  
  37. //once loaded load Pixel Bender File
  38. private function  onImgLoad(evt:Event):void
  39. {
  40. _bitmap = Bitmap(_loader.content);
  41.  
  42. _shader = new Shader();
  43. _shaderLoader = new URLLoader();
  44.  
  45. _shaderLoader.dataFormat = URLLoaderDataFormat.BINARY;
  46. _shaderLoader.addEventListener(Event.COMPLETE, shaderLoaded);
  47. _shaderLoader.load(new URLRequest("test.pbj"));
  48. }
  49.  
  50. // shaderLoader complete handler
  51. private function shaderLoaded(event:Event):void {
  52.  
  53. // set up shader
  54.  
  55. _shader.byteCode = _shaderLoader.data as ByteArray; // error if invalid
  56. _shader.data.src.input = _bitmap.bitmapData; // image input
  57. _shader.data.size.value = [100]; // constant size
  58. _shader.data.fade.value = [.5]; // constant fade value
  59.  
  60. // draw the shader every frame
  61. addEventListener(Event.ENTER_FRAME, drawKaleidoscope);
  62.  
  63. }
  64.  
  65. // enterframe handler
  66. private function drawKaleidoscope(event:Event):void {
  67. // base position on mouse location
  68. _shader.data.position.value = [mouseX, mouseY];
  69. // rotate constantly over time
  70. _shader.data.angle.value = [getTimer()/500];
  71.  
  72. // draw a rectangle with the shader fill
  73. graphics.clear();
  74. graphics.beginShaderFill(_shader);
  75. graphics.drawRect(0,0,300,250);
  76. }
  77. }
  78. }

and the Pixel Bender code:

kernel Kaleidoscope
< namespace : "Petri Leskinen";
version : 1;
vendor : "";
description : "kaleidoscope -effect, rectangular";
>
{
parameter float4 fadeColor
<
minValue: float4(0,0,0,0);
maxValue: float4(1,1,1,1);
defaultValue: float4(0,0,0,1);
description: "Fade color";
>;
parameter float2 position
<
minValue: float2(0,0);
maxValue: float2(2880,2880);
defaultValue: float2(250,280);
description: "Center point";
>;

parameter float size
<
minValue: float(1);
maxValue: float(500);
defaultValue: float(75);
description: "Size";
>;

parameter float fade
<
minValue: float(0.5);
maxValue: float(1.0);
defaultValue: float(1.0);
description: "Fade";
>;

parameter float angle
<
minValue: float(-3.14159);
maxValue: float(3.14159);
defaultValue: float(0.5);
description: "Rotation angle";
>;

input image4 src;
output pixel4 dst;

void evaluatePixel()
{
float sina = sin(angle);
float cosa = cos(angle);

float2 newC = position - size/2.0* float2(cosa+sina, cosa-sina);

// mx matrix for rotation and scaling
// mxR reverse transformation
float2x2 mx = float2x2( cosa,sina,-sina,cosa) /size;
float2x2 mxR = float2x2( cosa,-sina,sina,cosa) *size;

// coordinate p1 on the new coordinate system,
// on the center area 0.0 < p1.x < 1.0 , 0.0 < p1.y < 1.0
float2 p1 = mx * (outCoord() -newC);

// p2 integer part, p1 only decimal part,
// which maps every pixel to the center area
float2 p2 = floor(p1);
p1 = fract(p1); // p1 -= p2;

// p3 dislocation for mirroring,
// mirrored if integer part odd
float2 p3 = 1.0-2.0*p1;
p1.x += mod (p2.x,2.0) > 0.0 ? p3.x : 0.0 ;
p1.y += mod (p2.y,2.0) > 0.0 ? p3.y : 0.0 ;

// reverting to the main coordinate system, sampling and mixing the pixel
p1 = newC + mxR*p1;
dst = mix( fadeColor, sampleLinear(src,p1) ,
pow ( fade,abs(p2.x)+abs(p2.y)) );

}
}

Category: Flex Builder, Uncategorized, actionscript, as3, flash, flash player — joshspoon @ 8:10 am — Comments (0)

As many of you know ASTRO is in Public beta.

Download browser plugin

Here are some links on how to compile:

Text instruction - by Mike Chanmbers

Video Instruction - by Lee Brimelow

Flash Magizine Article

A promising sound example:

flash produced sound example - by Keith Peters

Here is my "3D" example, quick and dirty:

Actionscript:
  1. package {
  2. import flash.display.Loader;
  3. import flash.display.MovieClip;
  4. import flash.display.Sprite;
  5. import flash.display.StageAlign;
  6. import flash.display.StageScaleMode;
  7. import flash.events.Event;
  8. import flash.events.MouseEvent;
  9. import flash.geom.Vector3D;
  10. import flash.net.URLRequest;
  11.  
  12. public class ASTRO extends Sprite
  13. {
  14.  
  15. private var _loader:Loader;
  16. private var mc:MovieClip;
  17. public function ASTRO()
  18. {
  19.  
  20. stage.align     = StageAlign.TOP_LEFT;
  21. stage.scaleMode = StageScaleMode.EXACT_FIT;
  22. _loader = new Loader()
  23. _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete, false, 0, true);
  24. _loader.load(new URLRequest("record.gif"));
  25.  
  26. }
  27.  
  28. private function loadComplete(evt:Event):void
  29. {
  30.  
  31. mc = new MovieClip();
  32. mc.rotationY = 0;
  33. mc.rotationZ = 0;
  34.  
  35. stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove, false, 0, true);
  36. mc.opaqueBackground = true;
  37. _loader.x =  - (_loader.width * 0.5);
  38. _loader.y =  - (_loader.height * 0.5);
  39. mc.addChild(_loader);
  40. mc.x = (_loader.width * 0.5);
  41. mc.y = (_loader.height * 0.5);
  42. addChild(mc);
  43.  
  44. }
  45.  
  46. private function onMove(evt:MouseEvent):void
  47. {
  48. mc.rotationZ = stage.mouseY;
  49. mc.rotationX = stage.mouseX
  50.  
  51. }
  52. }
  53. }

Also here are some classes that I saw through code completion. I don't really know what to do with them yet. Maybe someone else will and will let me know (I have too much work and GTAing to do :) ).

  • flash.text.engine Package (over a dozen classes)
  • __AS3__.vec.Vector (that is wierd)
  • flash.display.GraphicsBitmapFill
  • flash.display.GraphicsPathCommand
  • flash.display.TriangleCulling (that sounds interesting)
  • flash.geom.Vector3D
  • flash.filters.ShaderFilter

Happy Coding!

Category: Bitmap/BitmapData, I just thought, as3, flash, observations — joshspoon @ 8:00 am — Comments (0)

example of BitmapTest 3 Alright, this example is very similar to the other examples I have done. But with this one I am scaling all pixels at the same rate. Just click on it the image in the example (more...)

Category: Bitmap/BitmapData, actionscript, as3, flash, flash CS3 — joshspoon @ 8:00 am — Comments (0)


Alright, in this example, I am cutting each pixel in an image and piecing it back together again. Only this time I animating the pixel to a new location, piecing back the image at 200%. I think this can open a lot doors in what you can do with a bitmap. (more...)

Category: Bitmap/BitmapData, actionscript, as3, flash — joshspoon @ 9:00 am — Comments (0)

snapshoot of bitmapData  test

So the last couple of weeks I have been jacking around w/ Bitmaps and BitmapData. I've always wanted to try it but never had the courage. Now that I have, I wish I'd have done it sooner.

In this first example I'm just copying each pixel throwing it to the wind and using Tweener to animate it to a spot. I don't think Tweener is the best option course as you can see it runs slow. I'm also using Grant Skinner's Memory Gauge to illustrate how slow it is. This is just a proof of concept anyway.

(more...)

Category: Apollo (AIR), Flex, XML, as3, flash — joshspoon @ 8:23 pm — Comments (0)

So today Daniel Dura, an Adobe Evangelist, came by Travelocity to talk about Flash, Flex and AIR. It was interesting to here him speak and his hair was redder then pictures led on. But I won't hold that against him. (more...)

sniff viagra viagra
viagra round brown pill best price for generic viagra buy viagra
monavie viagra of the amazon alcohol viagra generic viagra
cheapest generic viagra and cialis taking l-arginine along with viagra viagra online
buy viagra online au fake online viagra order viagra
hairy viagra viagra mastercard cheap viagra
natural viagra woman generic soft tab viagra buy viagra online
viagra finder viagra orgams viagra pills
viagra online shop korean word for viagra order viagra online
viagra hydrocodone interaction viagra valium kamagra discreet uk europe purchase viagra
viagra prostate remova levitra buy levitra online viagra discount viagra
generic viagra from india viagra substitute brazil omnigen herbal viagra
u s viagra by mail pfizer viagra patent viagra prescription
hearing viagra achat viagra france free viagra
viagra and gout online viagra review viagra alternatives
buy lady uk viagra woman's viagra viagra pill
hair growth with viagra natural viagra china viagra alternative
viagra levitra valium cialis tramadol hydrocodone x-tube viagra viagra sale
viagra site reviews negative side effects of viagra online viagra
go generic viagra soft tab viagra tutorial viagra uk
viagra lanuage marijuana and viagra viagra cheap
buy cheap uk viagra viagra sitio official female viagra
pharmacy viagra price gernic viagra natural viagra
can viagra prevent premature ejaculation viagra pulminary hypertension viagra for woman
discounted viagra phentermine weight loss gineric viagra viagra sale online
viagra cheap and fast delivery viagra pages edinburgh pregnant cowper viagra generic
viagra wikipedia info on viagra pfizer viagra
boards buy googlepray viagra viagra retin-a ed erectile dysfunction viagra price
generic viagra quality multiple sexual attempts viagra viagra pharmacy
employee drug testing viagra will alcohol effect viagra buy viagra now online
herbal viagra walgreens phzer and viagra lawsuits cheap viagra uk
online generic viagra airport security viagra viagra order
viagra free sites results find search pleasure cheap viagra buying viagra
angeles city viagra black market viagra viagra woman
can viagra kill you ordering viagra without prescription where to buy viagra
viagra for woman study arlene farmer viagra buy generic viagra
viagra overnite shipping sex viagra purchase viagra online
viagra wiht women average does viagra viagra drug
jack nicholson viagra when was viagra discovered viagra buy
viagra online pharmacy review pfizer viagra how does it look viagra prices
viagra usual dose where to get viagra samples buy viagra on line
interaction between viagra and beta blockers philippines viagra how much cheap generic viagra
order viagra online consumer rx advertisement for viagra cheap viagra online
viagra heart attack tadalafil cialis vs viagra buy viagra cheap
viagra deaf crohn's viagra erection viagra
for use with viagra viagra dreampharm viagra erections
sildenafil viagra danger forum funny image static viagra viagra erection
viagra or something else viagra cialis espa ol buy viagra now
find search viagra free depression libido viagra viagra on line
is mexican viagra real viagra en linea what is viagra
viagra british store boot directions for using viagra buying viagra online
viagra uses viagra every day buy viagra uk
decrease in semen viagra cialis viagra soft tabs buy online viagra
viagra blood low pressure viagra ct otc best price viagra
viagra uk without prescription cheapest generic substitute viagra viagra online pharmacy
in viagra woman viagra delayed ejaculation cheapest viagra
online viagra viagra cheapest viagra cheapest generic viagra home buy viagra in the uk
viagra trial coupon viagra cancun womens viagra
cost of viagra cheep viagra 600mg uk viagra for women
online prescription viagra viagra dosage 100mg viagra prescription online
take viagra who woman generic viagra today atlanta online order viagra
chemist viagra viagra side effects trusted pharmacy catalog alternative viagra
buy viagra viagra mdma and viagra cialis viagra
deal viagra viagra us patent date viagra cialis levitra
order viagra on line medlab viagra genetic viagra
viagra hearing viagra uses prescription viagra
best buy online price viagra viagra viagra coupon levitra viagra
viagra well works ingredients viagra get viagra
copper herbal viagra buy followup post viagra viagra best buy
natural viagra from safeway viagra scam emails mail order viagra
substitute viagra are generic viagra and vascular disease viagra sales
order viagra now money generic viagra versus generic cialis pills viagra research
viagra for the brain 150 mg viagra 100mg viagra
cheap websites for viagra viagra belgie viagra levitra
tickets viagra falls file viewtopic t 72 viagra cialis vs viagra
cialis cialis genuinerx net viagra viagra viagra stories levitra vs viagra
viagra in action photos viagra fake viagra online uk
getting peak performance from viagra effects enlargement penis of viagra cialis comparison levitra viagra
name cheap viagra text take viagra half price cheapest generic viagra
viagra eye problems eli lily viagra patent pills viagra
25mg blue generic pill viagra viagra on the internet viagra cialis
viagra uk retailers is viagra dangerous for teenagers viagra information
viagra prescribing info viagra top ten free viagra sample
what is viagra st never take steroids and viagra order viagra on line
buy get online prescription viagra 100 mg viagra from