Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


5 Flash Tips: onLoad Event Handler Not Working With loadMovie?
Guy Watson shares a few quick hints

Tip #1: Neat Fix - onLoad Bug
I have heard so many people moan on the many community forums and mailing lists about the onLoad event handler not working with loadMovie and although I have already posted a fix for the problem (www.actionscripts.org/forums/showthread.php3?threadid=13830), I found this very small and functional fix that does the same thing, a while ago on the Flashcoders Mailing List: http://chattyfig.figleaf.com/mailman/htdig/ flashcoders/2002-October/049415.html and so if you see the question, forward people to http://chattyfig.figleaf.com/apache2-default/.

Tip #2: Bug - Sound.loadSound & GetRight
If you have GetRight (www.download.com/GetRight/3000-2071_4-10005533.html) installed on your computer, a download management utility, and you view a Flash movie that attempts to load an mp3 sound file into the Flash Player dynamically using the Sound.loadSound method, GetRight stops the loading of the mp3 file and asks you to choose a location to save the mp3 file on your local computer; whether you choose to download the file or not, Flash still does not load the file into the player, which raises an issue.

GetRight is one of the most, if not the most popular download utility and this is the default behaviour of the program, of course these settings can be changed, by removing the hook for mp3 files but Flash alone cannot do this automatically for you, this is a manual process that viewers of your site will have follow if they want to listen to dynamically loaded sounds on your site...

To fix the problem, I assume that by changing the file extension of your mp3 files to something which is not registered as a download hook in GetRight will do the trick, but of course, if GetRight actually checks the MIME -type of the file instead of using the files extension, then this will not solve the problem. Changing the mime-type is not only a complex process for novices, it will not solve the problem, because the Flash Player will not play the file if its MIME-type is not set to type mp3.

Tip #3: Stage.showMenu
It is all in the name, Stage.showMenu is a Boolean property of the Stage object that defines whether to display the menu or not, when the user right-clicks on your Flash movie.

A boolean value is either true or false, 0 or 1, on or off, the Stage.showMenu value can either be true or false:

true - Show the menu on right-click
false - Down show the menu on right-click

Please bear in mind, that this isn not the answer to all our prayers, when you turn the right-click menu off, the 'About Flash 6 Player' and 'Settings' options are still displayed, so no, you cant 'fully' remove the right-click menu. The actionscript:

//turn off the right-click menu
Stage.showMenu=false;

Tip #4: System.security.allowDomain
This undocumented method grants permission for the specified domain(s) to access objects and variables in the Flash movie that calls the allowDomain command. This property had to be implemented because of the changes made to the Security Sandbox in the Flash 6 Player...

I have two movies, 'a.swf' and 'b.swf', 'a.swf' is located on www.flashguru.co.uk server and 'b.swf' is located on www.macromedia.com server, for 'a.swf' to be able to access the contents of 'b.swf', 'b.swf' has to make a call to the allowDomain command as follows:

System.security.allowDomain("http://www.flashguru.co.uk");

The domain can be formatted in numerous ways, the same different formats that the loadVariables, loadVariablesNum, xml.load and loadvars.load methods accept: http://www.domain.com

http://domain.com
domain.com
http://IpAddress

You can pass multiple domains to the method as arguments. This method has been documented in the Macromedia Flash MX ActionScript Dictionary Errata (www.macromedia.com/support/flash/documentation/ flash_mx_errata/flash_mx_errata03.html).

Tip #5: Test Player - System Keys
By default, in the local test player(Control > Test Movie), if you try and press the enter key, to test some code that uses it, your code will not work because the player over-rides the key press as a keyboard shortcut to pause and play the movie, the same goes for the tab key and other important system keys, such as Ctrl, Shift etc... So if you want to test your tabIndexes in the test player, so you can use trace and the debugger, simply select Disable Keyboard Shortcuts from the Control menu (Control > Disable Keyboard Shortcuts) and your code will now recieve the key presses. Saves me a lot of faffing around! Think this is something else I was slow on, these little fine details just fly over my head.

About Guy Watson
Guy Watson (aka FlashGuru) has been a well-recognized figure in the Flash community for around four years, supporting the community with tutorials and source files, moderating the large Flash community forums, and running his own Flash resource Web site - FlashGuru's MX 101. Guy was one of the two developers that created the award-winning zoom interface for Relevare and now works for Endemol UK, the creative force behind reality television, producing programs such as Big Brother and The Salon. Guy now spends most of his time developing Flash games and applications for high-profile clients such as Channel 5 Television, Ladbrookes, and UK Style.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Enterprise Open Source Magazine Latest Stories . . .
Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP). The...
With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and st...
AMD said late Tuesday that its chief sales officer Emilio Ghilardi had left the company and that CEO and president Rory Read is going to do his job while a replacement is sought. AMD didn’t say why Ghilardi left but it’s assumed Read wants his own people. Read is relatively new to th...
During the lifespan of M3 (Monitis Monitor Manager) there has always been something lacking – timers. M3 execution procedure was outlined in this previous article. The execution mentioned in the latter was a one-time-execution, whereas server monitoring requires periodic invocati...
Red Hat is putting its bought-in Gluster scale-out NAS storage technology, acquired in October, on the Amazon cloud. It’s styled Red Hat Virtual Storage Appliance for Amazon Web Services and other clouds are supposed to follow in short order.
A new episode of the screencast series is now available at the OpenNebula YouTube Channel. This screencast demonstrates the new easily-customizable self-service portal for cloud consumers. Its aim is to offer a simplified access to shared infrastructure for non-IT end users. The scree...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE