;

PDA

Click to See Complete Forum and Search --> : How to make a clickable .swf ?


svil
11-29-2006, 09:17 AM
I have a problem. I donīt know how to make clickable .swf. I made a banner, everything works OK, but i can click on it a get to the requested page :( THX for help !!!

svil
11-29-2006, 09:18 AM
"canīt " of course :)

blanius
11-29-2006, 09:36 AM
Try adding this to the main timeline

var mouseListener = new Object();
mouseListener.onMouseUp = function() {
getURL("Test.html")//set to the url you want to go to.
};
Mouse.addListener(mouseListener);

svil
11-29-2006, 09:47 AM
Line 1: expecting a mouse event statement

svil
11-29-2006, 09:48 AM
i add it to the action script of button

blanius
11-29-2006, 09:58 AM
like I said add it to the main timeline this sets the entire movie to react to the mouseUp
NOT a button.

svil
11-29-2006, 10:16 AM
works, thanks - BUT - when i export it as SWF and HTML page it doesnīt work again :( But in Koolmoves goes ok...

swrzzzz
11-29-2006, 11:37 AM
A long shot...

How are you loading your swf into the html page?

Are you using the ACRunActiveContent javascript?

(I ask because if you havnt then an swf will not work unless you click once on them)

Also you can select to allow access to the network or local files in the export settings - try changing that

Steve

blanius
11-29-2006, 11:40 AM
Works here in browser, tested it just now in FF and IE.

swrzzzz
11-29-2006, 11:49 AM
I had a problem a while back trying to open links from an swf opened in a file:// rather than from a server.

Steve

svil
11-29-2006, 12:05 PM
I export it from menu in Koolmoves - on my local PC it doesnīt still work - i use IE

svil
11-29-2006, 12:13 PM
whole movie works on the internet www.yourdomain.com/test.swf - but exported HTMl from Koolmoves doesnīt work with it ...

blanius
11-29-2006, 12:45 PM
If you are trying this locally and using IE it's most likely a security setting in IE stopping you. Try putting the HTML on a server and trying it.

Stoke Laurie
11-29-2006, 05:20 PM
Make a rectangle the size you want clickable, the whole banner if you wish, take off the border, and reduce the colour content down to nill to give you a transparent box. Change box to a button, and use gotoUrl from there.

blanius
11-29-2006, 06:21 PM
http://www.bretlanius.com/flash/bannertest.html

code used here was simply
var mouseListener = new Object();

mouseListener.onMouseUp = function() {

getURL("works.html","_new")//set to the url you want to go to.

};

Mouse.addListener(mouseListener);

Stoke Laurie
11-29-2006, 06:30 PM
Thats good Brett, only thing is the curser does not change to indicate its clickable, but it would if you did it my way, no issue, plenty of ways to skin a cat - no offence pherbrick!

blanius
11-29-2006, 09:52 PM
Good point Stoke

pherbrick
12-06-2006, 06:01 PM
...plenty of ways to skin a cat....MEOWRRR!!!

Stoke Laurie
12-06-2006, 06:05 PM
Lol!

Makulaf
12-06-2006, 11:25 PM
I might be in left field here but do you have a popup blocker?

Stoke Laurie
12-07-2006, 08:25 AM
eh?