ActionScript 3.0 :: Splash Page - Using UnloadAndStop To End All MovieClips
Apr 1, 2011
I currently have a splash page which uses a variety of tweens to make an animation of a character running. The splash page also has music playing in the background and a small skip button (located in the corner) which is given the instance name "reelButton". I want the splash page to link to a loading page (file name "loading_screen.swf") I have created which uses a black background and an animation of a skull rotating. When I press the skip button, it does navigate to the loading page but the character running from the splash page and the music is still playing. I know its because I need to use the unloadAndStop command to stop all the movie clips from the splash page. But even with this it still doesn't seem to work.
Below is the code:
var contentLoader:Loader = new Loader();addChild(contentLoader);
reelButton.addEventListener(MouseEvent.CLICK, reel);
function reel(event:MouseEvent):void {
loadURL("loading_screen.swf");
}function loadURL(url:String):void {
contentLoader.unloadAndStop();
var request:URLRequest = new URLRequest(url);
contentLoader.load(request);}
View 6 Replies
Similar Posts:
Jun 8, 2006
Im trying to create a simple splash page that plays a video using the FLVplayback component. The problem is that it wont redirect the browser tot he homepage at the end of the playback.I've set up my FLA by putting an instance of the FLVplayback component in the only frame on the stage. I put another keyfram on a separate layer for actions and included the following actions (instance name of the FLVplayback component is videoIntro)
stop();
import mx.video.*;
videoIntro.contentPath = "masti.flv";[code].....
i seem to be able to reference the component correctly because i can set the contentPath. What im doing in that actionscript is identical to what i have seen in some tutorials.
View 2 Replies
Jun 20, 2009
I just want to stop all the sounds in the splash page. I don't need to give the user the option to start them again. The thing is only 20 seconds long. I just want them to be able to turn off all sounds for their convenience. I found this piece of code:
ActionScript Code:
import flash.media.SoundMixer;
SoundMixer.stopAll();
But how do I write the function/method?
View 1 Replies
Jan 11, 2010
I think I have to add getURL() on the last frame of the timeline, but it's not working for me.I have:[URL]
View 2 Replies
Feb 3, 2010
Client wants the audio from splash page to fade out in bg when user clicks enter button and leaves page and enters next html page? How to do this? WIth AS? Javascript? Does this file need to be embeded on both html pages?
View 5 Replies
Jul 23, 2010
Check out the link below, as you can see my overlay is hidden behind the flash element. However, the blue bar with the 'Continue' button appears above everything. Does anyone know what CSS changes I need to make so the overlay will appear above everything below it? The background loads an iframe.
[URL]
I can't add wmode="transparent" to the embed tag, since I have no control over the page loaded in the iframe.
View 2 Replies
Jun 19, 2010
i've made a splash page in flash but i want to have it looping till someone clicks on the button.Would this be possible with AS3?
View 3 Replies
May 19, 2007
Ive just finished a flash web site that ive used a lot of XML for loading my images from thumbnails. Its works great.
Except it takes maybe 3-4 minutes to load. I think whats happening is its loading all the images in that XML file before it even shows the first thumbnail, so thats like 2MB its loading.
Is there a way to preload all of the xml files at the start on my Flash splash page?
Here is the link to what im explaining.
[URL]
View 5 Replies
Jul 6, 2009
My website splash page is around 780x480 and the rest of the flash site is all 800x500. I'm not quite sure how to work this, but I want to have the splash page play automatically then go to the main page of the website. Can someone help me out with this? And does it matter that they are different sizes?
View 1 Replies
Dec 26, 2010
Below is the code that was was used to call swfs from a button click with unloadAndStop on the main timeline.All work but I have a dropdown menu that is inside a movieclip called wholeMovie_mc that also sits on the main timelinethe dropdown has two buttons that need to also call swfs and unloadAndStop the previous loads on the main timeline.I got the script to work without errors except it only removes the previous swfs from inside the wholeMenu_mc and not the main timeline.How can I get the code to unoladAndStop the swfs on the main timeline?code in RED is for the main timeline
gotoAndPlay("home");
var my_loader:Loader = new Loader();my_loader.load(new URLRequest("swfs/home.swf"));addChild(my_loader);
[code]....
View 11 Replies
Oct 25, 2003
I have an asset management system which loads a bunch of external swfs, and when requested distributes copies of those swfs to other parts of an app (it creates instances of the classes to do this).Anyway, when I use these loaded swfs somewhere and then remove them Flash does its trick of leaving the sounds running (as they are triggered by timers).If they were Loader class items I could use .unloadAndStop() to shut them up and get them garbage collected, but they aren't of course.I thought I might be able to extend the Loader class and set the .content my self - which I have done by overiding the content getter in Loader. I was hoping I could then use unloadAndStop on that class but nothing happens. I've tried casting my fake Loader to a Loader as well and no joy.
View 4 Replies
May 25, 2011
I'm using a loader to load an external swf. This swf has video content. In the past when I removed the swf with unloadAndStop(); if the video was playing in the external swf, it would stop. Has things changed? Here is the code:
Actionscript Code:
SWFclose_btn.addEventListener(MouseEvent.CLICK, closeITAct);function closeITAct(e:MouseEvent):void{ suLoader.unloadAndStop();}
[code]....
View 2 Replies
May 22, 2010
I'm trying to unload an swf that takes up the whole screen by adding a listener on the holder_mc, which is what is holding the swf but it doesn't seem to be working. If you guys could, take a look at my code. Do I need any code in the swf that is being loaded in for it to close?
var swfLoader:Loader = new Loader();
slideshowimages_mc.one_mc.addEventListener(MouseEvent.CLICK, oneClick);
function oneClick(event:MouseEvent):void
[Code].....
View 17 Replies
Aug 24, 2010
I have a .swf containing a FLVPlayback components that includes a FLV movie.I'm loading this .swf in a main flash project using a Loader(). When I try to unload the .swf using myLoader. unloadAndStop() the FLV inside the FLVPlayback still playing (I can't see it, but I'm still listening his audio).How could I unload nicely a .swf that inside it has a FLVPlayback component?
View 3 Replies
Jan 23, 2011
I am making a flash website that loads 20 external swf files and I am having problems unloading them. after many tests I noticed something strange : When looking at the memory load of the browser in the task manager, I can see that each swf file will add memory load the first time it's loaded (which will remain even after calling unloadAndStop), that memory load will double the second time the file is loaded but after the second time the memory load does go down when unloadAndStop is called.
I tried a bunch of things but I can't seem to find the right thing to do. I tried removechild before calling unloadAndStop and the memoy load was only going up. Since those external files have many HD images, each one adds around 100mb of memory so it's a very big problem.
View 13 Replies
May 1, 2011
I'm making a book/magazine with EZFLAR and Flash, but I was going to need a lot of markers (and they become indistinguishable by FLARToolkit the more they are), so now I'm trying a different approach: just three markers and then, load a different SWF that triggers different actions for each marker.
To do so, I made a loader.swf that will be in charge of loading any of the specific swf depending on what the user clicks. I started with my first button and it loads fine, just it has two problems.
First problem, and not so important, is that I can't seem to add anything over the webcam stream, not even placing it on the EZLFAR.fla, the webcam always covers everything. I decided, then, to add a little margin where I can place a UI (maybe a back button or the other swf loaders).
[Code]...
View 1 Replies
Mar 24, 2011
unloadAndStop () is really a cool function especialy for unloading and loading same external clip, however due to the client needs, I need to export my flash as FLP 9+ Therefore, I can`t use unloadAndStop (), and my only option is to use unload(); unload () is not that good. Clip gets unloaded, but sound remains. if I kill the sound, and start it again when clip loads, it will start on the same place where it begun. I can "kill it forever" with SoundMixer.stopAll (), but that does not allow me to start the sound again.
View 4 Replies
Aug 17, 2011
I'm using flash builder with the adobe AIR player, when I load an swf that loads another swf within itself then later run swfLoader.unloadAndStop() it removes everything but the swf that was loaded within the other swf.
View 0 Replies
Jun 30, 2009
So I was reading in to unloadAndStop a little bit and found out this is the exact thing I need when loading my external swf's which have sound on them. I am new to AS3 so please bare with me. I believe I understand it when applying it to loading one single swf. But I have my site set up a little differently by using a universal button for my links. How could I apply "unloadAndStop" as a universal function to when any button is clicked the previously loaded swf unloads? I also had a question about fading the swf's in and out. I'm pretty sure from what I can remember that I can add the fades right in to my AS3 below instead of having to add them to each of the external swfs right?
Code:
var Xpos:Number = 35;
var Ypos:Number = 260;
[code].....
View 1 Replies
Mar 9, 2011
I know the Loader's class unloadAndStop() supposes to unload and stop everything on a SWF's stage when I load one, but does it also changes objects within the library (even if they are not on stage?).I'll tell my problem to clear it up. I am loading SWFs dynamically into my application and extract required symbols from them using applicationDomain and getDefinition. The stage of the SWF/FLA I am loading is empty, and all I have are exported symbols in my library.
The problem happens when I load symbols which have pre-compiled clips inside of them (in my case, a Partigen emitter, but I don't think it really matters), which probably has event listeners or timers - the code on these clips stops working and acts weird. I assumed unloadAndStop removes a required event listener from it, but not sure why (again, it's not on the stage). I am forced to use unloadAndStop on my loaders, since my designers put all their assets on the stages in numerous FLAs and now going back and changing it will cripple the company's work.
I'd write my own kind of unloadAndStop that filters these pre-compiled clips or checks what's truly going on there, but I am pretty sure that unloadAndStop does things which are unavailable through the API.
View 9 Replies
Feb 17, 2011
I have a loaded swf which contains sound on its frame. Even though I have unload it, the sound still playing. I cannot get rid of it. I've tried:
- _loader.unloadAndStop();
- SoundMixer.stopAll();
- System.gc();
View 1 Replies
Jul 24, 2009
I have been using the new unloadAndStop() function to unload some loaded SWFs after they are no longer needed. This has been working fine whilst testing in flash, and when I have tested it using firefox. However, to my utter horror and despair unloadAndStop() seems to be crashing safari and IE8. I haven't tried IE7.
After replacing unloadAndStop() with the old unload() the crashing stopped. So I am certain this is the problem. unloadAndStop(false) also caused flash to crash. No error was displayed.
This project has been 7 months in the making and involved a lot of hard work in the evening and weekends. I noticed that it was starting to lag after being in use for a while because SWFs weren't being released from memory. When I say lag as well, It's not like normal frame rate slowing down lag, the whole application will simply freeze up for a couple seconds, and the freezing lasts longer the longer the app has been running. I have gone through and made sure to null almost every variable myself, and null any variable in the loading swf that points to anything in the loaded SWF. It appears to be working now using the old unload() function, but will need more testing to be sure because the lagging only turns up after the application has been running for about 45 minutes and has loaded and unloaded several SWFs.
Anyway, is there anything that I can do about this or am I missing something obvious? I haven't found any other posts about this, has anyone else had this problem? Why does god hate me so much?
Sort it out please Adobe, I really don't think it should be this hard to get rid of a loaded SWF. If you were in front of me right I would be screaming at you.
View 3 Replies
Jul 8, 2011
have a flash 'menu' swf that on the click of a button loads into a loader a flash 'controller' swf. This swf in turn loads into a loader a 'captivate 5' swf. All published to fp10.exit the captivate movie the user can click on the menu button (which resides on an area of the 'menu' swf below it), and I have coded to UnloadAndStop and StopAllSounds of the 'controller' swf loader.his works, everything goes, the loader 'unloads' and it does stop the sound of the current captivate slide, but then audio from the captivate movie will fire up again from the next slide and continue to play over the menu
View 24 Replies
Feb 12, 2012
I have a presentation that has 3 chapters. I've built functionality so that you can load each individual SWF chapter with a loader called singleLoader. I've also built in functionality so that at any time, you can hit the down arrow and it will unload those movies. I have a separate button that allows you to loop through all 3 chapters. They'll just play one after the other. The problem with this approach is that there are 2 different loaders and if I unload one of the chapters and try to start the looping, I can hear the audio, but I can't see the movie.Here's the first loader:
Code:
var thisLoader:Loader = new Loader();
thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);[code].......
View 6 Replies
Mar 10, 2009
We have been developing a production in Flash CS3 for the past month.We were experiencing problems with memory leaks in Flash Player 9 and it was recommended that we upgrade to Flash CS4 and Flash Player 10 so we could use the new unloadAndStop() method to unload assets from the production.
On upgrading to FP10 we were able to solve our memory leak issue. But on doing so, the upgrade introduced a new problem into our production. Some of the methods that worked in FP9, now do not work in FP10. Nothing in the code of the methods has changed.
Is anyone aware of any bugs in FP10 or any differences in the coding that is needed to do tasks like reference the stage, create event listeners, etc?
View 1 Replies
May 23, 2010
I am having a problem stopping external swf from playing. I am currently using FlashCS4 and publishing to Flash Player 10. I would really like to use the code loader.unloadAndStop();" to stop the swf. I tried using it but I keep getting the following error: 1061: Call to a possibly undefined method unloadAndstop hrough a reference with static type flash.display:Loader.loader.unloadAndstop();I read somewhere that since the swf files were published in Captivate (also using Flash player 10) I have to load the swf into a flash movie clip first then try the loader.unloadAndStop code. where to put that code or what I'm doing wrong? And please be very detailed, I am new at this and have little experience.
ActionScript Code:
fscommand("allowscale","false");
fscommand("showmenu","false");
[code]....
View 0 Replies
Apr 25, 2010
Been told as part of a university assignment i need to have a 30secs introductry Splash screen?What is a splash screen? how to make them?
View 6 Replies
Apr 29, 2004
I have some rain that falls and hits an instance of an MC called Pavement. I want it to create and MC called Splash (The name in the library).
Code:
if (hitTest(_root.Pavement)) {
i ++;
duplicateMovieClip(_root.Splash,"Splash" + i,1);[code]........
View 2 Replies
Jul 26, 2011
how does pagination work? Is that I just need to create several Movieclips for each page and then add the contents into pages seperately?? Or is there any available tutorials??
View 2 Replies
Jan 26, 2009
i'm trying to build a flash site and ran into a problem... i have a gallery page with a bunch of page numbers at the top. when you click on one, a movieclip loads of some images coming in.so the problem i'm having is that i made a little animation for when you roll the mouse over the page number (they scale up when the mouse is over, scale back when the cursor moves away)... what it's doing is when you roll over, it goes to a certain frame in the timeline and plays that animation.that's all working cool, but i need it to not do that once it's clicked on. so basically when you actually click on a page number, the over script should stop until you go to another page... here's the code i've written,
function over(event:MouseEvent):void {
this.gotoAndPlay(30);}
function out(event:MouseEvent):void {[code].....
View 0 Replies