You make my half pixel a whole one.

Flash loves whole pixels like street punks loved hippies - not a lot.

So what can we do when Flash insists it puts all our pixel-perfect image assets on half pixels, rendering their movements wonkier then a drunken unicyclist? 
We could go through every keyframe and round their x and y positions to the nearest whole number in the properties panel, or (as I discovered today) we could just click a single button. This glorious flash extension works on multiple movieclips at once, can round width & height, x & y, or both!

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Gettin' Queasy

Every so often when I'm working amongst my fellow flash developers, I'll notice something strangely... inefficient.

A poor sod manually aligning a movieclip to 0, 0, or turning on bitmap smoothing via a series of unnecessary menus, or even setting a movieclips' alpha to 0 with a (gasp) slider.

It's at this point I tap them on the shoulder and mention a plugin which has changed the way I work every day; Queasy Tools. 

This baby does a lot more then mentioned above, it's great for setting custom easing in one click, copy and pasting positions of movieclips, converting text to all caps or all lower case - the list goes on. So if you don't use it already, do yourself a favour and grab it here: 

http://ajarproductions.com/blog/2008/07/15/queasy-tools-panel-v150/

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Alternative Debugger

De MonsterDebugger is an Air application from De Monsters that comes with a handy set of features. One of its better known features includes editing properties and calling methods at runtime. This alone definitely makes it a nifty little debugger. It also displays xml as a tree that is collapsable and expandable. At times the overall tree structure can be somewhat clunky but it's enough to get me using it. The only catch with these perks is that all your properties and methods need to be public so that they are accessible.

To enable MonsterDebugger in your application instantiate it first like this:
this.monsterDebugger = new MonsterDebugger(this);
this is the reference to the root of the application. This line alone allows to modify methods and properties throughout your application.

To make a trace you would write this:
MonsterDebugger.trace(this, xml);
this is the reference targeted object.

One last thing to consider is that you export the classes needed for MonsterDebugger from the Air application to the client side folder. To do this navigate to the following in the Air app:
File > Export Client Class
Point to the folder that contains all your application's classes

Download the Air application Version 2.51

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Linking to URLs in a standalone player

You aren't allowed to link to external URLs that aren't in th esame domain from the standalone desktop player.

Why? It could be a file that you've download and could take you to a site that may harm your computer.

What you can do:
- Make it an AIR app
- Make it a projector (.exe .app)

Currently rated 2.0 by 1 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Implementing swfaddress

In its most basic implementation swfaddress enables developers to deep link their project and incorporate browser functionality into their flash applications. This is pretty clever but it also has some pitfalls if not implemented correctly.

I recently worked on a project that required this functionality and experienced some unwanted behaviour i thought i would share.

- Earlier versions of swfaddress can break flash applications in browsers specific browser. (IE7 + 6)
- Be sure to handle situations when an incorrect URL is entered through the browser
- To err on the side of caution always make your application react and animate AFTER the URL in the browser has changed.

The below link is a folder i created that has the required assets to implement swfaddress in your project. This is version 2.4 and i can confidently assure its stability across all browsers. It contains the AS3 classes and javascript file needed. It does not contain working examples or instructions on the implentation, that can be found at the swfaddress site.

SwfAddress Assets.zip (10.98 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Advances with OpenCV

I came across this post on drawlogic.com called AS3 Version of OpenCV for Facial Detection, Web Cam Object Detection, Head Tracking, 3D Library Integration and more with Open Computer Vision Library for Flash. Check out the examples. Using facial recognition to alter the viewpoint and also using it to manipulate a papervision model. There is also a nice round up of what is going on with openCV ports, alchemy and augmented reality.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Calling all data visualization nerds

Check this data visualization library looks intersting ...

"Flare is an ActionScript library for creating visualizations that run in the Adobe Flash Player. From basic charts and graphs to complex interactive graphics, the toolkit supports data management, visual encoding, animation, and interaction techniques. Even better, flare features a modular design that lets developers create customized visualization techniques without having to reinvent the wheel."

http://flare.prefuse.org/

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Flasher Video Magazine

Hey kids,

 

If you haven't checked out issue 2 of Lee Brimelow's Flasher Magazine yet I recomend you do.It's lots of fun and I really like the whole punk ethos he's going for with all the references to Thrasher Magazine, and interviewing people who swear a lot and hate on Adobe and Flash.

I think it's funny how he's trying create a cult of celebrity within the Flash community. Maybe he'll want to interview me one day...

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Hello, Internet

Hello, my name is SmashyMcSmashSmash. I am new!

Here are some interesting Flash-releated things from the internet:

Alchemy, a new compiler/code set from Adobe that acts essentially as a virtual machine for C/C++ code, and allows it to interface with Actionscript 3, and play through the Flash Player (flash player 10 only).

A pretty good version of Doom has already been ported using Alchemy, which shows it's power.

Also really cool is FLAR, an Actionscript 3 technology that provides a toolkit for creating augmented reality in Flash, using Papervision to render 3D objects.

 An impressive demo can be seen here. There's a video of it below.


Papervision - Augmented Reality (extended) from dpinteractive on Vimeo.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Creating a Hit Area on Transparent PNG Content for Button Use

 
After weeks of investigation and discussion we have come up with a way to create a button on the content of a loaded in transparent png.

 You can set a sprite mask to use a bitmap and it will mask successfully so long as both are cached as a bitmap. This is ok but when you put mouse listeners on the sprite it registers the whole rectangular area.

 Next we thought we'd utilize the bitmapData getPixel32 method which returns an ARBG colour when passed in the x and y coordinate. This works great but you can only get 1 pixel at a time.

So then we thought a bit outside the sqaure and rather than create a dynamic hit area over the bitmap, we'd use the stage's MouseEvent.MOUSE_MOVE listener and get the x and y of the current position then pass that into the getPixel32 methods of each bitmap.

Success however for overlaying bitmaps this method is limited. Now we would need to updated the mouseEnable property on the fly to allow for bitmaps that are being obscured.

So the final thing you would need to do is check to see whether or not the ARBG value is equal to 0. If so enable the mouse add a MouseEvent.CLICK listener to the clip and set the button mode to true. I also use a boolean isActive to avoid adding multiple listeners. Once the ARBG value equals 0 then disable the actions by removing the MouseEvent.CLICK listener set the button mode to false and set mouseEnabled to false.

The reason we use the stage MouseEvent.MOUSE_MOVE listener is so we can always receive updates regardless of whether the bitmap button is enabled or not. If we set the bitmap button MouseEnabled property once we set it to false we'd never receive mouse events again.

So there we have it, still in it's infancy but nonetheless a solution to a perculiar problem. See the attached AlphaBitmapButton.as to view the workings.

View Example 

AlphaBitmapButton.as (3.76 kb)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5