/    Sign up×
Community /Pin to ProfileBookmark

Function call not working from Flash in a frame in IE (but OK everywhere else)

I have a very simple script that works fine when called from a Flash movie, and works fine when called from a frame in a “cross-domain” frameset (i.e. one where the frameset is on a different server to the frame). If I combine the two, i.e. put the flash movie in a frame in a cross-domain frameset, it still works in Netscape (7). But nothing happens in IE (6). It appears the script is no longer being called.

The page is at [url]http://www.idiotech.dsl.pipex.com/index-jf.html[/url]

Clicking on the word “Flyer” in the speech bubble (both of which appear as soon as the movie has loaded) opens a pop up window. Clicking an invisible button at the very bottom left of the (main) page calls identical code and opens the same pop-up window.

If the page is visted via [url]http://www.idiotech.tk[/url] (which is a frameset that includes this page) in Netscape, both buttons still work.

However, if he page is visted via [url]http://www.idiotech.tk[/url] in IE, the Flash button no longer works.

If the frameset is on the same server as the frame, I do not get this problem. So is it some security issue to do with accessing content on another server? If so, is there a workaround? Or can anyone think of another reason why it’s not working in this specific scenario?

Additional information:
1) The Flash call is made using GetURL as opposed to FSCommand, as the latter didn’t seem to work at all.
2) The movie is created in Flash 4.

Thanks,

Robb

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@robbauthorMay 16.2004 — Seems someone else has had similar problems, but no solution...

http://www.webdeveloper.com/forum/showthread.php?s=&threadid=14410
Copy linkTweet thisAlerts:
@robbauthorMay 18.2004 — And someone else having a similar problem on another forum... http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=194&threadid=828332&loc=en_us

But still no idea on a solution. ?
Copy linkTweet thisAlerts:
@robbauthorMay 18.2004 — I've had the following response from Macromedia:

"[...] we have duplicated this issue and have logged it as an issue. This issue is currently being investigated by our Player Engineering team to determine if this is bug in either our Flash Player [...] or Internet Explorer."
Copy linkTweet thisAlerts:
@capt_dMay 23.2004 — First off, Very cool site

Maybe you can help me to get my Popup to even work in Flash

What I Want: When the site vistor clicks on a link within the site I need a popup to appear that gives a short description.

I figured out how to do this in Dreamweaver/Fireworks but need some help in Flash

Here is the site: http://rolag.com the link I'm referring to appears on the left hand side of the page in the yellow bar "Royal Rangers"

When you click on it you can see it doesn't work! (The page I'm calling rangers.htm is on the server)


Here is code I've used

I've had a few problems getting the page to open here is the code for the Flash Html page and the link info

Flash HTML:

<script language="javascript" type="text/javascript">

function popup(width, height, filename)

{

var left = (screen.width - width) / 2;

var top = (screen.height - height) / 2;

var attributes = "left=" + left +

", top=" + top +

", width=" + width +

", height=" + height + ", ";

attributes += "toolbar=0, location=0, directories=0, ";

attributes += "status=0, menubar=0, scrollbars=0, ";

attributes += "resizable=0";

window.open(rangers.htm, "appwindow", attributes);

}

</script>

Link Info:

on (release) {

("javascript:popup('200' , '200' , 'rangers.htm')");

}

Hope this helps

Hope you can help

Capt D
Copy linkTweet thisAlerts:
@robbauthorMay 23.2004 — [i]Originally posted by capt d [/i]

Link Info:

on (release) {

("jav&#97;script:popup('200' , '200' , 'rangers.htm')");

}

Hope this helps
[/QUOTE]
Is that really your code? It seems to be missing something, e.g. a GetURL or FSCommand (depending on which works best for you). Unless you can leave that out in the version of Flash you're using (I'm stuck on v4).

Anyway, your Flash movie seems to be trying to call:

&#104;ttp://rolag.com/(%22j&#97;vascript:popup('200'%20,%20'200'%20,%20'http://www.rolag.com/rangers.htm')%22);?FUIComponentClass=%5Btype+Function%5D&FPushButtonClass=%5Btype+Function%5D

So it certainly looks like there's something wrong with the calling code in your Flash movie - which ought to be something like:

On (Release)

Get URL ("j&#97;vascript:popup('200','200','rangers.htm')")

End On

But I do mean [b]something like[/b] this, and not necessarily exactly this, as I haven't tried it out.
Copy linkTweet thisAlerts:
@capt_dMay 24.2004 — Still trying but no luck, I posted this same issue on the Macromedia forum as well so hopefully between this one and Macromedias I can figure out what I'm doing wrong.

Thanks for the tip, it's aprreciated

Be Blessed

Capt D
Copy linkTweet thisAlerts:
@capt_dMay 24.2004 — I figured it out

After alot of reading, searching the forums, and drinking enough coffee to be legally caffinated this is what I came up with

General Info: Windows XP Pro, Flash MX, Dreamweaver 2004

I used a premade button from the Flash UI Libary and assigned these values to it

Instance Name: launch_btn

Label: Your_button_Name

Click Handler:launch

I placed the button on the stage where I wanted it, clicked on the stage to deslect the button and entered this code in the Action pane panel using expert mode

function launch() {

url = "http://www.yoursite.com/yourpage.htm";

windowName = "myWindow";

settings = "toolbar=no,location=no,staus=no,menubar=no,scrollbars=no,resize=no,resizeable=no,width=400,height=270";

getURL("javascript:openWindow('"+url+"','"+windowName+"','"+settings+"')");

}

Make sure that each line of code is on its own separate line (I didn't Duh)In other words for newbies like myself make sure that settings and getURL are on separate lines and are one line of code a piece,,, even though they appear on several lines here.

I then saved and published my HTML and SWF files and opened the HTML file in Dreamweaver

Where I placed this code between the <HEAD></HEAD> tags

<script language="JavaScript">

<!--

function openWindow(url, windowName, settings)

{

window.open(url,windowName,settings);

}

// -->

</script>

You may know how to do this already but since I posted a question and people on this forum as well as Macromedia's Forum tried to help. I figured I would post the solution that worked for me when I found it.

Be Blessed

Capt. D
×

Success!

Help @robb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...