I making a game in ab=nimate and I have an svg character that can be colour customized. It works fine when I run the code from edge animate(ctrl enter) but Not on when I just open html file
i'm getting this error:
Uncaught SecurityError: Failed to execute 'getSVGDocument' on 'HTMLEmbedElement': Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match.
and the click in the interactive svg part is not recognised..
Has anyone got anidea how to fix it? I do not think it is my code as it works no problem when preview in browser from animate. BTW, I am using chrome browser locally.
any help appreciated.
This is a Chrome security error because of its same origin policy regarding local files.
If you run it from a server(like when you review from animate) you will not face this error.
I am not sure if there is a way around this.
Check out this thread,see if any of the solutions provided suits you http://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy
Thank you very much for that. I checked it on web and it works no problem.