Preloader script
I am new to scripting, so this is probably a pretty easy fix.
I have the
following code for my preloader:
onClipEvent (load) {
total = _parent.getBytesTotal();
onClipEvent (enterFrame) {
loaded = _parent.getBytesLoaded();
percent = int(loaded/total*100);
perc1 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_parent.gotoAndPlay(2);
As of now, the clip loads fine in another swf, but I want
the clip to start
playing before is has fully been loaded so that it cuts down
on the time the
viewer has to wait, say at 75% loaded, or 65% for example.
How would I change
the above code?
Also, how would I change it to reflect in the percentage as
well, for example,
if it starts playing when it is really 65% loaded, how would
the code change to
show that it is fully loaded, in the percentage and the full
loading bar, even
though it really isn't...
Does that make sense? Thanks for the help.
what the 431,405 in your script?
Similar Messages
-
Logical Arrangement of Preloader Script
Hi,
I have created one swf which does following two things;
1. Once it gets loaded in HTML on server it will pass Flashvar to HTML. if flash var from swf and HTML both will match then only swf should play.
2. It will also have Preloader
independently both the scripts work perfectly. But when i compile both in one file then it dosent work in following cases;
Case 1- preloader script first and then flashvar:= this preloads file perfectly but dosent pass flashvar
Case 2- flashvar first and then Preloader:= this works perfectly when i test my file Locally but once i upload it to server then it dosent work for Preloader
what should be my logical sequence or options in this?
I am using "Event.ENTER_FRAME" for Preloder and "Event.COMPLETE" for flashvar...is there any mistake?
//////////////PRELOADER//////////////////
stop();
this.addEventListener(Event.ENTER_FRAME, myMovieLoading);
function myMovieLoading(e:Event):void {
var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;
preloader_mc.bar_mc.scaleX = loaded/total;
loadInfoText.text = Math.floor((loaded/total)*100)+ "%";
if (total == loaded) {
play();
this.removeEventListener(Event.ENTER_FRAME, myMovieLoading);
////////////INITIALISING MOVIE///////////////
var keyLoader:URLLoader = new URLLoader();
keyLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
keyLoader.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
keyLoader.addEventListener(Event.COMPLETE, loading);
keyLoader.load(new URLRequest("C:/keytext.txt"));
function onLoadError(evt:IOErrorEvent):void
loadmyHTML();
var myFlashVar:String;
var ver:String;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
for (ver in paramObj)
myFlashVar = String(paramObj[ver]);
function loading(event:Event):void
if (keyLoader.data.passKey == "pass1")
else if (myFlashVar=="pass1")
else
stop();
parent.removeChild(this);
function loadmyHTML():void
if (myFlashVar!="pass1")
stop();
parent.removeChild(this);in your loaded code there is
keyLoader.load(new URLRequest("C:/keytext.txt"));
please see this will not be found on the server thus it may have problem in loading it on serveer while it run local machine. please try replacing the keytext.txt file path to a relative path which can also be found on the server.
hope this would help you, -
External preloader script problem
hi, i'm try to create an external preloader, i've made three layers (the script, one for a funky design of my logo and keep things simple i've also embedded the preloader text in this layer and finally the preloader bar beneath. i've created two frames for each layer, the script has two keyframes, the other layers only have a keyframe first then a standard frame. i can't get it work though, please help. here's the script i'm using on the second keyframe.
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("Empty_movieclip",1);
loader.loadClip("Creative-Outrage.swf",Empty_movieclip);
var preload:Object = new Object();
loader.addListener(preload);
preload.onLoadProgress = function (target, loadedBytes, totalBytes){
if (_root.getBytesTotal() != _root.getBytesLoaded()){
gotoAndPlay(1);
else (loadMovie("Creative-Outrage.swf",Empty_movieclip));
removeMovieClip("Preloader_movieclip");
Bar_movieclip._xscale=(_root.getBytesLoaded()/_root.getBytesTotal())*100;
Preloader_movieclip.Loader_text.text=Math.round((_root.getBytesLoaded()/_root.getBytesTota l())*100)+"% Complete";try:
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("Empty_movieclip",1);
// move the next line to the end of your code
loader.loadClip("Creative-Outrage.swf",Empty_movieclip);
var preload:Object = new Object();
loader.addListener(preload);
// the next two lines should be in preload.onLoadProgress
//Preloader_movieclip.Bar_movieclip._xscale=(loadedBytes/totalBytes)*100;
//Preloader_movieclip.Loader_text=Math.round((loadedBytes/totalBytes)*100)+"% Complete";
preload.onLoadProgress = function (target,loadedBytes,totalBytes){
if (loadedBytes = totalBytes){
// (loadMovie("Creative-Outrage.swf",Empty_movieclip)); <-- comment out or remove this line
removeMovieClip("Preloader_movieclip");
else {
gotoAndPlay(1);
it's still not displaying any gradual progress, it just displays the full progress bar immediately even when i simulate a download and it's not loading the external file either. -
Preload script - Ignore if already cached?
Hi all,
I'm considering using the Script below (altered to fit my
design) to preload the images prior to a site loading...but what I
would like some help doing is altering the script so that it can
skip the preload if the images its tasked to preload are already in
the viewers cache... What do I need to add to do this?
http://www.dynamicdrive.com/dynamicindex4/preloadimage.htm
Cheers!Why? Are you wanting to 'preload' all the images on the site
before opening
the home page? I don't think that is a good idea.
Preloading is not magic - it makes a 500K page act like a
500K page, you
know?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"nhavfx" <[email protected]> wrote in
message
news:e2aq4s$o80$[email protected]..
> Hi all,
>
> I'm considering using this (altered to fit my design) to
preload the
> images
> prior to the site loading...but what I would like some
help doing is
> altering
> the script so that it can skip the preload if the images
its tasked to
> preload
> are already in the viewers cache... What do I need to
add to do this?
>
> Cheers!
>
>
http://www.dynamicdrive.com/dynamicindex4/preloadimage.htm
> -
Help on internal preloader script
Good day guys,
Anyone could help me on this code.
stop();
this.addEventListener(Event.ENTER_FRAME, onPreloading);
function onPreloading(e:Event):void{
var total:Number = stage.loaderInfo.bytesTotal;
var loaded:Number = stage.loaderInfo.bytesLoaded;
var percent: Number = loaded / total;
preloaderMC.loaderMC.scaleX = percent;
preloaderMC.percentText.text = Math.ceil(percent * 100).toString() + "%";
trace(percent);
if (total == loaded){
play();
this.removeEventListener(Event.ENTER_FRAME, onPreloading);
I got this code above preloading the main fla with a movieclip that is the preloader it resides on frame 1 both the preloaderMC and the code above.
The problem goes when I simulate download which would show the preloader runnning but the text with the percent sign animates from 1% - 7% - 11% and back to 0%
It did'nt animate from 1 - 100%.
Any help is greatly appreciated.That's it embedding fonts.
But as far as I can remember I did it already but when I copy all objects to another .fla file. I should repeat the embed font.
I should click the correct answer button here.
Thanks you Sir -
Hi;
Please advise on this error:
Scene 1, Layer 'PreLoader', Frame 1, Line 1
1087: Syntax Error: extra characters found after end of program
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
if (percent == undefined) percent = 0;
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per;
if (percent>99) {
_parent.gotoAndStop(2);
TIA,
benothat's as2 and in as2 that code would have to be attached to a movieclip, not a timeline.
in as3, no code can be attached to an object. as3 does have an enterframe event.
attached to your main timeline:
this.addEventListener(Event.ENTER_FRAME,f);
var percent:Number=0
function f(e:Event){
var loading:uint = loaderInfo.bytesLoaded;
var total:uint = loaderInfo.bytesTotal;
percent -= (percent-((loading/total)*100))*.25;
loadBar.width = percent;
if (percent>99) {
gotoAndStop(2); -
Slow page loading. know any good preloading scripts?
Go to:
http://southpacific.com/kevin.html
it takes forever for the page to load. Any know of any
scripts that can speed this up or tips to make things run
smoother?have a look
Here.
Mostly, you probably need to load your content in externally, and
not have all your assets in the FLA to begin with. There is no such
script that will speed up loading. -
Flash CS4/AS3 - How to use a preloader with FLVs?
Somehow I've had a really hard time finding a straightforward forum answer or tutorial for this--maybe someone can help?
I have an SWF file that references/loads an external FLV file (www.44designs.com/promo_video.php), but since the FLV file is about 9MB and can take time to load on a slower connection, I think a preloader (something simple like "LOADING...100%") would be a good idea as the FLV loads.
Anyone have a simple way to do this?? I've had no success in finding what I need--just scripts for loading SWFs. You can see an example of this on www.44designs.com where a preloader script I've got seems to be referencing the SWF (thus loading almost immediately) instead of the much larger external FLV. Make sense? I'm not super AS3 savvy, but I can follow logic and cut and pasteGreat info, thanks for the post!
-
Preloader in Document Class Help.
Hello,
I want to know that how can I add a Preloader to my existing document class. In my FLA all content is on 1st Frame. I'm loading an external image to a MovieClip which is on 1st frame and on stage. My document class is working fine but when i try to add any preloading script, its not working...
Can any one please help me in this regard..
A Garden of Thanks.
My Document Class is here... (This was also a tutorial which I'm using..)
package com.ahmad.bg
//import all classes
import caurina.transitions.Tweener;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageDisplayState;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
public class MainClass extends MovieClip
//create variables
private var loader:Loader;
private static const IMAGE_PATH:String = "bgs/bg.jpg";
public function MainClass() {
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, stageResize);
//load external image
loader = new Loader();
loader.load(new URLRequest(IMAGE_PATH));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, showImage);
pic.addChild(loader);
private function showImage(e:Event):void
try {
e.target.content.alpha = 0;
Tweener.addTween(e.target.content, { alpha:1, time:1, transition:"easeOutSine" } );
e.target.content.smoothing = true;
} catch (e:Error) { };
stageResize();
private function stageResize(e:Event=null):void
pic.x = 0;
pic.y = 0;
pic.scaleX = pic.scaleY = 1;
if ((stage.stageHeight / stage.stageWidth) < pic.height / pic.width) {
pic.width = stage.stageWidth;
pic.scaleY = pic.scaleX;
} else {
pic.height = stage.stageHeight;
pic.scaleX = pic.scaleY;
pic.x = stage.stageWidth / 2 - pic.width / 2;
pic.y = stage.stageHeight / 2 - pic.height / 2;
//my bottom navigation
bottomNav.x = Math.floor(stage.stageWidth / 2 - bottomNav.width / 2);
bottomNav.y = Math.floor(stage.stageHeight - bottomNav.height - 0);package com.ahmad.bg
//import all classes
import caurina.transitions.Tweener;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageDisplayState;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.events.ProgressEvent;
public class MainClass extends MovieClip
//create variables
private var loader:Loader;
private static const IMAGE_PATH:String = "bgs/bg.jpg";
public function MainClass() {
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, stageResize);
//load external image
loader = new Loader();
loader.load(new URLRequest(IMAGE_PATH));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, showImage);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preload_image, false, 0, true);
private function preload_image(event:ProgressEvent):void
var per = int((event.bytesLoaded / event.bytesTotal) * 100);
pic.addChild(loader);
//make a textfield or preloader animation and assign this per to it.
private function showImage(e:Event):void
try {
e.target.content.alpha = 0;
Tweener.addTween(e.target.content, { alpha:1, time:1, transition:"easeOutSine" } );
e.target.content.smoothing = true;
} catch (e:Error) { };
stageResize();
private function stageResize(e:Event=null):void
pic.x = 0;
pic.y = 0;
pic.scaleX = pic.scaleY = 1;
if ((stage.stageHeight / stage.stageWidth) < pic.height / pic.width) {
pic.width = stage.stageWidth;
pic.scaleY = pic.scaleX;
} else {
pic.height = stage.stageHeight;
pic.scaleX = pic.scaleY;
pic.x = stage.stageWidth / 2 - pic.width / 2;
pic.y = stage.stageHeight / 2 - pic.height / 2;
//my bottom navigation
bottomNav.x = Math.floor(stage.stageWidth / 2 - bottomNav.width / 2);
bottomNav.y = Math.floor(stage.stageHeight - bottomNav.height - 0);
Oh.. Thanks.. its working now... Thanks aloooooooooooooot.....
Any other tip if you have a time to give me will be a greatful to you...
Thanks again for your precious time.. I've seen your Awesome Portfolio at your website.... -
Preloader AS2 wont work in FL CS3?!
this is strange and i can only think it's me who's missing
something.
i have a preloader script i used with Flash 8 but when i try
to attach it in the movie i made in FL CS3 it doesn't work (the new
movie is in AS2).
can anyone tell what i'm doing wrong??
Here's the codeit's WindowsXP x64 bug again!! I tried the same code on
another computer running XP (x32) and all looks as it should, i try
the same .fla at x64 and script won't work.
should i post this somewhere else??? -
Hi there,
I will first admit that I use director mostly for moving
sprites and playing sounds, but when it comes to the script, I
suck. I am good at other types of scripting, and I have the general
idea of how to get the formula of a script to fuction, but I can
never get it going 100%. I am in desperate need of a preload
script, I know It's a hassle to see these n00b requests all the
time, but if someone could look at my script and tell me where I am
going wrong, it would be a big help. I only need this script to
work then I can apply it to all my work. Thanks in advance! :)
Movie has 1900 frames.
Here is my script, in frame 1:
on exitFrame
preLoad 0, 1900
if preLoad(0, 1900) = true then
go to "a"
end if
end
It accepts the script, but when it runs it comes back with:
Script Error: Function not defined
if preLoad(0, 1900) = true then
All i want to do is have this preload set up in frame 1, to
load the total frames, then advance to frame 2 (with the marker "a"
is) where a "play" button is on the stage.
Regards,
TMK.Total-MK wrote:
> I just asumed this was the most lingo-basic way of
making a "loading"
> type preloader to load my full movie.
That isn't usually necessary as Director is usually good at
loading assets
as needed, and it isn't usually desirable to potentially fill
up the RAM on
the user's computer - indeed, unloading members when they're
finished with
can be very helpful.
If you're doing a Shockwave movie, google for "lingo
preloader". In
particular, the articles at lingoworkshop.com are useful.
Then in the google
results page click on "Groups" up near the top and have a
browser through
what's been written before in this ng.
HTH
Andrew -
CF scripts not consistently listing contents of folder
Hello.
I upload multiple types of files to the server. Sometimes
they are folders, word docs, ppts, pdfs or xls files. There is a
script that runs that is supposed to list everything that I have
uploaded into a directory. The problem is, it does not work
consistently. Sometimes it will display all files, subdirectories,
files within, sometimes it will say that nothing is there. I am not
sure why it will work with some files/folders, and won't with
others. Some folders work great, some don't. It may be a
permissions problem, I'm not sure...
Here's an example - I have a folder and a word document in
the "root" files directory. When viewing in the browser, it
displays "No Files Found". Then if I move a ppt back a directory -
to the root, all 3 items (word doc, folder and ppt) will then show
in the browser. For some reason the ppt triggers everything to
suddenly show. This "magical" ppt does not work for every directory
though. Some items just won't show no matter what.
Here's a sample script that lists the contents of the
directory:
<cfinclude template="../usercheck.cfm">
<cfparam name="URL.module" default="">
<cfparam name="URL.file" default="">
<cfparam name="URL.action" default="">
<HTML>
<HEAD>
<TITLE>Title</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
<link href="../links.css" rel="stylesheet"
type="text/css">
<!-- End Preload Script -->
<style type="text/css">
<!--
.style3 {color: #FFFFFF; font-weight: bold; }
.style6 {font-size: 10px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0
MARGINWIDTH=0 MARGINHEIGHT=0 ONLOAD="preloadImages();">
<a href="/index.html"><img src="/Images/graphic.gif"
width="169" height="84" border="0"></a>
<br>
<cfset pathn =
"#getDirectoryFromPath(cgi.PATH_TRANSLATED)#files">
<CFIF (URL.file IS NOT '')>
<CFDIRECTORY ACTION="LIST"
DIRECTORY="#pathn##urldecode(url.module)#"
NAME="FileCheck"
FILTER="#URL.file#">
<cfif URL.action eq "Delete">
<CFIF FileCheck.RecordCount GT 0>
<cffile file="#pathn##urldecode(url.module)##URL.file#"
action="delete">
<cflocation
url="module.cfm?module=#URLEncodedFormat(url.module)#">
</CFIF>
<cfelse>
<CFIF FileCheck.RecordCount GT 0>
<!--- <cfhttp
method="Get"
url="#getdirectoryfrompath(pathn)##URL.file#"
path="#pathn#"
file="#URL.file#"> --->
<CFHEADER
NAME="content-disposition"
VALUE="attachment; filename=#URL.file#">
<CFCONTENT type="application/unknown"
file="#pathn##URLdecode(url.module)##URL.file#"
DeleteFile="No"></CFCONTENT>
</CFIF>
</cfif>
<cfelse>
<CFDIRECTORY ACTION="LIST"
DIRECTORY="#pathn##urldecode(url.module)#"
NAME="dirlist">
<table width="487" border="0" align="center">
<tr bgcolor="#004B8D">
<td width="479" height="36"><span
class="style3"> Physician Modules
</span></td>
<td></td>
</tr>
<cfif #dirlist.recordcount# gt 2>
<CFOUTPUT QUERY="dirlist">
<CFIF type IS 'File'>
<tr bordercolor="##D5EBFF" bgcolor="##D5EBFF">
<td width="479" bordercolor="##D5EBFF" bgcolor="##F4FAFF"
class="links">
<span class="style6"><a
href="#cgi.SCRIPT_NAME#?module=#URLEncodedFormat(url.module)#&file=#name#"> #left(name,le n(name)-4)#</a></span>
</td>
<td width="50" bgcolor="##FFFFFF">
<cfswitch expression="#right(name,3)#">
<cfcase value="xls">
<cfset imagesrc="/Images/excel.gif">
</cfcase>
<cfcase value="pdf">
<cfset imagesrc="/Images/pdf.gif">
</cfcase>
<cfcase value="doc">
<cfset imagesrc="/Images/word.gif">
</cfcase>
<cfcase value="ppt">
<cfset imagesrc="/Images/powerpoint.gif">
</cfcase>
<cfdefaultcase>
<cfset imagesrc="/Images/unknown.gif">
</cfdefaultcase>
</cfswitch>
<div align="center"><img src="#imagesrc#" width="31"
height="27"></div>
</td>
</tr>
<cfelseif type eq 'Dir'>
<cfif ((name neq "." ) AND (name neq "..")) >
<cfset tempname = #url.module# & "" & #name#>
<tr bordercolor="##D5EBFF" bgcolor="##D5EBFF">
<td bordercolor="##D5EBFF" bgcolor="##F4FAFF"
class="links"><a
href="#CGI.SCRIPT_NAME#?module=#URLEncodedformat(tempname)#">#name#</a></td>
<td bgcolor="##FFFFFF"
class="links">Directory</td>
</tr>
</cfif>
</cfif>
</cfoutput>
<cfelse><!--- <cfif #dirlist.recordcount# lt
2> --->
<tr bordercolor="#D5EBFF" bgcolor="#D5EBFF">
<td bordercolor="#D5EBFF" bgcolor="#F4FAFF"
class="links">
<span class="style6">No Files
Found</a></span></td>
<td bgcolor="#FFFFFF"> </td>
</tr>
</cfif>
</table>
</cfif>
<table width="100%" border="0" cellpadding="0"
cellspacing="0" class="links">
<tr>
<td height="50" align="center" valign="middle"
class="links">
<cfinclude template="../navmenu.cfm">
</td>
</tr>
</table>
</BODY>
</HTML>
Thanks for your help.You are not able to do this with CF directly. It would be a function of the web server.
You could move all documents other than .cfm into a folder outside of the web root, then use tags such as cfcontent to deliver those files programatically (as often happens when you download software off of a website now days). However I suspect this isn't what you are looking for. Just in case here is a quick example of how you may do the force download of document from outside root: http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/force-file-download-27 -
Hi
I have my preloader which seems to be working correctly, however it only becomes visible as around 80%.
So the page is blank up until then, then after that the loading bar is finishing and then goes to the rest of the site
Any ideas on this pls.
Any good AS2 preloader code if anyone knows a good preloading script
thanksnothing is displayed in a flash file until all the frame 1 assets are loaded. in particular, everything exported for actionscript in frame 1 (in as2 that would include embedded fonts and objects with a linkage id) will load before a preloader is displayed. if you have a lot of exported assets (especially sounds), that will cause the problem you're seeing.
to remedy, either create an external preloader (that loads your main swf) or set your exported assets to load in some frame other than 1. doing the former is easier for novices while doing the latter is usually easier for experienced flash users. -
I'm really new at this.
I'm getting 4 errors in my preloader script.
Ive created a bar with bytes loaded and bytes total and a
percentage.
No text comes up in the dynamic fields and the bar does not
progress.
But when I test the movie with "simulate download" it seems
that some preloading happens but I don't think its working at all
really.
1120: Access of undefined property loaderinfo.
var toLoad:Number = loaderinfo.bytesTotal;
1120: Access of undefined property loaderinfo.
var loaded:Number = loaderinfo.bytesLoaded;
1067: Implicit coercion of a value of type Class to an
unrelated type String.
addEventListener(Event,ENTER_FRAME,loaderF);
1120: Access of undefined property ENTER_FRAME.
addEventListener(Event,ENTER_FRAME,loaderF);
Below is Entire script - on frame 1 of my timeline - the
timeline is a total of 390 frames:
stop();
addEventListener(Event,ENTER_FRAME,loaderF);
function loaderF(e:Event):void{
var toLoad:Number = loaderinfo.bytesTotal;
var loaded:Number = loaderinfo.bytesLoaded;
var total:Number = loaded/toLoad;
if(loaded == toLoad){
removeEventListener(Event.ENTER_FRAME,loaderF);
gotoAndStop(390);
} else {
preloader_mc.preloaderFill_mc.scaleX = total;
preloader_mc.percent_txt.text = Math.floor(total*100) + "%";
preloader_mc.ofBytes_txt.text = loaded + "bytes";
preloader_mc.totalBytes_txt.text = toLoad + "bytes";
any ideas?If you substitute "Event,ENTER_FRAME" with
"Event.ENTER_FRAME" and "loaderinfo" with "loaderInfo", it will be
a giant step forward ;-) -
Preloader and moviecliploader class
Hello
Firstly thanks to kglad for some advice yesterday. More needed
I am using FlashMX 2004 Professional.
I have been having problems with my preloader which i have placed as a movieclip at the start of the pertinent scenes where it is needed. The problem has been one of file size in frame one - a common problem I beieve. This causes the preloader script to malfunction and come in late and show just 100% loaded of the preloader animation - again a common problem I am reading. SO it seems clear having designed the whole website using LoadMovie Number that the movieClipLoaderClass would be the solution to getting my Preloader to work. Hmm..
So can people tell me that if I now create a seperate scene for the preloader and have it listen for any downloading swf to activate using the moviecliploader class will this work ok in tandem with how I have connected all the other scenes using the loadmovienumber? Just need to now before I start trying that out. My hope is that the Preloader will then overcome the file size issue of the first frame because and it will not have to load itself every time afresh.
Hope this makes sense, I am fairly inexperienced here...
Cheers
PeteI know everything about the file, I know that the sound starts on the first frame and also I know it ends on the last frame. If the sound data are on the main timeline, the sound could be streamed and you don't have to load it fully to start playback. The question is the same, how much I need to load to start the sound.
I think it's not very clear why I need this. Imagine:
- you need to play the external SWF file
- you start to load it via the MovieClipLoader class
- onLoadInit you stop the movie and wait for the load
- check, if you can run the movie - based on bytes and/or frames you can determine, you preloaded enough, so the movie won't be stopped and you don't have to load more to continue
- but, when you run the movie, the animation starts, just the sound doesn't, because more of it needs to be loaded.
- then after short time the sound start to play and since it's streamed and on the timeline, it's sync with the animation
So, in this scenario a few seconds of the sound are skipped / missing in playback. Of course, it could happen that the sound runs fine, because the SWF content could be different. I can't say 20% of the file size is audio and the rest is the animation.
I wanted fully flash solution, but it seems I'll have to find it in combination with Java, because it seems there is no way to distinguish between audio and other data in the Flash movie in AS.
Anyway, thank you for your help.
Maybe you are looking for
-
How we can see the abap memory data
How we can see the abap-memory data fine the code below import lsind report_title table_name report_field change_display show_hide conversion_exits table_description form_program
-
Clearing FI Document Without posting
Hi, My requirement is to clear a OPEN AR FI document, but this should not post another FI doc. I am trying it with F-04, but as it's a standard transaction so it's posting another FI Document. Can anyone suggest some process to archive the required o
-
제품 : ORACLE SERVER 작성날짜 : 2003-08-26 SHARED POOL에 대한 점검 사항들 ====================== PURPOSE 다음은 shared pool에 관련된 performance 에 대한 점검 사항들이다. Explanation 1. literal SQL Statements SELECT substr(sql_text,1,40) "SQL", count(*) , sum(executions) "TotE
-
Deferred Syntax Error : ADF Business Rules
Hi all, I am working on business rule implementation in my project . I have created a dictionary (.rule) file and added oracle rules and oracle rule editor component libraries to the project . The page fragement contains the rulesdc component which r
-
Enocore CS5 error when trying to burn to blue ray disc
My project consists of 4 AVCHD clips imported separately into Encore as timelines and then I deleted the timelines to keep just these assets. I built a new timeline and added these three clips to this timeline. Three of the AVCHD clips are on the t