PDA

View Full Version : strange getURL problem


lukemack
05-05-2004, 09:43 AM
hi,

i have a button within a movie clip which just has a hit zone. it is positioned over some text to open up a browser window using getURL. I am using flash MX 2004 on winXP. this works under the following conditions:

- the swf file is uploaded to the root htdocs folder of a remote web server (LINUX)
- the swf file is loaded using a LOCAL apache server (windows XP)

but does not work if

- the swf is uploaded to a subfolder on the remote web server. i just click the button and nothing happens (but the mouse pointer changes as it should)

strangely, the button works even from the subfolder on the webserver from other internet connections and it works if i use something like the cloak - http://www.the-cloak.com/login.html

this has got me stumped. i can click links on http://www.lukem.co.uk
with no problem but if i click links on http://sitedesign.lukem.co.uk (see the php link in the server-side scripting section), nothing happens. chances are this will work for you, but not for me.

does anyone have any idea what might be causing this? it only seems to happen on my machine and only when accessing a subfolder on the server. i have tried changing file permissions to 777 but this didnt make any difference.

thanks,

luke.

FrozenMedia
05-05-2004, 12:57 PM
It works in Mozilla but not in Internet Explorer, can you paste your getURL line and any javascript it might call?

Rich

FrozenMedia
05-05-2004, 01:07 PM
Also take a look at http://www.macromedia.com/support/flash/ts/documents/allow_script_access.htm As you "allowScriptAccess" tag seems to have a strange parameter.

Rich

lukemack
05-05-2004, 01:14 PM
thanks for your reply. here is the getURL:

getURL("javascript:window.open('http://www.php.net'); void(0);");

lukemack
05-05-2004, 01:31 PM
i also tried setting the allowscriptaccess parameter to always but this didnt make any difference.

FrozenMedia
05-05-2004, 01:44 PM
Ok that getURL looks fine, what does the void() function do and have you tried without?

It may also be worth trying another method, write your page opener script in javascript with a function name such as "openPage" and use the getURL just to pass the prarameter:

var page = "http://www.google.com";
getURL("javascript:openPage(" + page + ");");

Rich

lukemack
05-05-2004, 01:49 PM
hi,

the void function stops an additional window appearing with [object] in it. i can try the other method but i just dont see why the code works on one site and not on another in the same browser!

thanks,

luke.

FrozenMedia
05-05-2004, 02:12 PM
Yeah you're right it's certainly a crazy one! I'm assuming the [Object] appearing in the additional window is something specific to your site as I've never had that appear when using getURL :p

Good luck with your other method...

Rich

lukemack
05-05-2004, 02:23 PM
hi,

thanks for your replies - much appreciated. i have noticed that it works when you go to www.lukem.co.uk/sitedesign and not sitedesign.lukem.co.uk so i'm assuming it is something weird with the web server.

i think the [object] thing happens when you just use it from an HTML page like the launch page for lukem.co.uk. or at least it does for me!

thanks agan for your help.

luke.

lukemack
05-20-2004, 08:20 AM
this is resolved.