Solved

Actual Loader

Posted on 2000-04-30
1
166 Views
Last Modified: 2010-04-03
How to make an actual preloader showing real time loading?
0
Comment
Question by:synapsegroup
1 Comment
 
LVL 7

Accepted Solution

by:
ssdesign earned 100 total points
ID: 2763352
Put this script in the tag between </title> and <head>

<script language="JavaScript">
<!--

function loading()
{
 InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
 path = InternetExplorer ? parent.loader : parent.document.loader;
 
 frame = path.PercentLoaded();
 path.TGotoFrame("_flash0",frame);
}


//-->
</script>

Then before the <object> tag add this

<SCRIPT LANGUAGE=JavaScript>
<!--

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function loader_DoFSCommand(command, args)
 
 {
  if (command == "loader")
      {loading();}    
 }
 
 
// Hook for Internet Explorer
if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 9")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
      document.write('<SCRIPT LANGUAGE=VBScript\> \n');
      document.write('on error resume next \n');
      document.write('Sub loader_FSCommand(ByVal command, ByVal args)\n');
      document.write('  call loader_DoFSCommand(command, args)\n');
      document.write('end sub\n');
      document.write('</SCRIPT\> \n');
}
//-->
</SCRIPT>
then make relevant changes to the object tag as below:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0"
 id="loader" width=100% height=100%>
<param name=movie      value="loader.swf">
<param name=quality    value="high">
<param name=bgcolor    value="#FFFFFF">
<embed src="loader.swf"
 name=loader
 swliveconnect="true"
 loop="false"
 quality="high"
 scale="exactfit"  
 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed></object>

Then in the flash movie create the loader scene and add 100 rames. In the first key frame add stop action and in the last add the action to go to and play your movie.

Now create a movie clip in frame1 and inside it in the first frame add this action

FS Command ("loader", "")


test it and see it in action
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now