Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: RE: ULTIMATE LOADER>>>> |
From: | Keith Salisbury |
Date: | Thu, 15 Jun 2000 12:41:13 +0100 |
Those who know flash and javascript will like this i think
This is a wicked sollution for creating a percentage loader and i just want
to know if anyone has already tried this before, and/or if there any obvious
holes i have missed.....
<script>
<!--
// Determine whether browser is Internet Explorer
var IE = navigator.appName.indexOf("Microsoft") != -1;
// Set location of flash movie so javascript can talk to it
var Obj = IE ? index : document.embeds[0];
// Call the function to update variable called "loading" in the movie
blah();
// and heres the function
function blah(){
// Get the percentage loaded..
var value = Obj.PercentLoaded();
// Set the variable to the value..
Obj.SetVariable("loading", value);
// While the value is less than 100 call this function again every 1
milliseconds
if (value != "100"){
setTimeout("blah()",1)
}
}
//-->
</script>
What is cool about this is that it could be taken a step further and
bacially include the script inside a
GetURL actionscript command inside the flash movie itself, using something
like
javascript:var IE = navigator.appName.indexOf("Microsoft") != -1;var Obj =
IE ? index : document.embeds[0];blah();function blah(){var value =
Obj.PercentLoaded();Obj.SetVariable("loading", value);if (value !=
"100"){setTimeout("blah()",1)}}
Keith
--
Flash Developer
Global Beach Group
Tel: (44) 207 384 1188
Fax: (44) 207 384 8539
Email: keithglobalbeach [dot] com
Web: <http://www.globalbeach.com/>
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]