flash as3 JPG Encoder – Caution

Looking from the image, the white area is the flash swf canvas aka “stage”, blue area aka “_graphics_container” is the movie clip contents which you want to export as jpg even if it is larger than the mask – the green area aka “_graphics_mask”

While trying to export the contents of a movie clip as jpg image, you are about to experience an undesired result when mask is applied.

A word of caution: Remove the mask before converting the movieclip as bitmapdata and export as jpg, the undesired effect is the white space.
The solution: work around, set the graphics container mask to null
_graphics_container.mask = null;//_graphics_mask

once the image is exported
navigateToURL(jpgURLRequest, “_blank”);
_graphics_container.mask = _graphics_mask
set the mask back again for the container.

Hope that helps
tags: Flash, AS3, JPG encoder, word around

Using Flash swf + Flash / JavaScript Integration Kit over HTTPS – IE issue fix

My product works over HTTPS and I had to serve a flash application, but there was one weird behavior in IE, the security Dialog box stated an Error

“This page contains both secure and non
secure items. Do you want to display the nonsecure items?” YES, NO

I was using Flash / JavaScript Integration Kit to embed my flash application as my application needed to communicate with Javascript variables.

I tried google to find some answers but was in vain. Finally started to look in to Flash / JavaScript Integration Kit js files to find the culprit. There was a hard coded URL in the js file “FlashTag.js”

flashTag += ‘codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=’+this.version+’” ‘;

flashTag += ‘pluginspage=”http://www.macromedia.com/go/getflashplayer”>’;

All I had to do was replace http with https the problem got resolved

flashTag += ‘codebase=”https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=’+this.version+’” ‘;

flashTag += ‘pluginspage=”https://www.macromedia.com/go/getflashplayer”>’;

You can even question me why should I use Flash / JavaScript Integration Kit in the first place when I have the “ExternalInterface” Class. If you are targeting flash player less than 8 version.

Thought this should be a useful to some one who got stuck up with the IE security error dialog box.

Happy flashing…

Technorati Tags: , , , , , ,

FusionCharts Free V2 – Free Flash Charts

Good news from IndSoft Global for Software/ Web developers. Now IndSoft Global is offering its Fusion charts V2 for Free.

Flash Fusion charts Free

Terms of use:

InfoSoft Global grants you a nonexclusive right to use FusionCharts Free subject to the following terms and conditions:

  • FusionCharts Free can be used for free if you are a individual/research/commercial user.
  • FusionCharts Free can be distributed for free with your free or commercial softwares, irrespective of whether they’re open source or closed source.
  • You must not sell FusionCharts Free as a component in itself. However, your commercial product can embed FusionCharts Free.
  • You must not represent in any way that you’re the author of FusionCharts Free.

That’s right it is free and the best part is the license, check the full terms of use right here.

Now your websites and products could offer RIA experience with interactive & meaningful flash charts.

You may want to know why the software is free and the comparison between the new Fusion Charts V3 and V2, find the info right here

Start downloading the Free Fusion charts V2 software right here

Like this link, care to share it with fellow developers.