Showing posts with label Flash. Show all posts
Showing posts with label Flash. Show all posts

Thursday, August 19, 2010

How to disable flash debugger Error Messages in FireFox

If you have the flash debugger installed or have Flash or Flex builder you will get annoying error messages from many of the websites that you visit today where developers have errors in their flash applications.

You can disable this by creating a file mm.cfg under your users settings folder

Windows Vista / Windows 7:
c:\users\\mm.cfg

Windows XP:
c:\Documents and Settings\

OS X:
/Library/Application Support/Macromedia

Enter this in this file and save it.

SuppressDebuggerExceptionDialogs=1

Restart Firefox and the errors will no longer show.
If you need to display the debugger error messages set the value to:

SuppressDebuggerExceptionDialogs=0

Tuesday, July 06, 2010

Debugging Flash Player Actionscript errors. How to get the amf response.




Just found out about a very useful tool that allows you to see the request and response for amf types when flash makes a request to the server. Fiddler does not show the actually data that comes back from the server. But there is this tool called AppPuncher that shows in details the amf response with the request arguments and the return data or any error information.

Monday, June 30, 2008

Flash unable to request swf files from another subdomain within the same web server.

Flash unable to request swf files from another sub-domain within the same web server.

I just experienced an issue with flash loading other swf files in the same web server but requesting from another sub-domain.
For example:
http://www.mywebsite.com/flash/shell.swf is requesting http://mywebsite.com/flash/game.swf

The crossdomain.xml is not issue. This is configured to allow * all access.
The website path is provided to shell.swf via a param. If I change the param to provide “http://www.mywebsite.com” it will work when the user is using www.mywebsite.com. This is very weir because everything is stored in the same location is just an issue with host headers.
I solved this issue my simply providing the current url host header to the shell.swf via the param.

So if the user is using “www” I will use www.mywebsite.com. If the user is using “origin.mywebsite.com”, then flash will use origin.mywebsite.com.
I am not sure 100% why flash is unable to request files from other sub-domains. But this was the quickest solution to this problem.

Friday, June 13, 2008

Bookmarking with Flash and Javascript

Bookmarking using Flash

To bookmark a page from a Flash call, flash needs to call an external JavaScript function in your page to actually do the bookmarking any browser.

But here is the trick....

In order for the bookmarking prompt window for example in IE to show up the focus needs to be outside the flash object. So you need to set a focus to a DOM element outside flash.

Here is an example script that works.
function bookMarkPage(url, title) {
// set focus to a DOM element, otherwise it won't work.
$('flash_container').focus();

switch(BrowserDetect.browser){
case "Firefox":
window.location.hash = url;//set the hash value
alert("Please press 'Ctrl + D' to bookmark this page.");
break;

case "Explorer":
window.external.AddFavorite(url, title);
break;

case "Safari":
alert("Please press 'Ctrl + D' to bookmark this page.");
break;

case "Opera":
// Create document element dynamic and invoke
var bookMark = document.createElement('a');
bookMark.setAttribute('rel','sidebar');
bookMark.setAttribute('href',url);
bookMark.setAttribute('title',title);
bookMark.click();
break;

default:
alert("Please bookmark this page manually.");
break;
}
}