Flash preloader keeps playing but wont start movie.

I have a preloader that I made and I thought I did all the script right but the preloader animation just keeps repeating and it never plays the movie. When i tried to fix it, I got the problem of the preloader animation would play out and the movie would start, but the whole movie wasnt actually loaded so the movie would stop at parts and I would have to click play to make it start again. Any idea what Im doing wrong? This is the script that I have for my preloader:

ifFrameLoaded ("scene 2", 150) {
      gotoAndPlay("scene 1", 32);
      if (_framesloaded<_framestotal) {
            gotoAndPlay(1);
      }
}

I have it so the preloader fades out (at frame 32) and then on the last frame of the preloader (which is in scene 1) there is script telling it to go to and play the next scene (scene 2 which is where the main movie is). I don't know if I've made this hard for myself, but if anyone has a solution to my problem, help would be appreciated. Please let me know if I'm not explaining this clearly.
apriigemAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blue-genieCommented:
Hi
first of all, what version of flash are you using?
ifFrameLoaded is from way back prehistoric days, you shouldn't be using it

rather do this

if (_framesloaded >= _totalframes) {
  gotoAndPlay ("scene 1", 32);
} else {
  gotoAndPlay(1);
}

blu
0
Dushan De SilvaTechnology ArchitectCommented:
Another way...

ifFrameLoaded ("scene 2", 150) {
  gotoAndPlay("scene 1", 32);
} else {
  gotoAndPlay(1);
}
0
Dushan De SilvaTechnology ArchitectCommented:
Hi  apriigem,
The way you have implemented logic will keeps in the first frame , until wole frames loaded. But playing preloading...

BR Dushan
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

apriigemAuthor Commented:
I am using Flash 8 and I tried both of the solutions suggested above but neither one of them solved my problem. The 1st solution caused the preloader to play through fully once and then nothing else happened. the 2nd solution  caused the preloader to stop right before it ended, and I also got a script error **Error** Scene=Scene 1, layer=PreLoader, frame=30:Line 3: 'else' encountered without matching 'if'
     } else {

For both solution I just replaced the current code I have with what you provided, let me know if I was supposed to do anything else. Thanks!
0
Dushan De SilvaTechnology ArchitectCommented:
sorry about the mistake. Please try following code.

ifFrameLoaded ("scene 2", 150) {
  gotoAndPlay("scene 1", 32);
}
gotoAndPlay(1);

BR Dushan
0
apriigemAuthor Commented:
k, I tried the new code, but the same thing happened as the original code I used. The preloader keepes playing and the movie never opens.
0
blue-genieCommented:
have u tried my suggestion?
0
apriigemAuthor Commented:
yes blue, I tried yours first and that's the one that cause the preloader to play all the way through and then nothing happened, I don't know if the movie ever loaded but nothing showed up on the screen.
0
blue-genieCommented:
i stand by my theory, it's the gotoand play scene thing - scenes are dodgy.
0
apriigemAuthor Commented:
Ok, I totally agree about the scene thing being dodgy. Do you have any suggestions on another way I might go about doing this, or maybe a tutorial? Thanks for the help.
0
blue-genieCommented:
my age old suggestion, remove everything from the scenes, place them on separate swf files and loadMove() to load them into levels.
works much better, makes for smaller file size, better overall runtime performance as well.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
apriigemAuthor Commented:
Thanks! :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.