Archive for the ‘Adobe Flash’ Category

Finding Page URL using ActionScript

Tuesday, January 27th, 2009

How can I find the url of the page my flash is embedded in? This may seem really simple but I cant count how often I find js functions which pass this value into the flash. ExternalInterface allows access to a wide variety of js and should not be over looked. The below line of code will call the javascript “window.location.href.toString” and return the url as a string.

Flash Player 10 (FP10) Beta Release

Thursday, May 15th, 2008

Adobe have added a lot of new features to the player. I am just gonna highlight what stood out to me.

3D Support & Effects

There is now support for 2D surface in a 3D environment. This mean you can animate a 2D object in 3D space natively in flash with out the need for a 3d party engine. If you would like to use 3D object like a cube, sphere or teapot with out have to construct the basic objects your self a 3rd party engine is still needed. The effects in 3D are like the filters only applied in 3D and seem to have a more robust support which incorporates the hardware acceleration.

Graphics Card Support

Finally, hardware rendering that does not require full screen mode. It needs to be enabled in the html though. It also seems that adobe have limited support to cards with Open GL 2.0 with GLSL capabilities. You will get a green square in the top left corner if there is any acceleration.

Text Engine Rebuild

Support for right to left and top to bottom languages. Maybe the engine will render a bit more like adobe photoshop which will mean matching flash to photoshop design will become a bit easier.

Vector Data Type

Basicly a typed Array. Should run a bit faster and take less memory.

Relevant  links:

Release notes :
http://labs.adobe.com/technologies/flashplayer10/releasenotes.html

Install instructions(found in the release notes) : http://labs.adobe.com/technologies/flashplayer10/releasenotes.html#install

navigateToURL and popup blockers

Monday, March 3rd, 2008

AS3 has brought a lot of new functionality and complexity to flash development. It has also brought some new problems.

Pop up blocking is simple principle where only user initiated events can open a new window. In the case of AS2 when creating a link it had to be triggered from an onRelease/Click event. Other wise in AS2 “getURL” was adequate in any browser. Unfortunately “navigateToURL” in AS3 does not seem to be useful across all browsers as even on Click it can still be pop up blocked.

In my mission to get a flash only solution for opening URLs that don’t get pop up blocked, I found ExternalInterface call to “window.open” works as long as its available in the browser. The basics of the code I used is below.

Custom character sets in Flash

Monday, January 7th, 2008

One of the surprisingly time consuming tasks when making a localized (multi-language) site is deciding on which characters you want to embed. In the flash IDE there is a few default sets. If u find those sets to be insufficient but have your own that you would like to add to the IDE check out this article.

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000894.html

If u want be very exact and only use exactly characters you know will be on there you can get a custom set from a text file using this handy dandy page.

http://www.epic.dk/flash-unicodetable/flash-unicodetable-generator.php 

FIVe3D

Monday, December 3rd, 2007

Yet another 3D engine. This one is a vector based engine. It does not take bitmaps as far as I can tell from the documentation. they have implemented it in a very AS 3 style. 3D drawing API creates an object called sprite and it uses function names like “Drawing.star()”. If all you want is a vector based 3D engine then it might be worth checking it out. Other wise I am given it a miss till they port it to AS3 and add a bit more to it. It does look very smooth though.

Check it: http://five3d.mathieu-badimon.com/

FDT 3 Object not being treated as dynamic

Wednesday, November 28th, 2007

After installing FDT 3 I opened up a project I was working on and practically every class was loaded with errors and warnings. The warnings were no surprise but the errors were really getting to me. After a little look it seemed all the errors came from dataproviders and other things made from the object class. It seems the object class was not being treated as dynamic. So any undeclared variables used in an object flagged a horrible error.

 

This seems to me to be a FDT error. Maybe not exactly an error with FDT as FDT is interpreting the object class correctly. It’s the Object class that is not defined correctly. If you look you will see the Array class does not have the same problem. This due to object not being defined as dynamic, so if you go to the Object.as in the core library in FDT and add “dynamic” after “intrinsic” save then refresh your project all the errors should vanish.

APE Physics Engine

Tuesday, November 27th, 2007

  APE (Actionscript Physics Engine) is a 2D Engine for flash(AS3) that has a very robust API. A basic demo can be knocked up in a dozen lines of code. Its also ported to quite a few platforms.

http://www.cove.org/ape/index.htm

Help in FDT

Monday, November 26th, 2007

I was looking up a help file in Flash. You know right click “View Help”. I got to thinking, surely FDT should be able to do the same thing. I took a look and low and behold it did. IF you(FDT3):

Window -> Preferences -> FDT -> Tools -> Flash Help

As long as you installed Flash in its default location simply hit “Apply” reset eclipse and you will have access to the help by pressing “F1” on any Flash key word.

Alternativa3D engine

Friday, October 26th, 2007

Looks like PV3D my have a friend to play with.  It does not look like this will be public engine as they seem to trying to make a Flash Player based MMORPG(Massivly Multiplayer Online Role Playing Game) with it. But it looks very good.

check the examples:

http://blog.alternativagame.com/ru/files/2007/10/3denginedemo_en.swf

http://blog.alternativagame.com/ru/files/2007/10/goldenelephants.swf

Flash Tracer

Tuesday, July 24th, 2007

Well after a little time and a tip from a friend I got the firefox flash tracer plug-in working(available here). You need to uninstall the regular player(uninstaller available here). Then install the debug player(available here). Assuming you have used the flash 9 debug player and have already installed the flash tracer from above then in the options of the flash trace panel in the ‘select output file’ enter the below location:

for windows xp:

C:Documents and Settings{user account}Application DataMacromediaFlash PlayerLogsflashlog.txt

other OSs to come.

If you are done all that you should be good to go.