No! For the preload action you have to use at least two _root-frames (or the
like)
put pacman_mc to _root layer1 frame1, goto frame 2 and press F5!
now put those actions into _root layer2:
frame 1
*nothing*
frame 2
tmp = (...)*283;
_root.preload_mc.pacman_mc._x = tmp;
if (tmp <= 283) gotoAndPlay(1);
istead of _root, you can also take a blanc MC positioned off-screen but...
:-(
A hint: work with two scenes.
scene 1: The preload scene as written above. In frame 3 you can write
gotoAndPlay("szene2", 1);
scene 2: Your main movie.
-André-
[quoted text, click to view] "thecrawf" <thecrawf@tinyworld.co.uk> wrote in message
news:br5n4u$jjv$1@forums.macromedia.com...
> Hmm
>
> I tried the following.
> I created the MC as you said.
> put this on frame1 layer 1
> frame 1 layer 2 = stop();
>
> Made a blank MC and positioned it off-screen and attached the following
> script
>
> onClipEvent (enterFrame) {
> tmp = (_root.getBytesLoaded()/_root.getBytesTotal())*283
> _root.preload_mc.pacman_mc._x = tmp;
>
> _root.nextFrame();
> }
>
> This doesnt work. Any ideas?
>
> I said I was an ActionScript Noob!
>
> andy
>
> "thecrawf" <thecrawf@tinyworld.co.uk> wrote in message
> news:br5in3$dtu$1@forums.macromedia.com...
> > thanks, I'll give it a go
> >
> >
> >
> > "Andre Hessler" <ahessler@gmx.de> wrote in message
> > news:br5id8$dki$1@forums.macromedia.com...
> > > use getBytesLoaded to controll the _x value of the pacman-MC
> > >
> > > example:
> > > you have a movie clip, called "preload_mc".
> > > put the row of dots and the pacman into this mocieclip in two seperate
> > > layers. Place Pacman on the left site of your row of dots an give him
> the
> > > instancename pacman_mc.
> > >
> > > your preload-funktion makes the folowing call:
> > > tmp =
(_root.getBytesLoaded()/_root.getBytesTotal())*<width_of_dotsrow>
> > > _root.preload_mc.pacman_mc._x = tmp;
> > >
> > > thats it!
> > >
> > >
> > >
> > > "thecrawf" <thecrawf@tinyworld.co.uk> wrote in message
> > > news:br5g4a$amp$1@forums.macromedia.com...
> > > > First let me say when it comes to Action Script I am a bit of a Noob
> so
> > > > please be gentle!
> > > > I am using Flash MX by the way.
> > > >
> > > > I've searched the web for preloader tutorials and can find hundreds
on
> > > > percentage or progress bar, but the preloader that I need to make is
a
> > bit
> > > > different and I would appreciate any help or tutorials.
> > > >
> > > > My preloader is in the style of Pacman. Therefore I have an MC of
> pacman
> > > > (with mouth opening and closing)/ a row of dots (left to right) and
a
> > > finish
> > > > dot.
> > > > All I have to do is get the Pacman MC to move from left to right to
> > > indicate
> > > > progress. The problem is, I don't know how to move him using
> > > getBytesLoaded.
> > > >
> > > > Thanks for any help
> > > >
> > > > andy
> > > >
> > > >
> > >
> > >
> >
> >
>
>