Detecting Flash And Changing The HTML If No Flash Found?
May 9, 2011
I work for a company called Best of the Best (www.botb.com). We use Flash countdown clocks to mark the end of our competitions. The issue we now have is that our clients are using mobile platforms more and more and as bloody Apple wont support flash (not fully anyway) we need the option to detect whether our users have flash and if not then replace the current <OBJECT>Blah Blah Parameters etc</OBJECT> with <DIVCLASS="NON_FLASH_CONTAINER">All other bits in middle</DIV>Is this at all possible?
I was looking at the jquery.flash plugin and it looks like what I need to get the job done but how to do it. Here is some sample code from the plugin site $('.custom').flash(null, null, function(htmlOptions){ // do stuff });
Below is the code I tried using: <script type="text/javascript"> var strToAdd = 'my text to add' $(document).ready(function(){ $('#flashHere').flash(null, null, function (htmlOptions){ $(".hello").append(strToAdd) }); }); // END DOCUMENT READY </script> In the end what I would really like to do is replace one div with one other if flash is not found, this will make an iPhone friendly version of a site with a lot of flash video on it.
I need to write a script that detects if a person has flash installed and if they do then do something, if not do something else.
I can do this no problem with javascript - except for the detecting flash part. I have no idea how to have a js detect flash - or even if its possible.
can i know what is wrong with this script? cause my ie6 doesnt seem to be able to detect the flash and i dont know why.. or is there any other recommedation of site that i can read up from?
and by detecting flash, will it slow down the whole site?? i am a beginner in this area.
function message() { if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) { do something...... } else { do other stuff... }}
pls how do I detect if .swf movie is playing or has stopped? .swf is in a pop-up, I would like to trigger a window.close() once Flash movie has stopped playing..
Doing my own fitness bootcamp site and want to fancy up my front page. My front page loads a picture and I want it to load like flash. What could I do? I have all the Adobe Software, just don't know how to use it.
I need a simple javascript that I can use in my HOME page.index.html has a flash animationnoflash.html is a page without flash animationKindle does not support Flash and therefore i want to redirect my index.html to noflash.html page.
I'm trying to put some code together to create an image-swapping system, that when you click on the image it'll hide the image and replace it with a given iframe vimeo/youtube code...The swapping part works fine, however when the iframe loads up, it hides all other flash objects in the page, and I can't figure out why.Here's the JS
Code: function swapvideo(w,h,url) { document.getElementById('video_pholder').style.display='none';
I have a flash header on my website with 5 menu items (home, register, about us, etc)
myheader.swf?button=1 "Home" is focused myheader.swf?button=2 "register" is focused etc etc
When you click on a menu item it becomes the focused menu item (or "button") and the flash fires off a javascript event which handles the AJAX.Using the browser's back/forward buttons, the flash header's focused item does not change.
I can capture the history change, but how can I change the " .swf?button=x " using javascript.
PS: the flash header is a big file and I do not want to reload it every single time to update the var
I have created no flash pages and flash pages, but instead of creating a portal at the front of the site that leads you to a flash site and a no flash site id like to do it so the page detects flash or not, and redirects to whichever URL.
Is this possible, or do multiple browsers cause problems ?
I have created a transparent flash video (virtual spokesperson) for my website. For demoing purposes, I would like to have this appear on any desired website.
This is what I am trying to produce - here a virtual spokesperson appears on the [url]website: [url]
Have a look at other sites which enable one to type in a URL and their demo virtual spokesperson appears on the given site: [url] [url]
I believe they do this within an iframe to display the underlying website.
Im in between a project in which I have to make and Online Radio for various languages:cool: Im using Javascript and HTML/CSS and confused on how and where n which way to get a Radio Player on my the web page Also whn if I get a Player on page...How would I go about to Make it to Play a Particular Online Radio Im using Javascript and HTML(and im not tooo keen on using FLASH as im not aware of it!!!):(
This is what I'm trying to do. I'm trying to load a flash movie transparently over my existing html page (not covering the full screen, but 75% of it), so it is kind of similar to a "splash screen" in the respect it is to be an introductory screen.
I already have a flash movie made (although for some reason WMODE=TRANSPARENT isn't working), but we'll get to that in a sec. I also already have all the html for the playing the movie and displaying my page. The html to display the page is made up of a bunch of table rows within a <DIV> tag.
During onLoad of the <body> element, I call a javascript method to actually play the flash. The flash does play, but what happens is that instead of playing on top of the existing page, it plays at the top of the page and if you scroll down, there is the rest of the html page (the tables and stuff). I dont want it at the top, but to actually overlay the tables until it finishes playing, then to go away automatically.
I'm struggling with the html part of this. I know browsers render from top to bottom, but I dont know how to display over the existing stuff.
I toyed with the idea of making the flash into a popup in a new window (window.open), but to make it look right, I'd have to make it a transparent window, borderless, etc... and I'm not sure thats the right way to do it either.
I'm looking for websites that do Flash-like things but without using Flash, only with Javascript/ajax.
I'm not looking for a particular effect, I just want examples of sites that have the coolness and eye-catching factor that Flash can have - know what I mean?
I have a basic flash gallery that I embedded into my site (HTML & CSS). When viewed in Firefox everything is fine (840px by 427px), but when viewed in IE the gallery changes size & needs to be (887px by 440px) to be viewed correctly.
So, I put an Javascript If Then Else statement. Now it targets and changes in the IE browser (width='887' height='440') , but it also changes the Firefox one to 887x440 when it should stay the original 840x427.
I have the a hovering div, within that div i have settings that people can change, but for some reason there needs to be a smal flash animation with a continual sound clip. When a user clicks close the hovering div should be removed from the domtree thus removing the div and the flash movie.
In FF this works fine.
In IE it also works, in that the div is deleted, but for somereason the sound continues to play on the page. Even though the flash element doesnt exist. Have done a document.getElementById(flashmovie) to determine if its there.
I am removing the node from the tree using document.body.removeChild(hoveringdiv); where hoveringdiv is the element itself.
Now as you can imagine the continuous sound is an annoyance. How do i stop flash playing, and hence remove the sound, or how do i mute the flash. Is this possible in Javascript? I cant access the swf or actionscript.
Also if this isnt possible can someone point me to where i can learn about how IE handles sound within a webpage so i can see if there is some pointers in there.
I need a map that pop up pictures when the mouse is over a specific area. I was wondering if java would be the way to go if I wanted to do this without flash. If so should I use layers and just make them visible when the mouse is in a specific area? For multiple pics is it possible to store the images in an array and have them load on call? I'm still a student and learning so I'm not sure what limits javascripting has yet.
does anybody know how I am able to control Flash Movies from html or JavaScript? For example, I want a movie go to a specific frame each time I open the html file where it is embedded.
I am trying to display an iframe over a flash swf and this doesn't seem to work quite right.
I get the iframe content to disply over the flash, but in the place of the iframe's scrollbars, I see the color of the flash movie underneath. I am testing this in Firefox on Mac OSX with Flash MX. I tried setting "wmode" to "transparent" and that didn't fix it either.
I am guessing that even though the iframe is being displayed on top of the flash, for some reason the iframe's scrollbars are getting hidden behind the flash.
<!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=194,height=146,left = 440,top = 288');"); }
// End --> </script>
It opens a new window when the user clicks on a certain link.
Well, somewhere else in the page, I embeded a flash media object and found out now that everytime the page opens, the pop up window opens too which is NOT what I want. I want the Popup window to only open when the user clicks on a text link (which it did work perfectly until I put in the flash object).
So why is the flash object calling the popup window instead of just playing like it is supposed to?
What I am finding out is that is opens a new window, which is great, but it loops - now I converted the video in Flash MX, but it doesn't allow me to change the loop properties of the flash video, only the HTML properties. Is there a quick fix for this using this javascript?
I'm not too familiar with javascript and usually do most of my animation/linking with flash. However my client does not want flash because it can't be displayed on the iPhone. If you go here: [URL]. You will see a menu on the left that starts to scroll through the buttons while showing different images on the right. But if you hover over any button it stops on that image. The buttons are then linked to individual pages. I attempted to try and replicate this technique here: [URL]. However I am not sure how to write or modify my script so that it scrolls through the photos like my flash version does.