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!

Modulating

Status
Not open for further replies.

Caden

Programmer
Dec 9, 2001
101
CA
Hey everyone, so I have a strange problem, i'm trying to modulate my website, basically breaking it down into seperate files, and running thoes files via a movie clip in the main file.

Problem is, my movie is set up, so when I click on a link on main.swf a external.swf file plays...in scene 1 a pre-loader works no problem, then it goes to scene 2 by using the nextscene() function and it hangs on the first frame. I have it set in the first frame to play() and when I test my movie it works no problem, but when I publish and run it in IE the second scene in external.swf hangs on frame 1. I have no idea why.

Any idea's?
thanks
Caden
 
must have a stop action somewhere probably on the frame 1 or when you are moving to scene 2 by a gotoandstop.

on the other hand it could be the uses of scenes. never use scenes....dont know how many times i have said that.
 
I don't have a spot action anywhere that might be hindering it...as I said, the test movie works no problem.

And why not use scenes? What is the disadvantage of that?

Caden
 
scenes are an authoring fiction..they do not exist in a published movie...they get all sorts of people into trouble that would have been avoided without the use of scenes. scenes are ALWAYS unnecessary and its a mystery to me why macromedia continue to allow this abomination.

having said that if there is no stop anywhere then i have no idea whats wrong

if you want to post your fla i can take a look.
 
Mr. Bill Watson you're a smart man...what was actually happening was the preloader was basically flashing on the screen and getting passed so the first frame of the second scene would load and it would continue loading the movie. So me, thinking it didn't work, would close the movie before it ever got a chance to load...i'm going to take the scene away and see if it will work better...

Thanks for the tip on style and efficiency
Caden
 
gah, it's still not working.

The preloading basically, isn't preloading...and I don't know why. It works in other places for other movies...
 
NextScene() is a stop action like nextFrame(), it doesn't automatically play the scene if you don't add a play(); action on it's first frame. And even then, you'd be better off using a gotoAndPlay(); action rather than nextScene();.

Label the targeted frame in that targeted scene with an unique label (no number only labels or at least not starting off with numbers!), add _root to your path and target that labeled frame...

_root.gotoAndPlay("frame_label");

As for the use of scenes, Bill doesn't like them (We do know that by now!), but IMHO, they can work fine in most simple situations.

Regards,

cubalibre2.gif
 
When I test the movie and show the streaming it works fine. As soon as I publish and throw it into a browser, it doesn't work the same way.

Any idea why Flash would do that?

Caden
 
alright, so everything above this post is wrong as I keep digging into this problem and finding things out.

Because I am trying to break this apart, and I am using 2 SWF files, the problem is in that. When I run the exclude.html by itself, the preloader works no problem. But because I am importing the file into a movieclip, something isn't working right.

That is the problem
Caden
 
then either...get rid of the preloader...or move the preloader into the first file and have it target the clip into which the file is loading.
 
how can I target the preloader to the file which is loading? i've never done that before, and i'm not quite sure how.

Thanks
Caden
 
assuming clip is the instance name you are loading into and a textbox with variable name percent on stage

then to main timeline add

clip.loadMovie("my.swf");
this.onEnterFrame=function(){
percent=(clip.getBytesLoaded()/clip.getBytesTotal())*100;
if(percent >= 100){
delete this.onEnterFrame;
percent ="";
}
}
stop();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top