Actionscript 3.0 :: Make A Swf Play Off Before The New Swf Is Loaded?
Jun 30, 2009
I want to have a 1.swf load into a container and when the user clicks a main nav button to load a new 2.swf into container I want the first 1.swf to play off and then the new swf to play on so it looks seemless. I have the code to do this with AS2, but it doesn't work with AS3.
I have a simple landing page here: www.epistage.sgIt simply reFUSES to play unless the user refreshes their browser....what to do?? My other flash sites have no problem and execute the functions I order them to as soon as its loaded?
I used the LoadMovieNum command to load an external .swf, however I am unsure how to make it play. I tried a "play" action and a "gotoandplay(1)" action, but no luck.
Can anyone let me know how to -
1.) get the .swf to play once loaded? my current script is -
on (release) {loadMovieNum("walls.swf", 1),2.) tell the .swf that is loaded to stop on a specific frame?
I have buttons with sound attached in over state and that works just fine, but this means that you are going to hear sounds only when you move cursor over button, how can i make some background sound to play from the moment flash is loaded, even when buttons are inactive, my background image looks like some electrical equipment and and i want to make it sound realistic (sound clip must to be set to loop) and must to start at the moment flash is loaded?
On my website: www.iferanart.com under the animations tab I have several animations that I embeded using Flash's premade option: "SkinOverPlay SeekStop.swf" player. The only change made to it was the color.My problem is that, as you can see when you go to the website and click on an animation, there are no play options at all.I have no idea what to do to fix this because when I publish preview they are there...but once I loaded the website to the server..nothing. The website is coded in AS3, built with Flash CS4.
my swf will only load once in internet explorer.. When you navigate out of that page and come back to it it won't play automatically anymore...I'm using FLASH CS4 and use the google swf code 2.2...here's the pageit used to be so easy just inserting it in Dreamweaver =/ but that wouldn't work either
I have music (.mp3) in a .swf file that I'm loading into another .swf. When I play the .swf containing the music alone the music plays, but when I load the same .swf into another .swf there is no music.[code]...
I have a Nav MENU with the usual about, services, portfolio buttons on press of those buttons a seperate SWF file is loaded into a empty movie clip named "container" what i want to happen is
e.g. on press of portfolio button it plays out the home SWF which is already loaded into empty movie clip,and then when the home.SWF has reached the end frame it will then load the new portfolio SWF into the same lets say the first 10frames of any of the external SWF are the unraveling of the movie then there is a stop(); function then the next ten frames are the re-packing (sorry for terminology) of the movie
swf that is at 30fps. So by default, it plays at 30fps. Is there any way using code I can slow down this subswf to play at 12fps...and not automatically go to the default of the root swf's fps?
I have a main movie called "all" inside that I have to external swf's loaded.
1 called "content"
2 called "scrolledContent"
I am trying to communicate between "content" and "scrolledContent". The problem is that when I publish "scrolledContent" it gives me an error.
1120: Access of undefined property animation. animation.play();
This is happening because the mc called animation is in the swf called "content", so it is not there until its loaded into my main stage with "content".
I just wanted to know if anyone knows how i can determine when an externally loaded SWF has finished Playing.... The swf i am loading cannot be edited so i cannot add any flags etc into it.... i load the swf into a new movie my_MC.loadMovie("OENAV3.swf"); and then i want to be able to see when that swf has finished playing....ie) all the way to the end of the swf....not just finished loading....
I built a pretty simple Flash movie for a client and put a preloader on frame 1. The preloader works fine then the movie plays. What is happening is if you go to another page on the site and then go back to the home page all you see is the preloader bar fully loaded but the movie doesn't play. You have to refresh the page for the swf to play again. It is doing it to me in Firefox but not IE 8 and it is doing it in IE8 on my clients computer...
Here is the code. stop(); this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);this.loaderInfo.addEventListener(Event.COMPLETE, onComplete); function onProgress(e:ProgressEvent):void{ var loaded:Number = e.target.bytesLoaded; var total:Number = e.target.bytesTotal; var pct:Number = loaded/total; loader_mc.scaleX = pct; loaded_txt.text="Loading..." + (Math.round(pct * 100)) + "%";}function onComplete(e:Event):void { gotoAndPlay(2);}
Here is a screen cap of what is happening. After you go back to the homepage all you see is the rpeloader bar fully loaded without the load text.
I have a movie, called box.swf that I'm loading into controller.swf.I have two buttons on the stage called pause_btn and play_btn that I'd like to use to control the timeline of box.swf.[code]
I've got loadMovie working and it loads a movie clip that has a stop(); on the first frame.At a certain frame within my main movie, I want to tell the loaded clip to play();My symbol is called "load1" without the quotes of course. It's an empty MC and on frame two my movie gets loaded into it. On frame three after a few seconds I have load1.play(); which I figure should work, but it doesn't!
I have a dynamically loaded movieclip. Inside of that, I have a movieclip (with a menu in it) that I want to play when the user clicks a button. I can't seem to get it to work.
I have a slideshow done in Flash. I have a main movie that has a slide on each frame of the movie, with navigation buttons. On each frame, I have AS2 that loads a different SWF per frame. The AS I'm using is:
loadMovie("Data/2.swf", "container"); stop();
The number "2" goes up/down based on the slide. I want a hard-wired number versus the frame number because my client is deleting/adding slides and it's easier to keep track of it hard-wired.
Right now, each slide I'm loading has its own play/pause toggle button that is this AS2:
on(release){ play(); }
So what I'd like to do is put the play/pause toggle in the main SWF (and put a graphic footer under all the buttons). So how do I tell the play/pause buttons to play/pause the MC that is containing the slide SWFs?
How does one control a loaded movieclip? After a series of SWFs are loaded they play automatically. I want them to play from the beginning each time they're displayed.
I have a movie clip that loads an embed sound file using actionscript. That works fine when the swf is executed on it's own. However when I load it from another swf (to level1) the swf loads and runs fine but the sound does not play. It's my understanding that the reference to the instance of the sound file is not properly resolved but I am not sure how to reference it in order to resolve.Here is the code.
sound_clip.swf I have a sound file that is exported to actionscript with "BG" as the identifier.In some frame in the movie I use the following code:
i made a little buffer script for dynamically loaded mp3s. it's supposed to play the file after 20% is loaded (these files are a couple of MB). anyway, it doesn't play after it's buffered to the 20%. works when i just test movie in flash. doesn't work when i test "streaming" in flash. here's my buff script, etc. let me know if you need anymore info...
I'm really at loss here (6 hrs straight and liters of coffee and i cannot indetify the problem) and I would REALLY really appreciate your help-- A LOT *sigh* Here's the scenario: I'm tying to build my new flash site as modular as possible (learning from past mistakes). Among others, I'm importing a MC containing all menu functions onto the main timeline via loadMovie(). This mcMenu.swf also contains the sound effects for the menu which are being attached via actionscript in the first frame:
i need a preloader to preload and external jpg. which i have pretty much working. however i need the following animation in the movie to wait until the jpg is loaed to play and i need the animation to play on top of the loaded .jpg
I have a main movie(main.swf). I've loaded a movie into it(loaded.swf). I need the loaded movie to finish playing once a button is clicked in the main.swf. So basically i need something like
when a button in the main.swf is pressed, finish playing "loaded.swf"
Why won't my sound play? It should play on MousOver and stop on MouseOut...
stop(); import flash.display.MovieClip;import flash.events.MouseEvent; var req:URLRequest = new URLRequest("squeeak.wav"); var sound:Sound = new Sound(); var controller:SoundChannel; function soundLoaded(event:Event):void{ [Code] .....
Im using loadMovie within a .swf on level 1 to load an external movie into level 2. But when this happens the sound function doesnt work. The 2nd movie being loaded has the newsound defined and everything within itself. It plays if i run that swf seperately or using ctrl+enter. Yet when the 1st movie calls the 2nd movie onto level 1 at runtime.The sound in the 2nd movie doesnt play. But its button sounds all seem to be working.