PDA

View Full Version : [Q] Disable everything under the Flash???


CyanBlue
11-10-2004, 12:12 AM
Hey, guys... :)

Got a quick question for you...

I have an HTML page, say Yahoo.com, and I have a transparent Flash ad(big circlr for example) that loads on that HTML page...

What I want to do is to disable what's below the Flash ad... In other words, I want the people to see the HTML content through the transparent area in Flash, but I don't want people click on anything in the HTML page... That way I can force the user to click on the button on the Flash ad before they want to do anything in the HTML page... Know what I mean???

What I have tried... I have added a 1000 x 1000 box movieClip with its alpha set to 10 so that it will dim down the HTML content when you see it... But that does not work well when the HTML content is taller than 1000 pixel...

Is there any way we can somehow disable everything in the HTML page??? What's the best way to solve this problem???

Thank you very much... :)

petefs
11-10-2004, 12:53 AM
there are two ways, and one of them may be a huge pain in the butt ; )

1: (pain in the butt) have all interactive content fire a javascript event that checks a variable. i.e. <a href="blah.html" onClick='return flashOpen;'> and then have the flash ad set flashOpen to true when it closes.

2: (slightly less painful in the bottom) use Stage.onResize to scale the background to the size of the browser. It's buggy in firefox, from what I remember, but that's the other way to go.

1 is probably more sure-fire, but difficult to implement unless I'm missing something : )

CyanBlue
11-10-2004, 10:02 PM
Yeah... If it were to be done in Flash #2 is how it should be, but I was looking for more of an HTML side answer to that problem... :)

petefs
11-10-2004, 11:12 PM
hm, another option that I hadn't thought of at the time is to make a div layer that's z-ordered on top of the whole site, is 100% of the browser's width and height, and has an onClick='return false' -- that should negate the whole deal without having to add script to a ton of things. just set the div layer's visible style to false when the flash movie is gone : )

petefs
11-10-2004, 11:18 PM
this should work even better -- let me know if you have problems with any of the concepts (I know you hate JavaScript almost as much as I do : b)

https://lists.latech.edu/pipermail/javascript/2002-May/003524.html

CyanBlue
11-11-2004, 01:59 AM
Yeah... That's very interesting thread... The concept... I can feel over my melted brain... Implementation... I ain't going to do that... I am a Flash guy... I am going to ask the backend guy take care of it... :D

I just did the Flash piece some days ago, actually while I was down in New Orleans for the MAX 2004, and the company just finished everything and launched the test version today... I tested it over several browsers and it only worked on IE and Opera... Dang... :( Sometimes, I really hate the fact that I am only able to take care of the Flash only... :(

tg
11-11-2004, 02:02 PM
peterfs suggestion is once again brilliant cb, the css/zorder will work fine (at least in css enabled browsers -- i tested in ie 6+/ firefox).

dont even need to use any javascript... copy and paste the following into a new html doc, and try to click the link to as.org.


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body{
background-color: #fff;
};
#link{
position: absolute;
top: 10px;
left:10px;
zorder: 1;
border: thin dashed #ccc;
}
#cover{
position: absolute;
top: 5px;
left: 5px;
height: 200px;
zorder: 10;
border: thin solid #000;
/* background-color: #ccc; */
}
</style>
</head>
<body>
<div id="link">
<a href="http://www.actionscript.org">AS[ORG}</a>
</div>
<div id="cover">
you would place your <br />
flash content here.
</div>
</body>
</html>

petefs
11-11-2004, 02:13 PM
even simpler than I thought ^_^

as far as brilliant, I'm just happy I didn't talk out of my anal pore like I have been lately ;)

tg
11-11-2004, 02:19 PM
... my anal pore ...)


hehhehheh. thats hillarious!

tg
11-11-2004, 02:20 PM
but once again.... my solution only works in css enabled browsers..... so all you netscape 4.x+ users out there need to switch to firefox.... actually everyone should. hehheh.

petefs
11-11-2004, 02:25 PM
speaking of firefox (my preferred browser as well): have you seen the moox processor optimized builds of firefox 1.0 and thunderbird 0.9?


sorry, that was stupid.
http://www.moox.ws/tech/mozilla/

tg
11-11-2004, 03:29 PM
i had heard the name 'moox' around in different areas but had never followed up to find out what it was... thanks for the link thats informative. who knows i may even give it a try.... are you tried the moox releases? if so, are the speed differences substantial?

petefs
11-11-2004, 03:32 PM
it's hard to say since I don't have a particularly good way to benchmark, nor do I want to spend the time to set one up ; ) according to his benchmarks the improvement is pretty big.

I'd say that it's a noticeable difference, and not just what we call in the car world 'the butt dyno' ^_^ it can't hurt to try though, eh? : ) it certainly seems to have less system impact now

CyanBlue
11-11-2004, 07:55 PM
Sweet... Thanks, tg... :)

What pore, petefs??? :D
I build optimized builds of both the Firefox browser and the Thunderbird email client. My builds are designed for maximum stability and speed.
Not sure about the actual product, but I like how he's talking about it... :)

petefs
11-11-2004, 07:57 PM
they're workin great for me so far : ) I highly recommend giving it a go, if it messes anything up all you need to do is copy the old files back ^_^

CyanBlue
11-11-2004, 07:59 PM
Sounds good... I'll try it soon... :)

CyanBlue
11-12-2004, 02:34 PM
Okay... It worked all okay as long as I don't have Flash movie on top of Flash movie...

As you can see the left two boxes are underneath the gray Flash movie... (One blank and one GIF)
But the Flash ad stays on top of the gray box... How do we solve this??? :(

Check out the sample and see if you can give some help to the HTML illeterate... :(

Thanks... :)

PS> I see that it gets funny if I have an HTML form element beneath... But that's something that has to be addressed later... Fun IE!!! :D :(