Flash links not working online
- Started
- Last post
- 11 Responses
- hitsuji
I've had this problem before and can't remember how i sorted it.
Basically I have a Flash file that loads a new movie ontop and that movie has links to a pdf and a website etc. It works fine in flash player, but it doesn't work in an internet browser.
Here's the swf... http://www.jwlees.co.uk/jwlees.s…
- Click on 'Our Pubs'
- Search for 'belmore' under pub name.
- Click on 'view details'
- and it's the 'WWW' and 'Click here for menu' buttons that don't work.Any suggestions?
P.S. I did not design this website. My predecessor did, so I know it sucks balls.
- vivid0
can't tell you anything without seeing the code...they just seem like dead links?!
- hitsuji0
ok they source from a mysql database. i'll show you the code for the 'click for menu' button.
on(release) { if(_root.menuURL.length>5) getURL('http://www.jwlees.co.uk...
and then there's more code in the actions layer...
_root.detailsWWW = _root.detailsWWW+"/";
_root.menuURL = _root.menuURL+".pdf";
if(_root.detailsWWW.length < 12) {hider1._x=388.6;hider1._y=301;} else hider1._x=1000;
if(_root.menuURL.length < 5) {hider0._alpha=100;/*hidera._alp... else {hider0._alpha=0;/*hidera._alpha...
if(_root.detailsAME.charAt(0... {hider5._x=619.9;hider5._y=292.1... hider5._x=1000;
if(_root.detailsAME.charAt(1... {hider2._x=447.2;hider2._y=299.3... hider2._x=1000;
if(_root.detailsAME.charAt(2... {hider4._x=561.4;hider4._y=295.7... hider4._x=1000;
if(_root.detailsAME.charAt(3... {hider3._x=505.0;hider3._y=297.9... hider3._x=1000;
stop();hider0 is the instance name of the button in question.
it works fine in flash player. but like you say they just seem like dead links in a web browser.
- hitsuji0
fuck sake. here's the code for the button again...
on(release) { if(_root.menuURL.length>5)
getURL('http://www.jwlees.co.uk...
- Autokern0
as2 or as3?
- hitsuji0
... /'+_root.menuURL,_blank);}
- Autokern0
use pastebin.com to share the code
- hitsuji0
code for button
http://pastebin.com/d78d00f5acode on actions layer
http://pastebin.com/d43e105ed
- hitsuji0
it works fine but for some reason not in a web browser. i'm sure it's just something small that needs changing but i can't think what!?
- shitehawke0
This part seems strange: +_root.menuURL,_blank
Think it should be +_root.menuURL,"_blank"
(with inverted commas around _blank)- yep, plus the pdf will be blocked with pop up blockers. best to use the fileReference classmaximillion_
- Autokern0
do a trace on the on (release) to see if the function get called
and try this:
on(release) {
if (_root.menuURL.length>5){
getURL('http://www.jwlees.co.uk...
}
}but this condition is strange: _root.menuURL.length>5
why it needs to be that way?
- shitehawke0
Also, it probably should be:
getURL ("http://www.jwlees.co.uk/", +_root.menuURL, "_blank")inverted commas around the url too. And try as autokern suggests, put a trace function in there to see if the release function is working properly and also try to trace the files that are being loaded/referenced and make sure they're in the correct folders. (so for the pdfs is not looking for them in the wrong folder)