Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-05-2007, 01:11 AM   #1
kracko
Will Flash for Cash
 
kracko's Avatar
 
Join Date: Jul 2005
Posts: 99
Default flash, html hrefs, z-level, wmode and more...

I have a test version of my page here

caveat: I have not, as yet, done anything with the embed code in the html, to have it work effectively in anything other than firefox. (It looks funky in IE)

I have designed a flash menubar with drop down menus. It appears above the rest of the html on the page.

I have used wmode (as I now know is a no no, after reading some feedback on this forum), to overlay the drop down menus on top of my html.

I have used a css and div tags to position various html elements around the page. (this probably has no bearing on my issue).

My main issue is that html a ref's that apppear under the flash div are not active. (see the brown headings in the body text area)

My question is: Since the menubar code is working and looking the way I want it to, what is the path of least resistance to getting this right?

I'm not really sure where to start in solving this issue.

Any advice would be appreciated.

Last edited by kracko; 08-05-2007 at 01:13 AM. Reason: add more info...
kracko is offline   Reply With Quote
Old 08-05-2007, 02:00 AM   #2
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Yeah... Read about a somewhat complicated workaround on that recently, biut can't find the link right now... If I did bookmark it!

If I recall correctly, it had to do with resizing the division that holds the Flash movie, so that the Flash embedded object doesn't cover up the underlying links...

The division would be limited to the vertical size of the menu's main items... When you roll over it, it expands to allow the drop down, and retracts when you roll off...

Last edited by atomic; 08-05-2007 at 02:03 AM.
atomic is offline   Reply With Quote
Old 08-05-2007, 02:12 AM   #3
kracko
Will Flash for Cash
 
kracko's Avatar
 
Join Date: Jul 2005
Posts: 99
Default

If anyone has the particulars related to a solution I would love to hear more. The div tag in my test version is currently set to a height of 35px (same as menu, minus drop down space). I don't think changing this will make any difference.

The flash component is 200px in height to accommodate the drop downs. Since the embed tag sets the flash component height to also be 200px, it displays beyond the boundary of the div tag.

Last edited by kracko; 08-05-2007 at 02:18 AM.
kracko is offline   Reply With Quote
Old 08-05-2007, 02:36 AM   #4
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Ok, I had bookmarked it...

Check posts #18 & #21 of this thread...

http://www.actionscript.org/forums/s...d.php3?t=60193

And this example...

http://www.uovo.dk/incubator/transparentFlash.html

But seeing your last post just now... Maybe this won't work...
atomic is offline   Reply With Quote
Old 08-06-2007, 02:45 AM   #5
kracko
Will Flash for Cash
 
kracko's Avatar
 
Join Date: Jul 2005
Posts: 99
Default A little closer

I have used the example I found in the link supplied by atomic to resolve most of the issues I was dealing with. (Thank You)

Here is the latest sample.

However, now I have discovered that the javascript technique of resizing the embeded flash window is failing in IE.

The following code is paraphrased from my HTML file:
Code:
<script language="JavaScript1.1">
function setFlashWidth(divid, newW){

document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
document.getElementById(divid).style.height = newH+"px";  
}
function setFlashSize(divid, newW, newH){

setFlashWidth(divid, newW);
setFlashHeight(divid, newH);
}

</script>
<style type="text/css">
<!--

#flashResizer {
	position:absolute;
	margin:97px auto;
	width: 750px;
	height:36px;
	z-index:9;
}

</style>....

...<div style="width: 750px; height: 35px;" id="flashResizer">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="resizeFlash" align="top" height="100%" width="100%">
<param name="allowScriptAccess" value="sameDomain">
<param name="movie" value="resizeFlash.swf"><param name="quality" value="high"><param name="salign" value="lt"><param name="wmode" value="transparent"><param name="bgcolor" value="#ffffff"><embed src="transparentFlash_files/resizeFlash.swf" quality="high" salign="lt" wmode="transparent" bgcolor="#ffffff" name="resizeFlash" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="top" height="100%" width="100%">
</object>
</div>
In flash I call the resizer function whenever I want to reveal/hide the space needed to display the drop down windows.

See here:
Code:
getURL("javascript:setFlashSize(\'flashResizer\',750,200)");
It works fine in Firefox and Safari, but fails in IE. (Oh joy)

Where should I start to create a functional IE version of this approach?

I will outline (in this thread) the entire solution when I have it all together.

Last edited by kracko; 08-06-2007 at 02:49 AM.
kracko is offline   Reply With Quote
Old 08-06-2007, 02:55 AM   #6
kracko
Will Flash for Cash
 
kracko's Avatar
 
Join Date: Jul 2005
Posts: 99
Default I just realized

This may have to do with the method I am using to embed the flash file.

I am getting the (infamous) message to press the space bar or press enter to activate the control. I'll test again after correcting this.


Code:
<div style="width: 750px; height: 35px;"  id="flashResizer">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
<p align="left"><font face="_sans" size="10" color="#010101" letterSpacing="0.000000" kerning="0">EMBEDDED FONTS &amp; LINKED SYMBOLS</font></p><p align="left"><font face="_sans" size="10" color="#010101" letterSpacing="0.000000" kerning="0">this must be placed on stage before calling loadData()</font></p>
-->
<script language="JavaScript" type="text/javascript">
<!-- 
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) {  // if we've detected an acceptable version
    var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
	+ 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" '
    + 'id="resizeFlash" align="top" height="100%" width="100%" '
    + '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="hcmenu.swf">'
	+ '<param name="quality" value="high"><param name="salign" value="lt">'
	+ '<param name="wmode" value="transparent"><param name="bgcolor" value="#ffffff">'
    + '<embed src="hcmenu.swf" quality="high" salign="lt" wmode="transparent" bgcolor="#ffffff" '
    + 'name="hcmenu" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" '
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer" align="top" height="100%" width="100%">'
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);   // embed the flash movie
  } else {  // flash is too old or we can't detect the plugin
    ...
  }
// -->
</script>
kracko is offline   Reply With Quote
Old 08-06-2007, 06:27 AM   #7
kracko
Will Flash for Cash
 
kracko's Avatar
 
Join Date: Jul 2005
Posts: 99
Default Ok, I'm kinda frustrated

I used SWFobject which has worked fine for me in the past, but I think it may have interfered with the resize function.

I include the swfobject code along with my functions like so...
Code:
<script type="text/javascript" src="swfobject.js">
<!-- resize functions -->
function setFlashWidth(divid, newW){
document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
document.getElementById(divid).style.height = newH+"px";  
}
function setFlashSize(divid, newW, newH){
setFlashWidth(divid, newW);
setFlashHeight(divid, newH);
}
</script>
I then add my div and set the swfobject prams in script below the div tag like so....

Code:
	<div style="width: 750px; height: 35px;"  id="flashResizer">
		Bypass link
	</div>
	<script type="text/javascript">
	   var so = new SWFObject("hcmenu.swf", "resizeFlash", "750", "200", "7", "#ffffff");
	   so.addParam("wmode", "transparent");
	   so.addParam("allowScriptAccess", "sameDomain");
	   so.useExpressInstall('expressinstall.swf');
	   so.write("flashResizer");
	</script>
I am calling the resize function from my swf like so....

Code:
getURL("javascript:setFlashSize(\'flashResizer\',750,200)");
But the function is failing

See my test file here

The previous version minus swfobject that is working fine in firefox is here

It seems I am almost there, if I can resolve this last issue, any help would be appreciated.
kracko is offline   Reply With Quote
Old 08-06-2007, 02:16 PM   #8
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

I know how frustrating IE can be... And I don't think I can help you more than I already did...
But a few suggestions still...

On the IE link above, I do get a javascript error warning on the page as soon as I roll over the drop menu... I've also noticed that the menu will drop down if you mouse in from the bottom of the movie, not only if you mouse over from the top, indicating that the division is already expanded from the start...

I'd certainely get your .html down to it's simplest (removing all detection & install scripts), even removing your flashResizer bit, to see if I still get that javascript error... If not, then I'd gradually add back the Resizer, to maybe pinpoint what is in fact causing the problem...

Best I can do... Sorry!
atomic is offline   Reply With Quote
Old 08-06-2007, 03:35 PM   #9
kracko
Will Flash for Cash
 
kracko's Avatar
 
Join Date: Jul 2005
Posts: 99
Default

I have already determined that the IE issue is fixed (minus resizer).

The problem is that the resizer function is not firing properly when called from flash. It is actually the failure of the resizer function that is causing the error in IE.

Without the resizer function, all is well as far as IE is concerned.

If you look at it in firefox, you can also tell that the resizer function is not working there either. The first few links in the body text (the brown headings over the paragraphs) are not behaving as links because the flash window is covering them.

I suspect that I have to address the so object (part of the swfobject code), when I am attempting to resize the window, but not sure.
kracko is offline   Reply With Quote
Old 08-06-2007, 04:31 PM   #10
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Can you provide your menu's .fla?
atomic is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:28 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.