Go Back   kirupaForum > Development > Client-Side (HTML, CSS, JavaScript)

Reply
 
Thread Tools Display Modes
Old 10-21-2009, 04:43 AM   #1
heiseman
Registered User
body onFocus=functionname, not working on IE

Hi, I am creating a Flash website. Inside the main swf file is a movie clip with an instance name of 'fadeanimation'. I'd like for this movie clip to play when the window comes into focus. The window loses it's focus when the site launches a pop up window (yes I'm using popups). The user may choose to leave the popup window open when returning back to the main site so I don't want to attach the script specifically to the action of closing the popup window. I'd like for the script to instead be attached to the main website window coming back into focus.

Here is a trimmed down version of the html code I'm using:

<html>
<head>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>

<script language="JavaScript">
function getFlashMovieObject(movieName)
{
if (window.document[movieName])
{
return window.document[movieName];
}
if (navigator.appName.indexOf("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds[movieName])
return document.embeds[movieName];
}
else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
{
return document.getElementById(movieName);
}
}

function myFadeBack()
{
var flashMovie=getFlashMovieObject("FlashID");
flashMovie.TPlay("_level0.fadeanimation");
}

</script>
</head>

<body onFocus=myFadeBack();>
</body>
</html>

-----

As you can see, I'm using onFocus to achieve this effect and it works perfectly in Safari and Firefox but not Internet Explorer. What I'd like to know is what I need to do to get this working across all 3 browsers. Have I done anything wrong with the code above? Should I be doing this some other way?

Here is a link of the site i action (not working in IE)
http://www.lukeheise.com/test5/

and here are the source files:
http://www.lukeheise.com/test5/flash_files.zip

Help would be appreciated!

Thanks.
heiseman is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 10-21-2009, 04:59 AM   #2
willett_work
Steven Willett
Location Hampshire, United Kingdom

Posts 6
Animation

I can not help with your issue sorry, but i just wanted to comment about the fantastic Animation work being displayed.

Well worth a look.
willett_work is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 -4. The time now is 11:19 AM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com