Skip to main content
Known Participant
January 7, 2011
Question

Call Javascript Function Allow Domain

  • January 7, 2011
  • 1 reply
  • 1570 views

It took me a while, but I was finally able to get my flash file to call a javascript function on my webpage. I had to add this as2 code:

System.security.allowDomain("*");

This fixed my problem, but it causes a compiler error:

Scene 1, Layer 'Layer 1', Frame 1, Line 3    1119: Access of possibly undefined property security through a reference with static type Class.

How do I do allow my domain with as3? I tried Security.allowDomain('*') but that doesn't seem to fix my orginal problem.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 7, 2011

Security.allowDomain() is correct as3 syntax.  if that doesn't correct your problem, that's another issue.  there's no way System.security.allowDomain() will fix an as3 problem.

mattdwmAuthor
Known Participant
January 7, 2011

OK it's working now with as3 code. On the webpage I had to wait until the dom was ready before calling the as3 function from javascript. I guess the as2 code was just slowing it down enought to make it work.