Skip to main content
Participant
November 10, 2007
Answered

AS3 Button action

  • November 10, 2007
  • 4 replies
  • 369 views
I am producing a project for my employer and a button is giving me fits. It does work in all tested browsers/platforms, but the primary distribution will be via email and this is where the trouble appears. It is a simple button that should only open a URL in a browser window.

Here's the AS3 action I'm using on a button:

function gotoURL2(event:MouseEvent) {
var url = new URLRequest(' http://www.domain.com/');
navigateToURL(url, '_blank');
}

signup_btn.addEventListener(MouseEvent.CLICK, gotoURL2);

Is there anything that would prohibit this from working when viewed in an email client? Is it possible that a publishing setting is wrong? I've run this 100 different ways and I can't find it.

Thanks

This topic has been closed for replies.
Correct answer joeflashTO
Playing SWFs in an email inline is dicey. Not only does the client email application need to allow for inline viewing of Javascript content (to display the flash SWF), but the email client has to have the Flash 9 player installed for its inline viewing. Guarantee 99.99% of corporations won't allow this, if the email gets past their firewall at all, and most personal email clients don't have this capability. So chances are it's not that your code is wrong, it's just that an email client is not a fully-featured browser. In most cases you're going to have to stick with GIF and HTML content, which can be viewed only if the user allows for "rich email" HTML content to be viewed.

4 replies

Participating Frequently
November 13, 2007
Great link, thanks for sharing.
Participating Frequently
November 12, 2007
What I usually do, if I want to include a link in the email, or in the case of a Rich Email (HTML), an image which clicks through to the site with the SWF. Similar to how you see eGreetings and other greeting card companies sending emails with links having unique vars, which directs the user to specific content. Combined with flashvars, a link with a unique ID can point to user to very specific Flash content within a site, a game or a Flash greeting.
Participant
November 13, 2007
Related to this discussion...

http://www.campaignmonitor.com/blog/archives/2006/01/the_truth_about_flash_in_email.html

Their test result showed what I feared (and expected) that you are correct. I use Apple Mail and in their testing, it is the only client to display SWF.
joeflashTOCorrect answer
Participating Frequently
November 12, 2007
Playing SWFs in an email inline is dicey. Not only does the client email application need to allow for inline viewing of Javascript content (to display the flash SWF), but the email client has to have the Flash 9 player installed for its inline viewing. Guarantee 99.99% of corporations won't allow this, if the email gets past their firewall at all, and most personal email clients don't have this capability. So chances are it's not that your code is wrong, it's just that an email client is not a fully-featured browser. In most cases you're going to have to stick with GIF and HTML content, which can be viewed only if the user allows for "rich email" HTML content to be viewed.
Participant
November 12, 2007
That certainly makes a lot sense then. Time for a re-design.

Thanks for the help!
kglad
Community Expert
Community Expert
November 11, 2007
how is that going to work in an email? is there a flash player embedded in the email to play the swf?