# Play frame 1 if flash not seen before else frame 2 using flash and ASP? session

**URL:** <https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325>\
**Category:** Uncategorized\
**Created:** [April 4, 2006, 10:34am UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325 "2006-04-04T10:34:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 4, 2006, 10:34am UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/1 "2006-04-04T10:34:42Z")

</div>

Hi

I am after some advice please for flash and asp usage.

Basically what I am after is for example:-

In my flash I have two key frames 1 and 2.

If a user has already seen my flash file once within the same session, i.e they have already seen it and are still in the site, and again revert back to the home page.

What I want to do is play frame 2 not frame 1 if they have already seen frame one at the start.

I have seen this sort of thing before as an example yahoo.

Where they have a movie that plays the first time you load the site, but the other times you go to the home page the flash does not play again.

I HOPE SOMEONE can help me out as this has been a long awaited request of mine that I just cannot figure out.

Any help or better still and example would be fantastic.

I look forward to any advice, help, examples.

Cheers

Trev

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [April 4, 2006, 12:57pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/2 "2006-04-04T12:57:24Z")

</div>

Hey Trev!

Well you can have a conditional in you asp page and then send a variable to flash letting it know what frame to play.

i.e.

if(user has seen this already) then  
frameNum == 2  
else  
frameNum == 1  
end if

wow my asp is rusty :lol:

---

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 4, 2006, 1:08pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/3 "2006-04-04T13:08:34Z")

</div>

Hey how you doing long time no see :(.

Hope your alright mate.

I understand ASP its just the connection between both.

What you have supplied is a simple if statement. I would use something like:-

```auto

If viewedflash = 1 Then
framenumber = 2 
Else
framenumber = 1
End If

```

But how does flash relate to this, any chance of a sample I can try in my localhost?

Just put two key frames into the flash, 1st key frame with seen and the second with not seen. So I may have an idea how you have done it.

That would be a big help, also get in touch mate long time no chat it would be good to catch up. Lots going on :).

Cheers

Trev

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [April 4, 2006, 2:04pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/4 "2006-04-04T14:04:47Z")

</div>

> [@trevorsaint](#):
>
> Hey how you doing long time no see :(.
> 
> Hope your alright mate.
> 
> I understand ASP its just the connection between both.
> 
> What you have supplied is a simple if statement. I would use something like:-
> 
> ```
> ActionScript Code:
> [FONT=Courier New][LEFT][COLOR=#0000FF]If[/COLOR] viewedflash = [COLOR=#000080]1[/COLOR] Then
> 
> ```
> 
> framenumber = [COLOR=#000080]2[/COLOR]  
> [COLOR=#0000FF]Else[/COLOR]  
> framenumber = [COLOR=#000080]1[/COLOR]  
> [COLOR=#0000FF]End[/COLOR] [COLOR=#0000FF]If[/COLOR]  
> [/LEFT]  
> [/FONT]
> 
> But how does flash relate to this, any chance of a sample I can try in my localhost?
> 
> Just put two key frames into the flash, 1st key frame with seen and the second with not seen. So I may have an idea how you have done it.
> 
> That would be a big help, also get in touch mate long time no chat it would be good to catch up. Lots going on :).
> 
> Cheers
> 
> Trev

Yes man we will have to chat been super busy. Things are great as I assume & hope are with you.

It’s around 10:30 am here, I can surely make you a quick sample before I go to lunch. Will repost in about an hour or so.

Cheers

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [April 4, 2006, 2:58pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/5 "2006-04-04T14:58:29Z")

</div>

here ya go bro this should do it.

---

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 4, 2006, 3:14pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/6 "2006-04-04T15:14:56Z")

</div>

Cheers mate, I will have a look at this in a bit, and see how it all works.

Chat soon fella, I get the new PC soon :).

You should have my email address, give us a shout sometime.

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [April 4, 2006, 3:19pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/7 "2006-04-04T15:19:11Z")

</div>

will do bro let me know if you have a problem.

---

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 4, 2006, 3:21pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/8 "2006-04-04T15:21:00Z")

</div>

I could have sworn this was suppose to be like so:-

\<param name=“movie” value=“trev.swf?framenumber = 2” /\>

I think your thinking the querystring, I have seen the source code where it looks like this where the flash movie is, so this should work in any standard html page as well but it does not seem to work

Any ideas ?

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [April 4, 2006, 3:36pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/9 "2006-04-04T15:36:52Z")

</div>

ya i see what you mean.

in that case you can just take the load vars part out…

```auto

		var gotoFrame = level0.framenumber;
		_root.gotoAndPlay(gotoFrame);

```

---

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 4, 2006, 3:46pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/10 "2006-04-04T15:46:16Z")

</div>

mmm, I have inputted this code and nada still not working.

Any advice to sort this pain in the \*\*\* problem out?

Cheers for the time 🙂

Getting there…

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [April 4, 2006, 3:46pm UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/11 "2006-04-04T15:46:54Z")

</div>

hehe once sec, let me make a dummy html file.

anytime bro

---

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 5, 2006, 9:09am UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/12 "2006-04-05T09:09:46Z")

</div>

Not that simple then :).

Let us know if you ever achieve it D ☹

Hear from you soon

Trev

---

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 5, 2006, 11:37am UTC](https://forum.kirupa.com/t/play-frame-1-if-flash-not-seen-before-else-frame-2-using-flash-and-asp-session/184325/13 "2006-04-05T11:37:53Z")

</div>

Well I figured it out, close and now it works at last.

In the flash

```auto

if (movie==1"") {
	vText = "No Value"
}

if (movie==2) {
	vText = "Some Value"
}

```

in the html page

```auto

<Param name="FlashVars" Value="movie=2" />

```

Hope this helps.

Trev
