开发者

Help With Cross Domain Flash Variables

开发者 https://www.devze.com 2023-01-24 11:36 出处:网络
I have two flash movies fl_base and fl_top. fl_base contains ActionScript that pulls a string variable from a server and parses it out to determine the navigation menu of a site (the headers, subheade

I have two flash movies fl_base and fl_top. fl_base contains ActionScript that pulls a string variable from a server and parses it out to determine the navigation menu of a site (the headers, subheaders, and the links to where each of those navigation items should point, as illustrated below).

Menu 1
--Sub Menu 1.1
--Sub Menu 1.2
Menu 2
-- Sub Menu 2.1
-- Sub Menu 2.2

fl_base determines the order of the menus and submenus as well as the links

fl_top contains the graphical assets of the navigation (buttons, backgrou开发者_如何转开发nd, etc), and draws the actual UI.

I'm running into an issue where the links (the getURL) will not work if the aforementioned string variable is pulled from a different domain. So, if fl_base and fl_top reside in example.com and the variable is pulled from test.example.com, then fl_top, while displaying the UI (menus, buttons, colors) will not allow the user to click on the link. I should note that the getURL is located in the fl_top movie.

We have a crossdomain.xml that allows cross-domain access between flash movies.

Can anyone enlighten me why this isn't working and if there is a solution, short of re-writing the flash movies (which has been decided is a no-go by the higher-ups)

UPDATE

I should also mention that I am using SWFObject 2.2 to load fl_base and that fl_top is called via loadMovie from fl_base


You need to set allowScriptAccess when embedding to let a swf from another domain do getURL(), these are the actionscript 3 docs, but I think that applies to actionscript 2 aswell.

0

精彩评论

暂无评论...
验证码 换一张
取 消