Re: [Flashcoders] percent loaded?

2006-03-16 Thread eric dolecki
Are you using a bunch of components? Do you have large assets with linkage
set to export on Frame1? I don't think you've given us enough information.

- e.dolecki

On 3/16/06, Edward Hotchkiss [EMAIL PROTECTED] wrote:

 i guess that my code is being deleted on each enter frame. once it loads
 completely, the text finally shows up, and then the next frame shows up
 also. why doesnt this one frame preloader, second frame website preloader
 work??? this is really bugging me, that i have to put code on a movieclip,
 and i cant do it 100% AS.


 function preloadMe() {
 _root.onEnterFrame = function() {
  tBytes = _root.getBytesTotal();
   bLoaded = _root.getBytesLoaded();
   percent = Math.round((bLoaded/tBytes)*100);
   if (bLoaded  tBytes) {
_root.preloader_mc.preloader_txt.text = loading site:  + percent;
gotoAndPlay(1);
   } else {
_root.preloader_mc.removeMovieClip();
_root.preloader_mc.preloader_txt.removeTextField();
gotoAndStop(2)
   };
 };
 };
 // -
 drawPreloader();
 preloadMe();
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] percent loaded?

2006-03-16 Thread Edward Hotchkiss
I have several fonts, and several mp3s totaling about 600k in the library, 
set for export on frame 1 with linkage.


- Original Message - 
From: eric dolecki [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, March 16, 2006 11:44 AM
Subject: Re: [Flashcoders] percent loaded?



Are you using a bunch of components? Do you have large assets with linkage
set to export on Frame1? I don't think you've given us enough information.

- e.dolecki

On 3/16/06, Edward Hotchkiss [EMAIL PROTECTED] wrote:


i guess that my code is being deleted on each enter frame. once it loads
completely, the text finally shows up, and then the next frame shows up
also. why doesnt this one frame preloader, second frame website preloader
work??? this is really bugging me, that i have to put code on a 
movieclip,

and i cant do it 100% AS.


function preloadMe() {
_root.onEnterFrame = function() {
 tBytes = _root.getBytesTotal();
  bLoaded = _root.getBytesLoaded();
  percent = Math.round((bLoaded/tBytes)*100);
  if (bLoaded  tBytes) {
   _root.preloader_mc.preloader_txt.text = loading site:  + percent;
   gotoAndPlay(1);
  } else {
   _root.preloader_mc.removeMovieClip();
   _root.preloader_mc.preloader_txt.removeTextField();
   gotoAndStop(2)
  };
};
};
// -
drawPreloader();
preloadMe();
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] percent loaded?

2006-03-16 Thread Éric Thibault
Here is what I use in a preload.as included in frame 1 and the rest of 
the animation on frame 2


http://132.203.112.156/phpmyadmin27/sql.php?lang=fr-utf-8server=1collation_connection=utf8_general_cidb=b2evolutiontable=evo_bloguserspos=0session_max_rows=30disp_direction=horizontalrepeat_cells=100dontlimitchars=0sql_query=SELECT+%2AFROM+%60evo_blogusers%60++ORDER+BY+%60bloguser_ismember%60+ASC/*add 
this line on frame 1:

#include preloader.as */

// 
PRELOADER---


//arrête la lecture sur l'image 1
stop();

//trace(Stage.width +  :  + Stage.height);

//fait un mc vide qui contiendra le preloader
this.createEmptyMovieClip (preloader_mc,1);
//pour positionner le preloader à l'endroit désirée
preloader_mc._x = Math.floor(Stage.width / 2) - 100;
preloader_mc._y = Math.floor(Stage.height / 2) - 50;
//les variables
preloader_mc.tBytes = this.getBytesTotal ();
preloader_mc.startX = 0;
preloader_mc.startY = 0;
//le champs texte qui affiche l'info
preloader_mc.createTextField(loader_txt,1,0,-25,200,40);
//formatage du texte
var loadFormat:TextFormat = new TextFormat ();
loadFormat.font=_sans;
//loadFormat.bold=true;
loadFormat.align=center;
loadFormat.color=0xafafaf;
loadFormat.size=10;
preloader_mc.loader_txt.setNewTextFormat(loadFormat);
//rectangle
preloader_mc.createEmptyMovieClip (rectangle_mc,10);
preloader_mc.rectangle_mc.lineStyle(1,0x00,100);
preloader_mc.rectangle_mc.moveTo(this.startX,this.startY);
preloader_mc.rectangle_mc.lineTo(preloader_mc.startX,preloader_mc.startY+5);
preloader_mc.rectangle_mc.lineTo(preloader_mc.startX+200,preloader_mc.startY+5);
preloader_mc.rectangle_mc.lineTo(preloader_mc.startX+200,preloader_mc.startY);
preloader_mc.rectangle_mc.lineTo(preloader_mc.startX,preloader_mc.startY);

//fonctionnement du preloader
preloader_mc.onEnterFrame= function() {
   this.clear();
   //style pour les lignes
   preloader_mc.lineStyle(1,0x00,100);
   //nb de bytes chargées
   lBytes=_root.getBytesLoaded();
   //variable du %
   var percentLoaded = Math.floor((lBytes/this.tBytes)*100);
   if (lBytes != this.tBytes){
   //texte du champs texte
   //this.loader_txt.text=Chargement +lBytes+ de 
+this.tBytes+\n +percentLoaded+%;

   this.loader_txt.text = percentLoaded+%;
   //remplissage de la forme
   this.beginFill(0x66,100);
   //dessiner le loader
   this.moveTo(this.startX,this.startY);
   this.lineTo(this.startX,this.startY+5);
   this.lineTo(this.startX+(percentLoaded*2),this.startY+5);
   this.lineTo(this.startX+(percentLoaded*2),this.startY);
   this.lineTo(this.startX,this.startY);
   this.endFill
   }else{
   //aller à l'image 2
   _root.play();
   //_root.stop();
   //enlever le preloader
   this.removeMovieClip();
   }
}

But verify what eric dolecki said also!

A+
http://132.203.112.156/phpmyadmin27/sql.php?lang=fr-utf-8server=1collation_connection=utf8_general_cidb=b2evolutiontable=evo_bloguserspos=0session_max_rows=30disp_direction=horizontalrepeat_cells=100dontlimitchars=0sql_query=SELECT+%2AFROM+%60evo_blogusers%60++ORDER+BY+%60bloguser_perm_poststatuses%60+ASC

Edward Hotchkiss wrote:

i guess that my code is being deleted on each enter frame. once it loads completely, the text finally shows up, and then the next frame shows up also. why doesnt this one frame preloader, second frame website preloader work??? this is really bugging me, that i have to put code on a movieclip, and i cant do it 100% AS. 



function preloadMe() {
_root.onEnterFrame = function() {
tBytes = _root.getBytesTotal();
 bLoaded = _root.getBytesLoaded();
 percent = Math.round((bLoaded/tBytes)*100);
 if (bLoaded  tBytes) {
  _root.preloader_mc.preloader_txt.text = loading site:  + percent;
  gotoAndPlay(1);
 } else {
  _root.preloader_mc.removeMovieClip();
  _root.preloader_mc.preloader_txt.removeTextField();
  gotoAndStop(2)
 };
};
};
// -
drawPreloader();
preloadMe();
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

 




--
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de 
confidencialidad http://www.rec.ulaval.ca/lce/securite/confidentialite.htm

___
Flashcoders@chattyfig.figleaf.com
To change your 

RE: [Flashcoders] percent loaded?

2006-03-16 Thread Kevin Aebig
There used to be an old problem that might be the cause of your troubles.
When a movie starts, sometimes the getBytesLoaded returns a value before
getBytesTotal has finished. So your condition of bLoaded  tBytes is
rendered inadequate. You could add  tBytes  8 to make sure that
totalBytes has actually loaded something...

Cheers,

Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Edward
Hotchkiss
Sent: March 16, 2006 10:42 AM
To: Flashcoders mailing list
Subject: [Flashcoders] percent loaded?

i guess that my code is being deleted on each enter frame. once it loads
completely, the text finally shows up, and then the next frame shows up
also. why doesnt this one frame preloader, second frame website preloader
work??? this is really bugging me, that i have to put code on a movieclip,
and i cant do it 100% AS. 


function preloadMe() {
 _root.onEnterFrame = function() {
 tBytes = _root.getBytesTotal();
  bLoaded = _root.getBytesLoaded();
  percent = Math.round((bLoaded/tBytes)*100);
  if (bLoaded  tBytes) {
   _root.preloader_mc.preloader_txt.text = loading site:  + percent;
   gotoAndPlay(1);
  } else {
   _root.preloader_mc.removeMovieClip();
   _root.preloader_mc.preloader_txt.removeTextField();
   gotoAndStop(2)
  };
 };
};
// -
drawPreloader();
preloadMe();
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] percent loaded?

2006-03-16 Thread Edward Hotchkiss
maybe it does have something to do with my libraries mp3s or fonts? or with 
a drawing class i use... if someone could look at my fla, the preload is on 
the bottom of the AS. this would be greatly appreciated...

fla:
http://www.murderdesign.com/default.zip

- Original Message - 
From: Kevin Aebig [EMAIL PROTECTED]

To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
Sent: Thursday, March 16, 2006 12:01 PM
Subject: RE: [Flashcoders] percent loaded?



There used to be an old problem that might be the cause of your troubles.
When a movie starts, sometimes the getBytesLoaded returns a value before
getBytesTotal has finished. So your condition of bLoaded  tBytes is
rendered inadequate. You could add  tBytes  8 to make sure that
totalBytes has actually loaded something...

Cheers,

Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Edward
Hotchkiss
Sent: March 16, 2006 10:42 AM
To: Flashcoders mailing list
Subject: [Flashcoders] percent loaded?

i guess that my code is being deleted on each enter frame. once it loads
completely, the text finally shows up, and then the next frame shows up
also. why doesnt this one frame preloader, second frame website preloader
work??? this is really bugging me, that i have to put code on a movieclip,
and i cant do it 100% AS.


function preloadMe() {
_root.onEnterFrame = function() {
tBytes = _root.getBytesTotal();
 bLoaded = _root.getBytesLoaded();
 percent = Math.round((bLoaded/tBytes)*100);
 if (bLoaded  tBytes) {
  _root.preloader_mc.preloader_txt.text = loading site:  + percent;
  gotoAndPlay(1);
 } else {
  _root.preloader_mc.removeMovieClip();
  _root.preloader_mc.preloader_txt.removeTextField();
  gotoAndStop(2)
 };
};
};
// -
drawPreloader();
preloadMe();
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] percent loaded?

2006-03-16 Thread Weyert de Boer
It's probably the AS2 classes you import these are loaded before first
frame one, meaning before your stuff gets executed. You could consider
when you don't use these classes in frame 1 to be loaded ona different
frame i.e. frame 2. File - Publish Settings - Action Script 2 button
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] percent loaded?

2006-03-16 Thread Mick G
In your publish settings try export your classes in frame 2 (with your
preloader on frame 1) - has worked for me when using some beefy components
before.

On 3/17/06, Weyert de Boer [EMAIL PROTECTED] wrote:

 It's probably the AS2 classes you import these are loaded before first
 frame one, meaning before your stuff gets executed. You could consider
 when you don't use these classes in frame 1 to be loaded ona different
 frame i.e. frame 2. File - Publish Settings - Action Script 2 button
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com