Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preloaderscript mess up my panorama script

Status
Not open for further replies.

CMD83

Technical User
Nov 11, 2002
68
NL
Hi

I got a small problem

for a website I made a panorama of a product (using flash)

it's about half an Mb and loading takes some time with a slow connection. So I decided to put a progressbar in it.
But now my panorama script is messed up by that. Any idea how I can fix this?

the panorama script (which it messes up):

onClipEvent (load) {
stop ();
var mouseXMove = false;
var oldmouseX = _root._xmouse;
var mouseX = oldmouseX;
var zoom = false;
var rotate = "left";
}
onClipEvent (enterFrame) {
if (rotate != false) {
if (rotate == "left") {
if (_currentframe != 1) {
gotoAndStop (_currentframe-1);
} else {
gotoAndStop (36);
}
} else {
if (_currentframe != 36) {
gotoAndStop (_currentframe+1);
} else {
gotoAndStop (1);
}
}
}
}
onClipEvent (mouseMove) {
if (mouseXMove == true) {
mouseX = _root._xmouse;
if (mouseX<oldmouseX) {
if (_currentframe != 1) {
gotoAndStop (_currentframe-1);
} else {
gotoAndStop (36);
}
} else {
if (_currentframe != 36) {
gotoAndStop (_currentframe+1);
} else {
gotoAndStop (1);
}
}
oldmouseX = mouseX;
}
}


and here the preloader script:

kbloaded = int(this.getBytesLoaded()/this.getBytesTotal()*100);
if (kbloaded>=100) {
gotoAndPlay(&quot;mainscene&quot;, 1);
}

loadpercent = Math.round(_root.getBytesLoaded()/_root.getBytesTotal()*100)+&quot;% &quot;;

I hope someone can help me out ^^
 
It worked before you added the preloader?

On how many frames, is this preloader? It should be on at least 2 frames, the second frame being...

gotoAndPlay(1);

So that the preloader loops until the movie is loaded.

Other than that, is this a 1 frame main scene? Do you have a stop(); action on your main scene? To keep it from looping back to the preloader? Regards,

oldman3.gif
 
Hi at first thanks for helping me!

yes it worked fine before the preloader

the preloader has three frames
the third has that script

it's not a 1 frame mainscene, it does have a stop(); on the first frame and on frame 21 it has another stop and on this frame also a movieclip (the panorama) which the preloader messes up

does just stop(); in the mainscene prevent the preloader to act? or does it need more scripting?

Thanx again! ^^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top