Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hittest and geturl

Status
Not open for further replies.

paola13

Technical User
Oct 22, 2001
36
IT
Could i use hittest and geturl together in a mc?
I'm trying this code:

onClipEvent (enterFrame) {
if (_root.mc1.hitTest(_root.mc2)) {
getURL(index.htm);

}
}

But it doesn't work.

Another way I tried is to put the code in the main frame in the main timeline:
if (_root.player.hitTest(_root.m)) {
getURL(index.htm);
}
But nothing appends!
Help please
 
Code:
onClipEvent(enterFrame) {
	if (_root.mc.hitTest("/mc2")) {
		getURL("[URL unfurl="true"]http://www.something.com");[/URL]
	}
}
 
Both of these work for me. Can you post your fla? frozenpeas
 
It's ok... i fix the file.
But now I have another question!
My swf (1.swf) stays inside an html page (1.htm). I need to get the focus on it just when i open the page. For this i use a js inside the 1.htm head page:

function fuoco(){
var IE = navigator.appName.indexOf("Microsoft") != -1;
var filmato = IE ? window.filmato : window.document.filmato;
filmato.focus();
}
//-->
</script>
This function gives the focus on the 1.swf. When i open from this swf a new window (a pop-up with inside 2.htm), i reset the focus on the last one, using this code in the 2.htm page:
<body onLoad=&quot;self.focus()&quot;>

Now, if I pass to the old page (1.htm) just clickking on the blu-IE-bar of 1.htm, the focus given by the function fuoco(){ is lost! I need to click on the swf file to get once again it!
How can i pass the focus between two or more pages with a js? Why my function fuoco() works just once?
 
thanks! I'm so sorry, i posted in the wrong session!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top