Is the advice in this old thread still the best advice?

I've tried using code below from Lee Brimelow in seperate .fla (frame
1):

var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("test68.swf"));

function loop(e:ProgressEvent):void
{
        var perc:Number = e.bytesLoaded/e.bytesTotal;
        percent.text = Math.ceil(perc*100).toString();
}

function done(e:Event):void
{
        removeChildAt(0);
        percent = null;
        addChild(l);
}


See countup, test68.swf is in same project area and works fine without
preloader ...

test68.swf exports to frame 1 ...

get lots of output like this:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
        at test68/initListeners()
or
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
        at away3d.containers::View3D/updateScreenClipping()
or
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
        at away3d.core.clip::Clipping/screen()
etc ...




On Jul 1 2008, 12:34 am, ChromeDemon <[email protected]> wrote:
> I got it working. I used the Queueloader made by "Hydrotik". It seems
> that this one can handle it ... (Before that i used a custompreloader
> and got errors)
> anyways ... Nevertheless, thanx for Away3d and thanx for all the help
> here
>
> cheers
>
> Mark
>
> On 30 Jun., 18:26, "Rob Bateman" <[email protected]> wrote:
>
>
>
> > hey guys
>
> > there should be no problem with doing this, as long as your away3d classes
> > are exported in the root swf you are using. If you don't have this, you may
> > run into issues, but in as3 i've never really seen this problem before
> > (fingers crossed..)
>
> > if you can isolate an example to send over i might be able to take a look,
> > but the issue sounds like a more generic error and nothing specifically
> > targetted at the away3d library. Could be wrong tho
>
> > atb
>
> > Rob
>
> > On Mon, Jun 30, 2008 at 4:58 PM, ChromeDemon <[email protected]> wrote:
>
> > > Got the same when I load an AWAY3D Movie into an Main.swf ...
> > > Maybe it has sumthing to, that I dont use an .as file with Package
> > > inside and the option to make Vars Public and Private???
>
> > > cheers
>
> > > On 13 Jun., 03:00, FBB <[email protected]> wrote:
> > > > Hi there,
>
> > > >      Well as it was ment to be (unfortunately) it seems my first
> > > > question concerning away3d isn't 3d related... -_-
>
> > > >     I have a 3D scene of a room with a button and a door. The button
> > > > opens the door and when you "walk" throught it you access another
> > > > level... So I thought (stupid me it seems) why not create a main.swf
> > > > that load room1.swf like so:
>
> > > > var mLoader:Loader = new Loader();
> > > > var mRequest:URLRequest;
> > > > var levelID:String = "sala1.swf";
>
> > > > function startLoad():void
> > > > {
> > > >         mRequest = new URLRequest(levelID);
> > > >         mLoader.load(mRequest);
> > > >         addChild(mLoader);}
>
> > > > startLoad();
>
> > > >      Works very well, problem is, when I walk through the door to
> > > > change level (in the loaded swf) I can't trigger the levelID property
> > > > or the startLoad() method the right way... It keeps giving me errors
> > > > of all sorts (mainly #1009).
>
> > > >      Bottom line... is there any other way to switch between away3d
> > > > swf's like when loading a level? or like in as2 into MC's ?
>
> > > > Best Regards
>
> > > > Fernando Barros
>
> > --
> > Rob Bateman
> > Flash Development & Consultancy
>
> > [email protected] Hide quoted 
> > text -
>
> - Show quoted text

Reply via email to