Html/Flash Hybrid Website: rollover issues in Firefox 3 - html

I am currently developing a PHP website that has a lot of Flash components. On each page there are one or more custom Flash components embedded with swfObject, as well as sIFR navigation.
Every so often, ALL of the Flash objects on the page become unresponsive to the mouse (no hand pointer). So far I have found it happening only in Firefox 3.5.3 on Mac. I am using CSS to position everything with a specific stacking order to get around the bounding-box overlap issue - for example, the main navigation overlaps the top right corner of a big Flash component.
It works fine most of the time, however, if I click through the pages enough times in Firefox 3 on Mac, eventually I cannot "roll over" any of the Flash elements.
Does anyone know why all the Flash objects in a PHP page would stop responding to the mouse, sIFR included?
Here is the site if you want to give it a try.

This is usually a combination of putting wmode (transparent or opaque) on the Flash movie, which itself is contained in a floated element. Unfortunately it's a browser bug, but removing the wmode property should fix it.

Related

Firefox Mac preventing video with overlay from playing

Unfortunately YouTube only counts views to videos when you click directly on the YouTube player itself. This is to prevent fraudulently high view counts. One technique if you don't want to show the YouTube player initially is to put an opaque overlay and graphic over the top with pointer-events: none. When the user clicks on your overlay they will actually be clicking on the YouTube video so the view is counted. You then capture the 'playing' event and hide the overlay exposing the player underneath.
I have a graphic on my homepage and when you click it plays a YouTube video. Before anyone cries 'clickjacking' I'm not trying to trick anyone - there's a play button in the graphic so you know it's a video.
This works completely fine for me for everything except FireFox on Mac OS. I am using the latest version - currently 34.0.5 in my tests.
Demo page : http://www.googledrive.com/host/0B3INRRYhLi7cVHNKTzhMdnRjT3M
If you run this in Chrome / FireFox Windows / Recent IE version and click on the green overlay the video will play and you will hear music.
Note: Of course in my real page I capture the isplaying event and hide the overlay.
Firefox is obviously doing some kind of clickjacking protection. If it thinks that you're trying to trick the user with an overlay over the video then it won't play it. However it is really bizarre to me that it doesn't also do this on Windows.
There are two ways to allow the video to play on Mac FireFox - both involve partially revealing the Youtube video underneath:
If you click 'Change opacity to 75%' it will show the video through underneath. If you then click it then it will play just fine.
If you click 'Make overlay smaller' it will make the overlay not completely cover the video. Clicking on it will then play just fine.
The most bizarre thing of all - when you view it in an iframe it works just fine (this is why I'm using a GoogleDrive link above that opens fullscreen) and not something like codepen/jsfiddle http://codepen.io/anon/pen/GgrZNN
I'm really looking for a workaround that doesn't involve if (firefox && mac). If this is documented somewhere in mozilla docs I haven't found it.
PS. Obviously browsers without pointer-events have to be treated differently with an on-click event. That is not shown in this example.
(I'm using Browserstack.com to test, but it does the same on a real mac.)
I get the same issue Firefox Mac (and have yet to upgrade to Yosemite), but it seems to me you have pretty much already solved your own problem. The simplest solution that I can see would be to add an extra overlay layer beneath your current one and set them both to opacity 0.98 (which seems to be the highest you can go and still have the click work — at least in my tests).
Obviously it will depend on what you hope to show on your overlay, but for my tests locally I set the under-overlay (sorry, ridiculous name) to black. This meant that the video underneath was imperceptible. You could probably even go a little lower with the opacity and still block everything out with two layers, just in case the opacity thresholds for the click blocking are different across versions of Firefox.
.x-overlay {
opacity: 0.98;
...
}
.x-under-overlay {
opacity: 0.98;
position: absolute;
background: rgba(0, 0, 0, 1);
width: 100%;
height: 100%;
overflow: hidden;
pointer-events: none;
}
NOTE: One downside to be aware of when using even slight opacity. For certain browsers (or at least versions of browsers) text that appears in a layer that has opacity can end up with buggy or missing anti-aliasing. But this mainly occurred in much older versions of Firefox and Chrome.
update
Ok this was driving me a bit round the wall, or up the bend, or which ever strange phrase that can be used to describe the experience of continually expecting one thing, but consistently getting another... which has eerie similarities to the definition of crazy.
Why on [insert home planet here] did this work for Codepen, but not in my own localhost-served iframe...??
After attempting a number of different things I spotted the sandbox attribute, which I really should have noticed before; especially considering all the strange trickery it can enable and disable with native browser processes. A quick trial and a few errorings later, and it seems what allows this to work for most of those online-code-fiddlers is the following:
<iframe src="index.html" sandbox="allow-scripts allow-same-origin"></iframe>
Still haven't found out exactly why, but if I enable the above on my localhost frame it starts working without the need for the opacity trick. I guess it must cause Firefox to route through a different process, or perhaps it just disables some kind of cross-origin clickjacking protection.
A very odd state of affairs... this is the kind of oddity I would expect from Chrome! Not good ol' Firefox.

TurnJS and browser zooming

I've recently stumbled upon the TurnJS plugin to create a page turning effect. I'm working on a project right now with it to recreate a Flash flipbook that was built in the past. One of the stipulations is that it has to be shrunk or magnified to fill the browser window without scrolling. I've been experimenting with my own simple JS utilizing browser transform properties to scale the container. The scaling is working however the flip book effects don't work very well once everything has been scaled (shaky page transitions and the page corners don't work very well).
I've also been experimenting with without much luck either.
I've also implemented a chart on the second page using Flot and have also noticed that when zoomed, the mouse over are not aligned correctly. It's similar to what's happening with the page corners.
The original flash version: http://www.return-it.ca/ar2010/index.html
Without zooming: http://dev.bitpowered.ca/encorp/
Have I gone about this the wrong way? Is there an alternative to getthing this all to work, or am I SOL on this one? Thanks in advance.

Mouse Wheel Problem on Mac when opening my Website

I built a website, and the designer who drew the design of the page has Mac computer. He says that Mouse wheel scrolling doesn't work, only the browsers left "slider" works. I mean when you are with your mouse in center of the screen and you do the mouse wheel scroll, the page doesn't move, and if you drag Browsers scroll - it moves.
The thing is that I've been only using PC so I've got no idea - why that can happen with a website on Mac. It works fine in 5 browsers (IE, Opera, FF, Chrome and Safari on PC), and mouse scroll has problem in any browser on Mac.
Can anyone share with your ideas why could that happen and maybe how to fix it. I have 0% experience with Mac, I don't even know what to do after turn on/off button :)
P.S. i tagged PHP, CSS and HTML because the website is developed using those languages and Flash player & slider.
www.ninogvetadze.com/new
Before you go ahead and deem it a code problem, I'd have your mac user clean his scroll wheel out with either a.) an alcohol wipe or b.) a piece of paper. Rub the mouse ball with the wipe, or apply pressure to it with the paper and roll it back and forth to git any dirt out. I'm willing to bet it is a hardware issue rather than code.
If it is a newer mouse without the scroll ball, then... well, I lost the bet.
only the browsers left "slider" works
If it's on the left, it ain't the browser's standard scroll bar.
mouse scroll has problem in any browser on Mac.
Because all those browsers are using the same Flash player plugin.
the website is developed using those languages and Flash player & slider.
Yep. There you go - the Flash "slider" obviously wasn't tested on a Mac. Now you know why designers with a clue rely on standard-based approaches instead of Flash.
(Edit) Yep - just used the address in your comment above to look at your site. There's a "macmousewheelflash.js" being loaded, which apparently has something to do with adding mouse wheel support to the Flash movie at the top. Looks like that's interfering with proper wheel support for the rest of the page. You could probably just remove that - I don't see where the Flash movie needs to scroll anyway. Or, for that matter, why you need Flash for a simple cross-fade slide show...

Flash size expands in IE8

I received a flash file from the design agency to incorporate on our template (Java/JSP based framework). I specified the width in the javascript flash player we have as those specified by the agency and 963x488, but in IE8 it seems the flash occupies more space than that and even though the flash content area remains small, the overall area occupied by flash is larger than the specified size. I tried the simple <object>/<embed> tags and it exhibits same behavior. Any idea if I can do something on the JSP or is it something that needs to be taken care of during creation of .swf file? I am running the latest plugin for flash and Firefox and Chrome do not have this issue.
You're saying that Flash's container is too big, right? That is, the area within which you can right-click and see a Flash context menu? If so, then your issue has nothing to do with the SWF content, plugin version, or Flash itself. The size of Flash's container is wholly determined by the HTML/CSS/JS of the embedding page, and browser behavior (like zooming, etc). So I think you'll need to post some details about the embedding code involved. You might also check against IE8 on other machines, in case there is a settings issue similar to what Alexandre commented about, though possibly involving different settings.
(The only exception, where the Flash content could be a factor, is if the Flash content is invoking a JS bridge to execute javascript calls to change the size of its own container. But even then it's still JS/HTML that has the say over container size.)

Overflow hidden and Flash content in IE 8

I'm building a Flash banner ad to be displayed on a client's site. When the user hovers over the ad, the Flash movie expands by increasing the height and width of the flash object.
The problem is that the client is using overflow:hidden all over their site, and my banner ad is contained within a div that is styled with overflow:hidden.
When the flash movie expands it gets clipped. This only happens in IE 8, all other browsers (at least IE 7 and FF) do not clip the flash movie. I tried explicitly using wmode=window but that doesn't seem to do anything. Maybe IE 8 is being standards compliant and doing the right thing here, but I just need this to work!
Any ideas on how to get the flash content to expand out of the div without changing the styles (not sure what would happen if I changed the overflow:hidden style on the client's site).
Thanks!
To isolate the banner's style from the rest of the site, you might try putting it in an iframe with a 0px border. The trick is that then the iframe has to big enough to accommodate the expanding flash object.
You cannot do it without changing the style. The way banner ads work is that they use Flash and JavaScript to trigger the change in styles. So you would have two styles, one of the collapse and another for the expanded states, Flash would make the call to the JavaScript and it would change the style.
when the flash object was wider than the DIV and DIV is overflow:hidden to limit the flash object to the sidebar
may embedded flash object still overflowed into the next DIV.
the issue is related to the embedded object and that wmode=”transparent” parameter needs to be included.
<embed
src="your-swf-url-here"
width="xx"
height="xx"
wmode="transparent"
/>