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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looping load or skip to url.... 1

Status
Not open for further replies.

KeyTech

Programmer
Nov 14, 2000
830
KR
Hi, im kinda new to Flash, I have a web site up and at the start I have a flash intro, and what I want to do is to have a skip button that stops all and goes to the home page.
here is some more info.
The .fla starts off with LOADING on the screen and this is a loop of 4 frames, the first being, if frame loaded 150, goto 5, and then the 4th frame is goto 1, thus making a loading loop unless the movie has loaded to frame 150.
Now, here is the problem, I have another layer, with skip on it, its just text made to a button and I gave that button the action of on mouse release, stop, stop all sounds, and goto 151, which is after the movie and says CANELLING on screen, the skip button appears as soon as the movie starts up, and stays there untill the movie is over.
What happens is that when I hit the skip button at the start when it says laoding, it stops the preloader and goes to frame 5 and starts to play the movie after stoping all sound even though the movie is not loaded.
If I remove the goto 151 action from the button the movie does as it should and stops everything.
So Im trying to figure out why if goto 151 is in there does it not go to frame 151 but instead skips the loading and plays the movie??????
Its strange and I hope I explained it right!!!
At the moment I have the site up but the skip is not in the flash movie, I just have it on the HTML page as a link, but I dont want to have that as when the link is pressed, even though IE is going to the next page, it appears as if you are not going anywhere as the movie still displays loading.......
here is the site
thanks guys!

Jay~

My new Tae Kwon Do website is up and running!!

~KeyTech
 
Jay,

Try this:

If I understand you right what you need to do is change your script a little bit.

This is assuming you want it to say "Cancelling" for a little while.

The script on your button should be:
on (release) {
stopAllSounds ();
gotoAndPlay (151);
}

Forget the extra stop you have on there.

Now add 12 frames or so to the end of your movie. On the last frame insert a keyframe and place the following on action on that frame:
getURL (" "_self");


That should do it. What it will do is automatically go to the same page you are going to now.

If you don't have to have it say "Cancelling" do this on your "skip button":
on (release) {
getURL (" "_self");
}

And your done... hope that helps!
 
Super stuff pixl8r

Im in work now, so I'll try it when I get home and let you know how I get on...sounds like it will work though,
having the script without the stop 0; in there is probably what I need to do....

cheers.... Jay~

My new Tae Kwon Do website is up and running!!

~KeyTech
 
Hi again,

I tried what you suggested, but no luck, and Im still stuck.
What happens with the code
on (release) {
stopAllSounds ();
gotoAndPlay (151);
}

Is when the skip button is pressed it doesnt go to 151, it instead jumps out of the 4 frame loop, (if frame loaded 150, goto 5, and then the 4th frame is goto 1)

The thing is, that it only doesnt work when the movie is laoding......that is, if I was to hit skip as the movie is displaying loading being in the first 4 frames, it jumps to frame 5 and plays the movie as you know happens bit by bit as its not loaded......BUT if I was to wait till the movie loads fully and goes from the loop to frame 5 like it should if you waited, hitting the skip button then works, which stops the sounds and goes to the Cancelling frames at 151, then jumps to the url.
So narrowing it down to the loading loop, I was wondering if you knew why it will not jump to 151 when its in that 4 frame loop?????? the loop is
(Frame 1) IfFrameLoaded (150) {
GoToAndPlay(5);
}

then if it isint loaded it goes by frames 2 and 3 that have no actions, then
(frame 4) GoToAndPlay (1);

the skip button is on a layer of its own and is visible from frame 1 to a few before the end, as an Enter button takes its place when the movie is over......

any ideas....??????

Jay~

My new Tae Kwon Do website is up and running!!

~KeyTech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top