Your best bet maybe the old school style preloaders, where all the art is on
frame 1 or 2, and all the code starts on frame 2 or 3.

You can accomplish this by writing your preloader on the first frame of the
Flash movie, with a bar or minimal graphics.

Most if not all of you library classes need to be set to false on "export in
the first frame".

If you don't want to write your preloader on the first frame of the FLA, you
can make your main document class a preloader, with no 3D in it. Once this
class detects the whole movie is loaded, you can then start a second class
with all the 3d in it. You would still need all art on frame 2 for this to
preload anything.

Flash will not preload anything with art on the first frame or a bunch of
code ont he first frame, so to get it to load the 70-100k (depending on
which away3d version you use) of away3d files still escapes me in CS3 but I
think it could be done, just not as easy as in Flex.

I've used both techniques successfully to make games, so I know preloaders
work. Flash usually puts up a fight at first, and needs to be told what to
do the right way.

-Pete

On Wed, Jul 29, 2009 at 2:47 AM, justaddice <[email protected]> wrote:

>
>
> Hi David, My problem isn't using the embed metadata tag (I'm using CS4
> IDE).
>
> I'm simply wanting a pre-loader to show while the swf loads.
>
> Cheers.
> Daniel.
>
>
> On Jul 29, 1:09 pm, "David Zirbel" <[email protected]>
> wrote:
> > Hi Daniel,
> >
> > Flash CS3 ignores the Embed metadata tag, and CS4 requires some
> massaging.
> > Work-arounds for each are described at:
> > "http://www.flashmagazine.com/Tutorials/detail/using_flex_actionscript.
> ..
> > _with_metadata_in_flash_cs3/"
> >
> > HTH,
> >
> > David Z
> >
> >
> >
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]]
> On
> >
> > Behalf Of justaddice
> > Sent: Tuesday, July 28, 2009 9:17 PM
> > To: away3d.dev
> > Subject: [away3d] Preloader to show loading of meshes + textures.
> >
> > Hi,
> >
> > I'm using Flash with the 'document class' pointing at my code. I'd
> > like to make a pre-loader so that users don't just get a blank-white
> > screen while the swf loads. I've had a go at trying to implement a
> > standard-preloader, but as I'm using the document class feature in
> > Flash, things mess up.
> >
> > Some (cut-down) code to illustratate what I've got so far:
> >
> > public class ddGame extends Sprite
> > {
> >
> >                 [Embed(source="/../images/earth.jpg")] private var
> > EarthImage:Class;
> >                 private var earthBitmap:Bitmap = new EarthImage();
> >
> >                 public var scene:Scene3D;
> >                 private var camera:Camera3D;
> >                 private var view:View3D;
> >
> >                 public function ddGame()
> >                 {
> >                         // set up the stage
> >                         stage.align = StageAlign.TOP_LEFT;
> >                         stage.scaleMode = StageScaleMode.NO_SCALE;
> >
> >                         // Add resize event listener
> >                         //stage.addEventListener(Event.RESIZE, onResize);
> >
> >                         // Load in the pre-loader movie clip
> >                         mLoader = new mPreLoader();
> >                         addChild(mLoader);
> >
> >                         // Trigger updates
> >                         this.addEventListener(Event.ENTER_FRAME,
> loading);
> >
> >                         // Initialise
> >                         init3D();
> >
> >                         // Create the 3D objects
> >                         createScene();
> >
> >                         //  etc..
> >                 }
> >
> >                 private function loading(e:Event):void
> >                 {
> >
> >                         var total:Number =
> this.stage.loaderInfo.bytesTotal;
> >                         var loaded:Number =
> > this.stage.loaderInfo.bytesLoaded;
> >
> >                         mLoader.loader_txt.text =
> > Math.floor((loaded/total)*100)+ "%";
> >
> >                         if (total == loaded)
> >                         {
> >                                 this.addEventListener(Event.ENTER_FRAME,
> > loop);
> >                         }
> >
> >                 }
> > }
> >
> > I've done searches for how to do this online, but nothing has come up.
> >
> > Any help appretiated,
> >
> > Cheers,
> >
> > Daniel.
>



-- 
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

Reply via email to