November 2nd, 2007

AS3: Getting the path of the HTML hosting the SWF

I was trying to get the full path of the HTML that is hosting the SWF in ActionScript 3.  I found this post by Abdul Qabiz detailing how to use ExternalInterface to call JS and return the location.   In his post, Abdul also details how to get any of the query string variables as well.

Since I'm sure I'll use it again and don't want to hunt it down, I'm posting it here for myself and well as everyone else who may find it useful.

 

CODE:

  1. import flash.external.ExternalInterface;
  2.  
  3. var t:TextField = new TextField();
  4. t.autoSize = TextFieldAutoSize.LEFT;
  5. var full:String = ExternalInterface.call("window.location.href.toString");
  6. t.text = full;
  7. addChild(t);

October 29th, 2007

Flash: Every increasing system memory

A buddy of mine IM'd me last night and came across an interesting behaviour in Flash.  He had been trying to hunt down a memory leak in his Flash AS3 project and did a simple test using an Enter_Frame loop and traced out System.totalMemory.   His tests showed totalMemory going up just a little over time.  I tested it on my side and even testing it in Flex and got the same behaviour.   It's very small, but I was curious why this was happening.

Here is the very simple sample code in Flash CS3 (you could repeat it in Flex as well):

CODE:

  1.  addEventListener(Event.ENTER_FRAME, repeater);
  2.  
  3. function repeater(evt:Event) {
  4.  trace("System memory:"+System.totalMemory);
  5. }

October 25th, 2007

Flash:How to successfully open a new window in Firefox w/o being blocked???

I have tried unsuccessfully in ActionScript 3 to open a new window within my Flash app using navigateToURL w/o triggering the Firefox pop-up blocker.  This is a desired action by the user, triggered by MouseEvent.CLICK, allowScriptAccess=true,  and based on Firefox's dom.popup_allowed_events, it should work w/o being blocked.  I've googled other possibilities (http://skovalyov.blogspot.com/2007/01/how-to-prevent-pop-up-blocking-in.html) but haven't found a single option that appears to work correctly for me.   The other detail of this is that the HTML is loading the SWF and all the content from another domain, which works perfectly. Its just that Firefox is giving me fits.

Anyone got any better ideas?   

October 17th, 2007

Nokia N810 - Now w/ GPS and Mozilla browser

Engadget had sneak peeks this morning and then Nokia updated their site recently: http://www.nseries.com/index.html#l=products,n810,demo

I've been thinking about the Nokia N800 as a fun Flash development device. The 810 now has GPS, a full QWERTY keyboard (slides out from behind), and they are now using a Mozilla based browser. (I think they were using Opera before). Once the N810 pops up on Amazon, I'm going to have a tough time saying "no". I'll have to hand-me-down my PSP and Garmin GPS to someone else in my family.

October 15th, 2007

FITC: Hollywood is next week

FITC Hollywood  starts next week (Oct 22-23) and it should be a blast.  I attended last year and expect more of the same this year.   Sunday (Oct 21) is the pre-festival workshops (Flash animation, PV3D, and Flash New Features).  I highly recommend John Grden's PV3D workshop.  I took his two day workshop at RMI  and if you are interested in real 3d in Flash, this is the class you want to take.   

See everyone there. 

October 11th, 2007

Recommendations Needed: touch-screen device w/ Flash

I'm looking for a new toy to develop Flash for.    Ideally what I'd like is the iPhone, but with Flash on it. Since that hasn't happened and not sure it will happen, I'm looking for either a phone or mobile device (device needs wireless) that has a touch screen, can run Flash (either Flash Lite or Flash player), and can run Flash full screen SWFs directly from the phone/device without having to navigate with a browser.   

Can someone make a recommendation or two?   I've seen the LG Prada phone, but I'm unsure if you can develop for it w/o a browser.   I've also looked over the Nokia N800 series devices.   Thanks in advance.

September 30th, 2007

Flex 3 beta and AIR beta 2 - on Labs.Adobe.com now

Get'm while they're hot.  The new betas for Flex 3 and AIR are on labs.adobe.com

http://labs.adobe.com/technologies/flex/

http://labs.adobe.com/technologies/air/

September 26th, 2007

Flex3 Beta 2 - Updates

Ted Patrick is posting this week on the new features of Flex 3 Beta2, that I would assume is being released during MAX. Today (or actually last night at 1am), Ted posted on the new CRUD feature for Flex Builder 3.

Flex Builder 3 Beta 2 has a new feature for generating server side code for data exchange with ASP.NET, PHP, and JAVA. Simply select a database, select the tables you want to edit, and presto, full CRUD, Create, Retrieve, Update, Delete.

Check out more at http://www.onflex.org/ted/2007/09/flex-3beta-2-crud-wizard-for-aspnet-php.php 

August 28th, 2007

Time to Give Back - John Grden Needs a Mac

Open-source and the Flash community are both great.  We share our ideas and source files freely.   How much money have we made off of someone else's free source code or their open-source product like Red5 or PV3D?  How much time have products like XRay saved us?   I bet LOTS would be the answer.  

John Grden wants to replace his old Dell with a brand new Macbook Pro so he can continue to provide the best cross-platform open source Flash possible and he doesn't have the funds for it.  He's taking donations and I think giving back to someone who has given thousands of hours of his free time is more than worth it.    Head over to his site and give whatever you can afford.   Every little bit helps.

http://www.rockonflash.com/blog/?p=66

August 20th, 2007

Yahoo’s revamped Flash Dev Center - now with Tree component goodness

Yahoo has a new revamped Flash Dev Center online and they've released some Flash CS3 components that we've wanted but Adobe didn't put into Flash CS3.

 http://developer.yahoo.com/flash/

  • Tree component
  • Menu
  • Tab
  • Autocomplete
  • Charts