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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

too many clicks to get URL

Status
Not open for further replies.

scrawny

Technical User
Apr 15, 2003
23
0
0
US
I have a scrolling msg which links to a page in our site. For some reason, it's taking two clicks to get into the link, rather than one link (for most people, not all). My client hates this! Can't figure out why this is happening. Can anyone help?
I have an object action on the text. Nothing complicated.
 
I take that you're talking about a news ticker..
From the nature of this inconsistent bug, I imagine it's simply that, due to the link being in motion, user's are just mis-clicking by accident.
If this is the case, you can either:
a) place a hidden button over the link with a larger hit state.. or, (if it's a real btn) increase the size of the current hit state
alternatively:
b) alter the code for ticker so that it pauses the scroll on rollover.

a combination of these two is obviously also a safe bet

Not too sure if this is what you're after but without seeing the FLA or SWF, it's the best I can come up with.
Try it out and if not, post back with a link.

Hope this helps
 
What browser are you using?.. something other than IE by any chance?
I think your problem isn't scrolling hit areas.. now that i've looked at your file I think I can safely say that your client is describing the active content update as the problem..

Unfortunately, due to some legal mumbo at MS, the user now has to enable active content by a keystroke or by phyically clicking the movie.. i.e. when you load a flash movie in internet explorer, and you mouse-over, a box and tooltip appear around the edge asking you to either click or hit enter/space to enable the movie.
This would result in you having to click twice to get to the link.
No biggie though.. many ways to get around it now but this is probably the best:

Let me know if this doesn't fix

Hope this helps
 
If you use javascript to write the object after the page loads using the ONLOAD event of the body tag, you won't need the first click to activate the object. (Does that make sense?)

Here's how I went about it:

The following code is an external .js file, this is very important for the work-around.

Code:
function drawMovie(sName){
	var browser=navigator.appName;
	var strResult;
	
	if(browser.indexOf("Microsoft") >= 0){
		strResult = '<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="350" HEIGHT="350"  codebase="[URL unfurl="true"]http://www.apple.com/qtactivex/qtplugin.cab"[/URL] id="QTMovie">';
		strResult = strResult + '<PARAM name="SRC" VALUE="panoramic/' + sName + '">';
		strResult = strResult + '<PARAM name="AUTOPLAY" VALUE="true">';
		strResult = strResult + '<PARAM name="CONTROLLER" VALUE="true">';
		strResult = strResult + '</object>';
	}
	else{
		strResult = '<EMBED id="QTMovie" SRC="panoramic/' + sName + '" WIDTH="350" HEIGHT="350" AUTOPLAY="true" CONTROLLER="true" PLUGINSPAGE="[URL unfurl="true"]http://www.apple.com/quicktime/download/">';[/URL]
		strResult = strResult + '</EMBED>';
	}
	
	return strResult;
}

function selectMovie(sName){
	document.getElementById('MOV').innerHTML = drawMovie(sName);
}

Then in my HTML, I just call the function that writes the object to the document.

Code:
<script src="js/createMovie.js" lang="javascript"></script>
{...}
<a href="javascript:selectMovie('sample.mov');">Sample</a>

In other words, I construct the HTML for the embedded object in javascript and then write it to the document on an event (ONLOAD in your case).

Thank you to M$ for this irritation.


gtg.jpg

GTG
 
Thank you. This is going to work.
Really appreciate your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top