Play Intro Once Per Visit
Hi there,
I have searched around for a bit and can't find a solution...
I have a flash intro that is supposed to play once an the first visit in a SESSION. Once the visitor navigates away and then returns to the page that the flash is on, we want to go straight to the last frame. If the users ends the session and then comes back to the site, we want the flash intro to play again. Below is the code that I have their now, but I can't figure out how to clear the SharedObject at the end of the session.
Code:
var my_so:SharedObject = SharedObject.getLocal("animationPlayed");
if (my_so.data.played == undefined)
{
my_so.data.played = true;
my_so.flush();
}
else
{
gotoAndStop(230);
}
SitePoint > Design Your Site > Flash and Actionscript
Posted on: Oct 1, 2007, 17:15
View Complete Forum Thread with Replies
Sponsored Links:
Play Flash Intro Only Once Per _Domain_ Visit
Can any one point me to a tutorial that shows how to do what the title above says (OR how do delete sharedObject files on user's computers) using sharedObjects or javascript?
I want the user to be able to see the intro only once, but if he closes the browser or leaves the domain, then I want it to replay. But if he is browsing through pages within the domain, I want the intro not to play again until he leaves domain or closes browser.
I've succeeded in getting the sharedObject to be stored so it only plays once, but I don't know how to make it delete that object on leaving domain or closing out web browser so I can see it again when I revisit the domain.
I also see some stuff on the web about deleting SO's but it doesn't say what action invokes the deletion, where do I put the code in my Swf, etc...
View Replies !
View Related
Play Flash Intro Only Once Per _Domain_ Visit
Can any one point me to a tutorial that shows how to do what the title above says (OR how do delete sharedObject files on user's computers) using sharedObjects or javascript?
I want the user to be able to see the intro only once, but if he closes the browser or leaves the domain, then I want it to replay. But if he is browsing through pages within the domain, I want the intro not to play again until he leaves domain or closes browser.
I've succeeded in getting the sharedObject to be stored so it only plays once, but I don't know how to make it delete that object on leaving domain or closing out web browser so I can see it again when I revisit the domain.
I also see some stuff on the web about deleting SO's but it doesn't say what action invokes the deletion, where do I put the code in my Swf, etc...
View Replies !
View Related
Play Once Per Visit
Hi,
I have a flash animation that plays on the index page.
My client wants it to only play when someone first gets to their site. (each visit)
So if they go on to the contact page and then back to the homepage, the flash movie will stay on frame one.
Hope that explains the question.
Thanks
View Replies !
View Related
Getting Flash To Play Only Once Per Visit?
I saw this question answered once long ago, but I lost it...
I have a site with a homepage Flash intro (actually, it's only a sound embedded in a small square swf file). How can I make it so that a visitor doesn't have to be subjected to the Flash sound every time they go back to the home page?
I haven't seen an example of this, so I don't even know if it's possible...
Thanks in advance!
View Replies !
View Related
Play Once Per Browser Visit
Hi I have created a flash piece I have placed on my companies web site however want it to play only once per browser visit. This is the code I places on frame one to make this happen:
replay = SharedObject.getLocal("save");
if (replay.data.name == undefined){
gotoAndPlay(2);
replay.data.name = "played";
} else {
gotoAndStop(422);
}
But now my movie is doing all kinds of stange things and wont even play. What can I do to make this happen?? Please help!! Thank you for taking the time. )
Here is the site: http://www.aspenhome.net/
Just skip the splash page and it is the black boxed area on the home page.
Thanks again,
Shay
View Replies !
View Related
Swf Header To Play Once Per Visit
Well, I have done some searching to try and find a way to do this, but I have not found much info on this and wanted to know if anyone on here may know of a solution to this. I have created a swf header and the client now wants it to play only once per visit to the site. Is this possible and if so, has anybody seen any tutorials or any simple scripts that can be added to make this happen?
View Replies !
View Related
Setting Cookies To Play Only Once Per Visit?
Hi, I've been searching this site looking for sample code that will allow me to set a cookie with javascript or asp to instruct Flash.
I have an index page with three small swf animations and the client only wants them to play the first time a visitor comes to the homepage. If they return back to the homepage, they want the animation to not play again. If the visitor returns tomorrow, we'd like the animation to play again.
Are cookies the best way to go and can somebody point me to a script that would work for this? Many thanks in advance...
View Replies !
View Related
Make A Movie Only Play Once Per Visit
Hi guys,
I've been looking at ways to make it so a flash intro movie only plays once per visit to the site.
Is there a way to do this using actionscript/flash only or must i do it with a scripting language like php?
I'm a total n00b when it comes to actionscript so sorry if it's a dumb question.
TIA
Joe
View Replies !
View Related
How Do I Set My Flash To Play Only On First Visit To Index.html? :
Is there a way that once a movie has played and unloaded that if you bounce to a non-flash page (i.e. HTML (.htm/.asp) page) that when you back to the page it won't play that movie again.
I know it would be easier remaining in flash the entire time.
The movie I've loaded is an intro that I don't want played everytime a user hits the index.php again. Only the first time.
Thanx.
View Replies !
View Related
Flash On The Top Page To Play Only The First Visit In A Session
I have a small Flash movie contained in my home page that I would like to be played only when the user lands the first time (all subsequent landings will display a static image) ...so if the user hits the back button they will see the image NOT the animation. or if the user hits the home button in the site, they will see the image NOT the animation. If the user leaves the site and comes back, I would like to show the animation again.
Do I need to use a cookie or something? Please help,
thanks,
Liz
View Replies !
View Related
Window Open First Visit, Closed Next Visit
If I had a window in flash, say an external swf, is there a way to have this not visible the second time you visit the site?
I have some info you would only read once, if possible I would like it to be in a window, when second visit only the top bar is visible to open it if you want to. Not so it disapears altogether but the window is closed.
thanks for any suggestions
View Replies !
View Related
INTRO Play Once HELP
Need to know in detailed listing on how to make an intro/swf file play once after you have been to the site.My personal website has a flash header and I only want it to play once.
If you hit the home button, it plays the header again. And if you close the browser and goto the site again, it plays the header again. Is there anyway to stop this?
Please be detailed in explaining how to do it! I have searched about 14 pages of intro help on this site.
Thanks ALL!
View Replies !
View Related
Using Framesloaded To Play Intro Only Once
I'm using MX2004 Pro on Mac OS 10.3.6. I have a .fla with two scenes: "preloader" and "main". "Preloader" is Cathode's Bytes-Loaded preloader. "Main" has an animation, then stops on a frame with buttons, etc. Both scenes work perfectly.
Now, I am trying to make it so the "main" scene only plays through once, and every other time the page loads, it skips the animated part and goes straight to the label "nav" in the "main" scene.
Instead, the preloader still works fine, but it skips to the "nav" label regardless of whether the animated part has played through once or not.
Here's the framesloaded code on the first frame of the "preloader" scene:
code:
if (_framesloaded==_totalframes) {
gotoAndPlay("main","nav");
} else {
gotoAndPlay(1);
}
Do I need to use something else besides _framesloaded? Something about detecting the cache? Would adding a label at the beginning of the animation help? Thanks!
View Replies !
View Related
[F8] Intro Animation Play Once
I've seen this done, but not sure how it's created. I would like to be able to create a Flash intro animation. This animation will be placed on the index page. I only want this animation to play once, so if you click around to other subpages and go back to the home page, the intro animation will not play all over again on that computer. I'm sure it could play much later in the day or the next day etc. I just don't want it constantly playing every time you click reload or click back.
View Replies !
View Related
Cookies To Only Play Intro Once?
Hi guys...
I've got a short intro on the main page of my website that plays everytime you load the page. It's actually just a header at the top of the page: http://www.velocipixel.com/home/index.php
I only want it to play the first time you view the page. After that I want that same page to embed a different flash movie that simply has a "replay" button in it with my logo. That second movie would then replay the intro only if the visitor clicks it.
I believe this can be done using cookies somehow. When the person hits the index.php page a cookie would be created saying they viewed that page. The page would then have to check for that cookie and somehow include the code for either the intro swf or replay swf.
I understand the concept of how it should work but don't know the correct code to use. Any ideas folks? Some sample code would be great!
View Replies !
View Related
Play Intro For 1st Time Users Only
Does anybody know of a way or technique in FLASH MX to Play Flash intro only for first time users?
In other words i have someone who wants to play the animation 1 time for the first time user for that day.
I've tried to set cookies but the problem with that is when you hit the back button it plays again anyway.
any tips would be greatly appreciated.
Thanks
RegGFX
View Replies !
View Related
Can You Play An Intro Sound Then Loop Another One?
G'Day Guys,
Long time no post!!
I am trying to import two music files into my movie such that when the movie loads the 'intro sound' plays once over, and then following the completion of the 'intro sound' my other sound file which I would like to loop starts up, but I don't know how to do it
Any ideas?!
Thanks,
Nick
View Replies !
View Related
Button To Play Outro Before New Intro
I am building an animated menu in CS3 using AS 3.0. I have a menu of four buttons. For simplicity, let's say A_btn,B_btn,C_btn and D_btn
Now on the timeline I have labels that have intro and outro animations for each.
Let's say the lables are labled: Ain, Aout, Bin, Bout, Cin, Cout, Din, Dout
Ok, so I have the buttons all playing the intros just fine. How do I get them to play the outro before moving on to the appropriate intro? Note: each intro and outro is completely different and independant. In other words, I'm not using the same transition for each one.
Here's a link to a test project file that shows the buttons playing the intros.
Click Here to see example
Here's the current AS3:
*****************************
stop();
function onHomeClick(evt:MouseEvent):void {
gotoAndPlay("Ain");
}
home_btn.addEventListener(MouseEvent.CLICK, onHomeClick);
function onAboutClick(evt:MouseEvent):void {
gotoAndPlay("Bin");
}
about_btn.addEventListener(MouseEvent.CLICK, onAboutClick);
function onWorkClick(evt:MouseEvent):void {
gotoAndPlay("Cin");
}
work_btn.addEventListener(MouseEvent.CLICK, onWorkClick);
function onContactClick(evt:MouseEvent):void {
gotoAndPlay("Din");
}
contact_btn.addEventListener(MouseEvent.CLICK, onContactClick);
**************************************
I tried adding this after stop and before function, but it doesn't do anything.
var gotoA:Array = new Array();
home_btn.addEventListener(MouseEvent.CLICK,f);
function f(e:MouseEvent){
gotoA.push("Aout");
gotoAndPlay("Bin");
}
Any help would be appreciated.
Thanks.
View Replies !
View Related
SharedObject, Using It To Play An Intro Animation Only Once
Hi all,
Having some difficulty getting my sharedobject to operate. All I am trying to do is have my intro animation play only once, so that I can use the same swf on multiple pages without showing the intro animation every time.
If the 3rd page was viewed first the intro animation would play but then if the 2nd page was viewed the intro animation would not play (because it was already played on page 3).
My code:
logoload = SharedObject.getLocal("logoload1");
if (_root.logoload.data.logoloadvar == undefined){
_root.logo_mc.gotoAndPlay(1);
} else if (_root.logoload.data.logoloadvar == "logoseen") {
_root.logo_mc.gotoAndStop(31);
}
stop();
//_root.logo_mc //My trigger to say the intro has been played
computer = System.capabilities.os;
_root.logoload.data.logoloadvar = "logoseen";
_root.logoload.flush();
stop();
File here
http://users.ncable.net.au/~timfranc...red_object.fla
If someone could please help would be much appreciated.
View Replies !
View Related
Play Flash Intro Once Every 1 Hour
I have two header flash flies that I would like to add to my home page.. When the user first visits they will get the intro then into the standard flash header. However if the user visits back to the home page I only want the Standard header to play, and not the intro..
View Replies !
View Related
Play Outro Of Swf B4 Playing Intro Of Next Section
I'm just wonder how, because I have lets say 5 transitions and each swf has an intro and an outro, and I want to make it so if you click lets say wallpapers, theres a little loader at the bottom right of the screen that preloads the wallpaper transition, without yet playing the outro of the current transition your in (home lets say), Is it possible to script it so that when flash detects that wallpaper transition has fully preloaded it will play the "outro" part of home and than play the intro part of wallpapers to create a seamless transition
-cheers , n crap i forgot my old username
View Replies !
View Related
Play Outro Of Swf B4 Playing Intro Of Next Section
I'm just wonder how, because I have lets say 5 transitions and each swf has an intro and an outro, and I want to make it so if you click lets say wallpapers, theres a little loader at the bottom right of the screen that preloads the wallpaper transition, without yet playing the outro of the current transition your in (home lets say), Is it possible to script it so that when flash detects that wallpaper transition has fully preloaded it will play the "outro" part of home and than play the intro part of wallpapers to create a seamless transition
-cheers , n crap i forgot my old username
View Replies !
View Related
Play External Loaded Movies Outro Before Next Intro
For anyone thats been following my many questions, lol...what I have now is a main nav movie, with a few external clips that load when you click certain buttons.
Heres the code I'm using to load my movies
ex: if you clicked the 'news' button...
on (release) {
loadMovieNum("news.swf", 5);
}
That works fine, but when I click a different button (say 'links') the first movie disapears and the second one loads.
Thats great as well, but I want to have some kind of a fading outro on the first movie.
So what I need is a way to tell whatever movie is open at the time to play its outro (a fade out) whenever the user clicks a different button.
-thanks
View Replies !
View Related
HELP Creating Play Intro Button, Should I Use On(release) GotoAndPlay (frame); ?
ok, i have three scenes one
called requirements for my requirements page which includes the buttons enter site and play intro.
next is my preloader scene which has my preloader
and finally the third scene is the movie called scene1
thus three scenes
#1 requirements
#2 loader
#3 scene1 << which is the movie
what action script should i put on the button..to cut to scene 2 to load and then play the movie.
[play intro button] << what action script do i add to this.
i have tried this on(release){gotoAndPlay,loader(1))};
help
View Replies !
View Related
Forcing A Preloader To Play The Intro Before It Loads The Main Movie.
Hi,
I am using a script I found at http://www.sonify.org/home/feature/r...ges/page4.html for preloading my movie, which contains a lot of sound objects located at http://www.speakerson.net/project/start.html. The main movie is loaded into a movie clip holder called "sonicMapHolder".
It works like a treat ...
However I would like to apply one modification, that is to play the whole intro every time before the main movie loads. The intro is located in a movie clip called "textintro".
Can I do it easily?...
Thanks in advance!
Gayeta
View Replies !
View Related
Uploading Flash Intro To Play Before Home Page In Dreamweaver
I'm new to Flash CS3. I'm trying to figure out how to make my flash intro to my website play before it takes me to my home page in Dreamweaver. In other words, the flash intro plays and then automatically goes to my designated home page.The intro is the first thing you see. Do I set that up in Flash or Dreamweaver? Detailed instructions needed.
thanks
View Replies !
View Related
Forcing A Preloader To Play The Intro Before It Loads The Main Movie.
Hi,
I am using a script I found at http://www.sonify.org/home/feature/r...ges/page4.html for preloading my movie, which contains a lot of sound objects located at http://www.speakerson.net/project/start.html. The main movie is loaded into a movie clip holder called "sonicMapHolder".
It works like a treat ...
However I would like to apply one modification, that is to play the whole intro every time before the main movie loads. The intro is located in a movie clip called "textintro".
Can I do it easily?
Thanks in advance!
Gayeta
View Replies !
View Related
Forcing A Preloader To Play The Intro Before It Loads The Main Movie.
Hi,
I am using a script I found at http://www.sonify.org/home/feature/r...ges/page4.html for preloading my movie, which contains a lot of sound objects located at http://www.speakerson.net/project/start.html. The main movie is loaded into a movie clip holder called "sonicMapHolder".
It works like a treat ...
However I would like to apply one modification, that is to play the whole intro every time before the main movie loads. The intro is located in a movie clip called "textintro".
Can I do it easily?...
Thanks in advance!
Gayeta
View Replies !
View Related
Help-intro Not To Play If A Visitor Goes To Another Site And Then Comes Back To Site
Hi there!
I will have either a flashvideo sequence or flash animation playing as an introduction to flashsite. Now my client would like it to play that video only once and never again-that's not a problem. But what he also wants is that the video won't play if a visitor goes to another site and then comes back to his site in lets say 5 min. Also he would like to not have the video play if a visitor hits the refresh on their browser while visiting the site. Does anyone know how to solve this-I guess you would have to use some sort of javascript combined with actionscript? I'm kind of intermediate when it comes to actionscript and hardly knows any javascript... It would be very interesting to find out how this would work...
Niklas
View Replies !
View Related
Flash Video: Play Intro Before Video
Hey guys, first post, and already i'm requesting something, sorry about that. I wish to give a big thanks to Lee and all the users helping out here, being a total newb at actionscript, I found alot of useful tips and tuts. Ok now to the point of my request.
I created a custom player following the video basics (which is a great tut by the way), now what I would like to do is that each time someone plays a video on my website, they have this short 2 second intro play first, and then have the actual video start playing, and when it reaches the end, have the player return to the start of this video and stop, so that people don't have to watch the intro a 2nd time (unless they go and play another video, or leave and come back).
So in other words, have 2 flv files, one for the intro and one for the video, just so I don't have to edit each of my videos manually to add the intro, before encoding them. I thought of using a XML playlist, the problem is that i'm loading the videos dynamically through flashvars so it wouldn't be practical.
Hope this makes sense. Any help at all with this would be greatly appreciated. Thanks in advance!
View Replies !
View Related
First Visit: 1.swf. Second Visit: 2.swf
Hello,
I have 3 external movies that I would like to play in this order.
first time someone visits the site they get 1.swf
second time they visit the ste they get 2.swf
third time they visit the site they get 3.swf
and everytime after that they get the same pattern 1, 2, 3.
I've searched but not found the answer to this. Does anyone know how to do that? I think it would involve a session or cookie or something...not sure.
any help is greatly appreciated!
Thanks,
Caberz
View Replies !
View Related
Detect First Visit?
Well I have a little problem again I wonder if it's possible to only let a little intro see when the visiter of my site visits the site for the first time that day?! Is that possible?
Grtz
Joost
View Replies !
View Related
New Site (plz Visit)
hey, me and my friend have just started a flash movie making site, and we need some ppl to look at it and criticize. We've only been doing Flash for a week, so we only have made a few movies, and basic games (mostly tests)
If you'd like to host movies, hit us up on the E-mail address on the site.
View Replies !
View Related
New Image With Each Visit
Hello,
I'm looking to have the main image of the site i'm building change each time a user returns to the site. Not a slide show, but a static image that would change on a user's next return. Maybe 5 images in total.
Do I create a single .swf with 5 scenes & add the appropriate actionscript? Or do i need to make 5 individual .swfs and have the actionscript for the movieclip call those files?
Appreciate your help.
thedubc.
View Replies !
View Related
Virtual Visit
Hello, does anyone know how to make a virtual visit in flash ??
i mean to have some controlers or from the keyboard and when you move right or left up or down... you can see the rest of the image.. i don't know if you understand
I think you can make it if you have an oversized image and a smaller square as mas in the center.. and as you click on the controller buttons or keyboard.. the mask moves and you can see the rest of the image.. hope understand what i mean ...
heres an example of what i want but in flash ..
http://www.thehidingroom.com
any tutorial or a fla..
thanks.
View Replies !
View Related
Virtual Visit
Hello, does anyone know how to make a virtual visit in flash ??
i mean to have some controlers or from the keyboard and when you move right or left up or down... you can see the rest of the image.. i don't know if you understand
I think you can make it if you have an oversized image and a smaller square as mas in the center.. and as you click on the controller buttons or keyboard.. the mask moves and you can see the rest of the image.. hope understand what i mean ...
heres an example of what i want but in flash ..
http://www.thehidingroom.com
any tutorial or a fla..
thanks.
View Replies !
View Related
FMX 2004 Intro - Why The Full Intro Is Not Coming
Using FMX 04 in win 2000, i have designed this short intro for a website. beyond a certain frame the animation loops, whereas the animation was supposed to stop on a particular key frame
have a look at the source.
www.360in.com/testing/intro.zip
Am I doing something wrong or is Flash is behaving wrong?
View Replies !
View Related
|