Hello,
I have problems with creating a preloader in Flash Builder 4, preloading the embedded swfs of the attached file. I want a progress bar to be shown and after loading all the embedded swfs, the progress bar is removed and the main scene appears.
Here the essential code sample
package
{
import away3d.cameras.Camera3D;
import away3d.containers.ObjectContainer3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.core.base.Mesh;
import away3d.core.geom.Path;
import away3d.core.utils.Cast;
import away3d.events.MouseEvent3D;
import away3d.loaders.Max3DS;
import away3d.materials.BitmapMaterial;
import away3d.materials.ColorMaterial;
import away3d.materials.EnviroBitmapMaterial;
import away3d.materials.MovieMaterial;
import away3d.modifiers.PathAlignModifier;
import away3d.primitives.Plane;
import away3d.primitives.TextField3D;
import away3d.sprites.MovieClipSprite;
import caurina.transitions.Tweener;
import flash.display.MovieClip;
import flash.display.Shader;
import flash.display.Sprite;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.TimerEvent;
import flash.filters.ShaderFilter;
import flash.geom.Matrix3D;
import flash.geom.Vector3D;
import flash.utils.Timer;
import org.osmf.events.TimeEvent;
import wumedia.vector.VectorText;
[SWF(width=“1200”,height=“950”,backgroundColor=“0x222222”)]
public class eyestee extends Sprite
{
protected var scene:Scene3D;
protected var camera:Camera3D;
protected var view:View3D;
//logo font container
private var logocontainer1:ObjectContainer3D;
private var logocontainer2:ObjectContainer3D;
private var logocontainer3:ObjectContainer3D;
//Embedded Font
[Embed(source=“Fonts.swf”,mimeType=“application/octet-stream”)]
protected var Fonts:Class;
[Embed(source=“VrindaBold.swf”,mimeType=“application/octet-stream”)]
protected var VrindaB:Class;
//Embedded Text SWF
[Embed(source = “logo.swf”)]
protected var Logomaterial:Class;
[Embed(source = “starttext.swf”)]
protected var StartText:Class;
[Embed(source = “picsballtext.swf”)]
protected var PicsballText:Class;
[Embed(source = “introballtext.swf”)]
protected var IntroballText:Class;
[Embed(source = “clipballtext.swf”)]
protected var ClipballText:Class;
[Embed(source = “docsballtext.swf”)]
protected var DocsballText:Class;
[Embed(source = “introtext.swf”)]
protected var IntroText:Class;
[Embed(source = “picstext.swf”)]
protected var PicsText:Class;
[Embed(source = “cliptext.swf”)]
protected var ClipText:Class;
[Embed(source=“playbtn.swf”)]
protected var PlayButton:Class;
[Embed(source=“playbtnOff.swf”)]
protected var PlayButtonOff:Class;
[Embed(source=“stopbtn.swf”)]
protected var StopButton:Class;
[Embed(source=“nextbtn.swf”)]
protected var NextButton:Class;
[Embed(source=“nextbtnoff.swf”)]
protected var NextButtonOff:Class;
[Embed(source=“prevbtn.swf”)]
protected var PrevButton:Class;
[Embed(source=“prevbtnoff.swf”)]
protected var PrevButtonOff:Class;
[Embed(source=“pausebtn.swf”)]
protected var PauseButton:Class;
[Embed(source = “kitchentext.swf”)]
protected var Kitchentext:Class;
[Embed(source = “beetletext.swf”)]
protected var Beetletext:Class;
[Embed(source = “cantext.swf”)]
protected var Cantext:Class;
[Embed(source = “buildingtext.swf”)]
protected var Buildingtext:Class;
[Embed(source = “polotext.swf”)]
protected var Polotext:Class;
[Embed(source = “vwbeetlevideo.swf”)]
protected var BeetleVideo:Class;
[Embed(source = “video1.swf”)]
protected var Clip:Class;
[Embed(source=“beetlevideocover.swf”)]
protected var BeetleVideoCover:Class;
[Embed(source=“videocover.swf”)]
protected var VideoCover:Class;
[Embed(source=“videocover1.swf”)]
protected var VideoCover1:Class;
//Embedded class and texture for car and wheel
[Embed(source=“vwpoloneu.3ds”,mimeType=“application/octet-stream”)]
protected var PoloModel:Class;
[Embed(source=“polo02082011.jpg”)]
protected var AS3Material:Class;
[Embed(source=“wheel.jpg”)]
protected var WheelMaterial:Class;
[Embed(source=“street.jpg”)]
protected var Marble:Class;
//Embedded Texture for the Spheres
[Embed(source=“SimplePointLight.pbj”,mimeType=“application/octet-stream”)]
protected var PixelBenderShader:Class;
[Embed(source = “Pics1a.jpg”)]
protected var Picsballmaterial:Class;
[Embed(source = “picsball1.jpg”)]
protected var Picsball1material:Class;
[Embed(source = “Intro1a.jpg”)]
protected var Introballmaterial:Class;
[Embed(source = “introball1.jpg”)]
protected var Introball1material:Class;
[Embed(source = “Clips1a.jpg”)]
protected var Clipballmaterial:Class;
[Embed(source = “Clips1b.jpg”)]
protected var Clipball1material:Class;
[Embed(source = “arrowright.gif”)]
protected var Arrow:Class;
[Embed(source = “Docs1a.jpg”)]
protected var Docsballmaterial:Class;
[Embed(source = “docsball1.jpg”)]
protected var Docsball1material:Class;
[Embed(source = “beetlebox.jpg”)]
protected var Beetlebox:Class;
[Embed(source = “buildingbox.jpg”)]
protected var Buildingbox:Class;
[Embed(source = “kitchenbox.jpg”)]
protected var Kitchenbox:Class;
[Embed(source = “colabox.jpg”)]
protected var Colabox:Class;
[Embed(source = “picbox.jpg”)]
protected var Picsbox:Class;
// large Pics of box classes
[Embed(source = “beetlepic1.jpg”)]
protected var Beetlepic:Class;
[Embed(source = “kitchenpic.jpg”)]
protected var Kitchenpic:Class;
[Embed(source = “colapic.jpg”)]
protected var Colapic:Class;
[Embed(source = “buildingpic1.jpg”)]
protected var Buildingpic:Class;
........
Please help.
Thanks
Edga