# First time not second

**URL:** https://forum.kirupa.com/t/first-time-not-second/23173
**Category:** Uncategorized
**Created:** [June 13, 2003, 11:32pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173 "2003-06-13T23:32:09Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Ainriail](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Ainriail](https://forum.kirupa.com/u/Ainriail)
#### Post date: [June 13, 2003, 11:32pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173/1 "2003-06-13T23:32:09Z")

</div>

Hello does anyone know how to make a movie load the first frame the first time, but if it is the second time the page is being viewed to skip over the first frame? I have a pre-loader which is located in the first frame and when revisiting the movie the loader always pops up for that split second. How can I solve my problem. Or what should I do? Thank you,  
Marc:hat:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 13, 2003, 11:58pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173/2 "2003-06-13T23:58:27Z")

</div>

u could create a variable on the main movie that increments a variable whenever the button to load the new movie is clicked, and have it check what frame to go to based on the value of the variable…

So have the variable start at 1, if first time have it go to frame 1, then if its greater then 1 (every time after the first) have it go to frame 2…

Not sure on the exacts of how to do this, but hey, the ideas there 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 14, 2003, 6:02am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/3 "2003-06-14T06:02:43Z")

</div>

Yoshi I don’t think that’ll work cuz the swf will reload so it won’t make any difference.

What you could try is find a PHP script for cookies, write the var to that cookie, read it at the beginning of your swf somehow. That should work I guess.

But I have absolutely no idea how to do that …

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2003, 11:18pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173/4 "2003-06-16T23:18:17Z")

</div>

Thanks to both of you for the ideas. I think perhaps I am over my head on this topic but you both have given me the foundation to at least try. Thanks again,  
Marc:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2003, 1:33am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/5 "2003-06-17T01:33:40Z")

</div>

It could be done with PHP. To make a cookie the first time and then send a variable to the flash movie upon return to be used in actionScript to gotoAndPlay(beyondPreLoader); . You will need PHP on your server to have it work, though. I’m learning PHP now, it’s pretty cool!! (-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2003, 12:05pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173/6 "2003-06-17T12:05:52Z")

</div>

im not sure of what your Q is but i think this will help…

```auto

if (getBytesLoaded() == getBytesTotal()) {
	//gotoAndPlay (start);
} else {
	//gotoAndPlay (load);
}

```

…and i think it would be better to start everything on (atleast) frame 2… i mean, sometimes, flash skips some frames when loading… maybe it’s better to give flash atleast 1 frame to breath and load everything…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2003, 4:02pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173/7 "2003-06-17T16:02:40Z")

</div>

Ainriail - is talking I think about coming back to the beginning of his movie - not re-loading the whole swf…  
anyway use the code noxious gave before anyother code (ie before loading/displaying preloader pics)

> maybe it’s better to give flash atleast 1 frame to breath and load everything…

:beam: let him breath :beam::beam:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 12:42am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/8 "2003-06-19T00:42:11Z")

</div>

Freddy Thunder, where can I go about learning this PHP? If you could help me out at all that would be most apreciated. And By the way, your book, was funny as hell. I really could relate having worked at Taco Bell for 3 years in high school. But working at the airport, man that must suck. Thanks,  
Marc

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 2:49am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/9 "2003-06-19T02:49:46Z")

</div>

Hey! Thanks for checking out the book! I think it’s funny too, but I’m a little bias…You should get a copy and spread the word around Hawaii (hint 😉 )!!

Anyhow, with your PHP thing: PHP processes scripts before launching the HTML and whatever server it’s on must support PHP. PHP is server-side scripting language that is explained in this forum:  
[http://www.kirupaforum.com/forums/forumdisplay.php?s=&forumid=11](http://www.kirupaforum.com/forums/forumdisplay.php?s=&forumid=11)

What I had in mind in my post is the same thing that Noxius put in actionScript. Just to see if the movie is cached (which would make getBytesLoaded()==getBytesTotal) and then just skip the preloader.

Another thought that I had was to have two seperate swf files and have PHP plant a cookie the first time and launch the swf with the preloader; then upon return, PHP would see the cookie and launch the swf WITHOUT the preloader.

However - if all you are trying to do is skip a preloader, try what Noxious said, it’s easier, cheaper, and you don’t have to learn PHP to do it.

If you have any other q’s let us know!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 12:09am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/10 "2003-06-20T00:09:01Z")

</div>

Again thanks to everyone who is trying to help me out. And Freddy Thunder, I will check out if Borders has your book because in the area I live you either worked at a surf store or you worked in a resturant in high school. Since my friends and I opted to play hockey and lacrosse instead of surfing we all worked in the food industry and have our own set of stories, so I will definately check out your book and I know they will get a kick out of it also.  
Mahalo Nui Loa,  
(thank you very much)  
Marc

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 12:46am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/11 "2003-06-20T00:46:22Z")

</div>

That’s cool! Except it’s only in the Borders in Phoenix (for now) I’m trying to get their wholesaler number, but it’s in their computer. You can order it on my website, if you want. I suppose I should try to get it in Hawaii, it’s gotta be mostly hospitality work down there. And, I know, everybody tells me that they want to add stuff into the next book…:crazy:

So, Mahalo Nui Loa!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 8:31pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173/12 "2003-06-20T20:31:35Z")

</div>

Thanks again to everyone, especially Freddy Thunder. I went to [phpbuilder](http://www.phpbuilder.com) and left a message on their forums and solved the problem. If anyone is wondering what it was, send me a message on kirupa and I will send you what I was told. It totally works. Thanks again for the help, without it I still would not have considered PHP an option or known what it was. message me if you get your book to any major bookstore in Hawaii. Thanks again everyone,  
Marc

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 11:59pm UTC](https://forum.kirupa.com/t/first-time-not-second/23173/13 "2003-06-20T23:59:45Z")

</div>

I want to know what you were told. Could you post it here? Or is it too long? And about the book, I will let you know!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 3, 2003, 12:23am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/14 "2003-07-03T00:23:31Z")

</div>

Sorry again for taking a long time to reply, it is summer and I took a couple days off of work. This is what the person on [phpbuilder.com](http://phpbuilder.com) told me to do.

> \<?php session\_start();  
> Session\_register (‘flashSeen’);  
> ?\>

This goes into the html coding of the page, I put this right after the coding for the title. Next after the “src=” portion you have to append the URL with “?flashSeen=True”  
Finally in the begining of the flash document on the preloader section of the movie, [AS]if (flashSeen == True) then gotoAndPlay(3)[/AS]  
This worked rather nicely. Thanks again for all of the quick replies. Thanks again Freddy Thunder for the direction twords php.

Thanks,  
Marc:pope:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 3, 2003, 1:42am UTC](https://forum.kirupa.com/t/first-time-not-second/23173/15 "2003-07-03T01:42:22Z")

</div>

I’m glad it worked out the way you wanted. Now that I’ve done a little more with PHP, I’ve learned about sending and loading variables and I’m glad that it’s doing that fast enough for you. That wasn’t a concern earlier, because I didn’t know about it.

All in all - it’s good that it all worked out for you!!
