This One's For You Jesus

Ahoy, it's been a while so i thought i would update you on what has been keeping me busy over the past few weeks. I've managed to squeeze in a few hours of uni work here and there but this game has been a hit at uni. Jump high, dazzle with a few flips here and there and see if you can get as far as those freaks on youtube... 

Take a look at Alan Rawkins' game Dolphin Olympics 2

Be the first to rate this post

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

10 Future User Interfaces

An interesting article from Smashing Magazine that presents 10 different user experiences. Some utterly useless but some with some real potential whose technology is already half way there.

Check it out: http://www.smashingmagazine.com/2008/08/17/10-futuristic-user-interfaces/ 

Be the first to rate this post

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

Problem with navigateToURL when using mailto in Internet Explorer

If you want someone to select a link that navigates to someones email address without opening a window, your first instinct would be to do this: navigateToURL("mailto:some.email@myemail.com", "_self");

This works fine in most browsers but Internet Exporer IE opens a new window which says something like there is an error trying to navigate to that page.

There are probably a few ways around this so here is one. Basically use an externalInterface  to call the built-in javaScript assign() method and pass in the target url.

Eg: ExternalInterface.call("window.location.assign", "mailto:some.email@myemail.com"); 

 

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)

Be the first to rate this post

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

Dynamically smoothing a bitmap

If you are running into issues trying to smooth bitmaps dymaically then try these things.

gskinner has a blog post on a small bug in the player where smoothing is set to false after the bitmap data gets changed.

var bmp:Bitmap = new Bitmap(null,true);
trace(bmp.smoothing); // true
bmp.bitmapData = bmpd;
trace(bmp.smoothing); // false


If that still hasn't solved your problem and you are still getting aliased bitmaps then setting the stage.quality property to StageQuality.BEST should do the trick.

stage.quality = StageQuality.BEST

For a good comparison of this check out this link: http://www.geocities.com/niquon/bitmap_test/

Be the first to rate this post

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

MouseEvent.MOUSE_WHEEL on Mac

So if you're like me and wanting to get mouse scroll events dispatching on a mac you might be running into some problems. Mac OSX doesn't register mouse scroll events from flash player. The solution is to call an external interface and get the mouse scroll through Javascript.

Gabriel from Pixel Breaker has a more in depth solution.

http://blog.pixelbreaker.com/flash/as30-mousewheel-on-mac-os-x/ 

Currently rated 5.0 by 1 people

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

Video in Flash + Fullscreen

So you need to create a video player in flash. There are a few ways to do this but what is the best way to approach it? It ultimately comes down to what you are after and in case you're not familiar with the points below have a read and hopefully it can help make your decision.

FLVPlayback
Pros
- Quick, drag, drop, set parameters on your way.
- easier to skin than previous component versions
- ability to add cue points
- implement standard captioning through FLVPlayback captioning
- access to built in VideoEvents, volume controls with built in full screen fucntionality

Cons
- Filters and effects would be applied to whole component
- difficult to add custom functionality without deconstructing underlying code (can experience unusual results)
- publishes redundant classes that increase file size

Video Class
Pros
- fully customizable video player
- complete control over hadnling events
- reduced file size

Cons
- need to create own handlers to respond to NetStream events (no built-in events on Video class)
- fullscreen hardware acceleration only available in latest flash player
- without latest player video scales to screen size.

Limitations of fullscreen
- You must have version 9,0,28,0 or later of Flash Player installed to use full-screen mode and 9,0,115,0 or later for hardware-scaled full-screen mode.
- fullScreenRect only available in latest flash version. fullScreenRect chooses what part of the screen scales to fullscreen.
- in earlier versions of flash fullscreen was not supported if wmode is set to transparent or opaque

To get around the latest flash player issue include expressInstall so the user has the option to install on the fly the latest player. People without administration rights may have trouble with this as the only drawback.

Also included a link to Flash Video for Professionals by Lisa Larson and Renee Costantini on Amazon.com. It has useful information on how video is handled in flash. I found seeking to be very interesting, where if you scrub the video playhead it will snap to the nearest keypoint in the video. The more keypoints, the more seamless seeking appears.

Other useful links and references:
- Adobe full screen mode article: http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html
- Adobe full detection kit: http://www.adobe.com/products/flashplayer/download/detection_kit/
- Fullscreen Demos:  http://labs.adobe.com/wiki/index.php/Flash_Player:9:Update:Full-Screen_Mode:Demos
- Flash Video for Professionals: Purchase on Amazon

Be the first to rate this post

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

TweenerLite ColorMatrix Tweening

 

Ok so after some investigation of the colorMatrix class i can across a handy little tweening engine called TweenerLite. If you are familiar with the as3 Tweener classes by caurina then you will find that this tweener works in a similar fashion.

 The power of this Tweener lies in its ability to tween filters such as blurs, glows, drop shadows, bevels and also image effects like contrast, colorization, brightness, saturation, hue, and threshold. Check it out. 

 http://blog.greensock.com/tweenfilterliteas3/

 

Be the first to rate this post

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

Dummy's guide to Dream Team Part 1

 

What's that I hear you say? How do you become one of the top dreamteamers in 2008? Well my friend you have come to the right place. Let’s take a back seat from Flash for a moment and venture over to the world of dream team, a game that distorts your perception of AFL and transforms you into a number crunching Nazi. When you start yelling at the TV screen “Why didn’t you kick the bloody thing?!?!”, you know you have the makings of a true dreamteamer.

This is part 1 of my guide to becoming a decent dreamteamer. You will notice a supercoach banner posted above. This is dream teams nemesis, but none the less fills the gap until the real stuff opens sometime next week. 

THE BASICS:
You have a salary cap, 30 players to select, only 20 trades and a captain that earns you double points. It’s a lot to ask but with the right strategy you’ll be fine. Picking the initial starting team is absolutely essentially. No player will ever get it perfect, but the more accurate your estimations are at the start of the year the less you have to pay for it at the end of the year.

TIP 1: Pay close attention to the teams in round 1. When selecting your rookies, look for those that are actually selected. Furthermore select the ones that look like they will play most weeks. There is nothing worse than have a $90,000 rookie on your bench doing nothing.

TIP 2: A wise person likened my strategy of dream team to that of the stock market. You need to get the undervalued stocks, wait till they appreciate, then capitalize on them. Our rookies are there to make money. Once they have maxed out, get rid of them and upgrade an average player to a “Gun DTer”.

TIP 3: “Gun DTer’s” are the likes of Jimmy Bartel, Mathew Pavlich, Dean Cox and Chad Cornes. You need to have as many as these players in your team by the seasons end. When selecting your initial team you need balance. Get as many of the guns that are undervalued as you can.

TIP 4: You have 20 trades for the year. When finals hit you want at least 4 left. The mistake of the “newbie” dreamteamer is to be too trigger happy. “Oh no, I made a mistake in picking player X in round 1, trade him out the next week”. Massive mistake. Would you get rid of a puppy the first time it craps on the carpet? No you persist with it. These are precious and you should resist using them at all cost. If you are lucky you might get to use 12 trades upgrading and 8 on injuries.

TIP 5: A little bit of research never hurt anyone. Players you should be looking out for.
- Proven dreamteamers that were out the previous season due to injury.
- 3rd-4th players that are ready to explode
- Retired players whose positions need filling. Someone must step up into the roll.

TIP 6: Talk the talk wherever and whenever you can. As far as you’re concerned you’re the best dreamteamer and everyone else lives in your shadow. Egotistic banter may give you that psychological edge over your opponent.

More tips to come pre-round 1 so stay tuned and get researching there is only 720 hours left till lockout!

 

Be the first to rate this post

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

Splits here!

 So after some investigation of a nice looking water effect i came across a guy who has produced some pretty cool things. His name is Andre Michelle and hopefully his research can be a point of reference for you in the future.

Take a browse around, it's worth it.

 http://lab.andre-michelle.com/

Be the first to rate this post

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