ActionScript 2.0 :: Pre-loading One External Clip While Another Plays
Jul 8, 2004
I am going to have a single page, with a 6 minute sound clip looping (don't ask - sort of a for-fun site I am doing at work). I have broken the clip down into 12 smaller clips to reduce file size, and I want to have a random clip play each time a user refreshes, but then have the clips play sequentially from wherever they start (e.g. randomly start with clip 10, then play 11, 12, 1, 2, etc.). I have created 12 different flash files, each with one of the sound clips.
I am using the randomize script found here, which is working fine:
[URL]
On the last frame of each of the 12 files, I am loading the next movie. For example, clip 1 has:
Code:
loadMovieNum("clip2.swf", 0);
Everything is working, except I want to have the next sequential sound clip loaded while the current clip is playing, so that the sound plays smoothly with no interruptions. Right now there is a slight pause between each clip.
I have looked through a lot of the pre-loader scripts and posts, but I don't want to have any sort of obvious pre-loader if I can avoid it (no "loading" bar, etc.). I also was not sure whether I should be putting the code on the main file, or on each of the 12 files (which seems more likely).
Also, if there is an easier way you can think of to do this, that would be great as well (the main reason I separated them into separate .swfs is because I thought it would load quicker when the user first gets to the page).
View 7 Replies
Similar Posts:
Aug 15, 2011
I am going to have a single page, with a 6 minute sound clip looping (don't ask - sort of a for-fun site I am doing at work). I have broken the clip down into 12 smaller clips to reduce file size, and I want to have a random clip play each time a user refreshes, but then have the clips play sequentially from wherever they start (e.g. randomly start with clip 10, then play 11, 12, 1, 2, etc.). I have created 12 different flash files, each with one of the sound clips.n the last frame of each of the 12 files, I am loading the next movie. For example, clip 1 has:Code:loadMovieNum("clip2.swf", 0);Everything is working, except I want to have the next sequential sound clip loaded while the current clip is playing, so that the sound plays smoothly with no interruptions. Right now there is a slight pause between each clip.
I have looked through a lot of the pre-loader scripts and posts, but I don't want to have any sort of obvious pre-loader if I can avoid it (no "loading" bar, etc.). I also was not sure whether I should be putting the code on the main file, or on each of the 12 files (which seems more likely).Also, if there is an easier way you can think of to do this, that would be great as well (the main reason I separated them into separate .swfs is because I thought it would load quicker when the user first gets to the page).
View 2 Replies
Jun 14, 2010
I am importing a movie clip as a symbol from a SWF using Embed to a AS3 program and, after attaching the movie clip to the stage, the movie clip keeps repeating. Before you ask I have indeed creating a script layer and put a "stop()" on the last frame. In fact the swf containing the symbol works perfectly fine when executed on its own or in Flashdevelop (my choosen IDE). Its only when imported does the clip keep repeating.Here is the code:
Code:
package {
import flash.display.*;
[code]......
View 2 Replies
Nov 9, 2010
load external .swf movie and I need it to be duplicated as many times as it is pointed in a variable.i have been try some scripts that not work
View 1 Replies
Jan 7, 2010
This used to be so easy in AS1 and AS2, but since I haven't been using Flash in 2 years now. looks like time ran over me - and it looks like it'd take me a while before I figure this out in AS3. So, what I want to do is to call external swf into another movie clip and my stage is set like this.
In main timeline I have two layers:first is (center_mc) and contains movie clip "center_mc" which is positioned in the middle of stage and in the second layer (mbottom_mc) is movie clip "mbottom_mc" that will contain buttons as "menubtn01". So what I Want to do is when I click on this "menubtn01" to call external swf into THAT movie "center_mc". So to clear the external swf that "center_mc" is showing with the new.
View 3 Replies
Sep 4, 2009
I have a "loader.swf" after which my "main.swf" loades. I have used a loaderPro v3 (AS2) component. Doing that was easy but then when it starts loading, even before the loading completes the main.swf starts playing in the background. And i have no coding in my actions panel.
View 5 Replies
Aug 31, 2009
I have this script to load external swfs to the stage. But I want to load them into a empty clip called "emptymc".I know I need this: MovieClip.addChild(Loader);But not sure where to place it.
Code:
package
{
[code]....
View 7 Replies
Feb 15, 2012
Last time I wanted to load an external clip I could do it like this on (release) {
[Code]..
So now I want to achieve exactly the same thing in AS3, I have been looking at examples on the web but am getting all sorts of errors and basically don't know what I am doing. I also want to know how to navigate to .swf files in a file structure, as I have to build an old school fscommand file structure for a cd-rom.
View 2 Replies
Jan 14, 2011
I'm trying to make a Flash website that contains a Flash Store (loaded as an external SWF.)
I have set my pages up in a movie clip file called pages_mc. Each desired page is has its frames labeled (ie: "HOME," "PRODUCTS," ect�)
I need to know how to load the SWF titled, flashshop_plugin.swf onto the "PRODUCTS" page of pages_mc.
What is the best way to do this? I've tried a number of things, which have resulted in the external SWF not loading or having it load, but not go away when another page is selected. I'm assuming I would use add/remove child for this? Just not sure how and accompanied by what other code.
PS: The Flash Shop template I am using suggested using the following code to import it:
[Code]....
View 2 Replies
Jul 22, 2006
I am trying to loadmovie a external swf within a movieclip in the main flash document but nothing shows up, why is that?
View 12 Replies
Dec 19, 2007
i don`t know how i got back to the basics but i am having a problem with a preloader. What i do... I have an empty movie clip that loads an swf after a user make a button choise. So after the user choise i make the preloader._visible = true; and in the preloaders movie clip i have this code
onClipEvent (enterFrame) {
_root.externals.stop();
mctotal = _root.externals.getBytesTotal();
mcloaded = _root.externals.getBytesLoaded();
[Code]....
The "_root.externals" is the empty movie clip that loads the external swf.
The problem is that when the preloader goes to 100% the external swf plays but plays in loop all the time. In the external swf i have the action stop(); in a frame but it doesn`t stop insted of stoping it replays all the time....
View 5 Replies
Jul 28, 2003
if i just tested loading an external swf into a movie clip, and it loaded fine... but it doesnt let me click any of the buttons or anything in it ( i imported a game i made into a different swf and i cant click the start button)... is that just how loadMovie works? or is there something i did wrong?
View 10 Replies
Sep 15, 2009
I am wondering how/if I can link to an external URL within a movie clip. It is easy to create a link that functions within my site, but I am having trouble linking to an independent site.
View 2 Replies
Jan 25, 2010
I am having trouble loading an external image into a movie clip. I have doubled check my path and but still my code isn't working. I must be missing something fundamental but I can't see it.
ActionScript Code:
//create a container to hold the rooms images
var roomContainer:MovieClip = new MovieClip();
[code].....
View 2 Replies
Nov 19, 2010
i am trying to import an external movie clip in a scrollpane in my flash movie my external movie is an animated sequence which expands on click of a button much like a data tree but here its just images so now i want that when someone clicks on the expand button the scroll should appear but i ran into this problem that the swf load perfect but no matter what i do the scroll either doesn't appears or even if its there it won't scroll through the complete swf rather just 5px in vertical i defined a few basic properties in AS and some through the property inspector Check the attachment below if u want to
View 1 Replies
May 26, 2008
I am buidling a website in which i am importing external movie clips (swfs) using actions script 2.0 all of my imported movie clips so far work fine, but when it comes to import the xml gallery the who website goes in a loop. here is the script i am using to load the external movie clips.
this.createEmptyMovieClip("container");
container.loadMovie("xmlgallery.swf");
stop();
is very basic but it works for what i am doing. the question is HOW DO I LOAD THE XML GALLERY if this basic script doesn't work for it is there another way to do it?
View 2 Replies
Aug 2, 2003
I would like to have it so that when I click a button, it tells a movie clip to play and it just blinks loading. I want an external .swf to be loading while that movie clip is playing. When the external .swf loads, I want it to tell the mc to stop. How do I do all of this?
View 1 Replies
Feb 13, 2009
I'm pretty new on actionscript coding. Trying to call an external swf into stage with a movie clip symbol. How can i do this? I'd like to merge these 2 codes: This one i use for a movie clip buttons effect:
[cODE]...
View 3 Replies
Jun 4, 2009
Whenever someone clicks on a nav button, the corresponding .swf file loads into a blank movie clip I have on my home page. What I'd like to do is have the content on the current page fade out before the content on the new page fades in. I've used Flash for years, but this is the first web site I've built entirely in Flash, and I don't quite know how to approach this. I'm assuming ActionScript would be the easiest and most efficient way to produce this effect, but I don't know how to go about doing it. Is there a way to tell the current movie to go to a certain frame in the movie and play it before loading the next external movie clip?
View 5 Replies
Jan 15, 2008
Loading external movieclip into scroll movie clip?
View 1 Replies
Aug 28, 2008
I have some buttons that load an external flash file into the container movie clip with this code:
[code]...
So it plays the tweening out animation of the file that's already loaded, then loads the new file, playing the tweening in animation. However, currently the container movie clip is empty when the flash movie is played. I want to be able to have some content already loaded in it, but when I use the container .loadMovie("start.swf") code, it just keeps loading start.swf into it when any of the other buttons are clicked. Is there a way I can have content load when the flash movie is started, but when any of the buttons are clicked, for it to tween out, and basically, never reappear?
View 2 Replies
Jul 29, 2009
In what combination of as2 code would instruct a preloader to recieve bytes loaded and bytes total in addition to loading a external swf file into a blank movie clip? I've seen countless issues regarding the same problem but still haven't goten a clear answer. I dont want to use the video player component standard on Flash. I want a preloader to preload a external swf file and play it inside a movieclip.
View 5 Replies
Nov 5, 2009
I'm trying to get an external image in a movie clip symbol when the movie is opened and I'm having no joy. I can get it to work with a mouse over event...
on (rollOver) {
rootObject.activeMouse = true;
mcImage.loadMovie( "image1.jpg" );
}
However, I need it to load without pressing / rolling over anything.
View 1 Replies
Oct 28, 2009
I'm attempting to use the movieClipLoader to load a file onto an instance of a class derived from movieclip. For some reason, this doesn't seem to work, because after it successfully loads, the array that contains these derived class instances suddenly become movie clips and lose all their derived variables (tracing them resutls in 'undefined').So I thought there must be another way. Perhaps there is a way to copy the image data from one movie clip to another, or someone suggested taking a snap shot of the first movie clip and then applying it to the second as a bitmap.
View 1 Replies
Jun 21, 2010
I have masked the video clip. The masked clip is working fine. But the Actionscript 3, which contains 2 more SWF external movie clips not loading those files. Once I remove the mask they start working.
View 9 Replies
Mar 29, 2010
I have a demo/spec file I'm working with (download the .fla here): [URL] I'd like to have a movie clip (FLV) start playing AFTER the animation stops playing. I know once I bring the clip in, I'll have to give it an instance name and reference it in AS, but I'm not just not sure exactly how to start. I feel like the whole timeline thing traps me up...
View 1 Replies
Oct 31, 2011
I'm trying to introduce a movie clip that's a simple image sliding into place from off stage.It's triggered by a cue point in a video that's playing.However, just as the movie clip is due to slide into position on the stage, it flashes a brief preview of its final resting place.Here's the code I'm using...
var myPic2 = new pic2();
import fl.video.MetadataEvent;
test.addEventListener(MetadataEvent.CUE_POINT, fl_CuePointHandler);[code].....
View 7 Replies
Jun 22, 2009
how to create a short video to play before the user clicks on a video to watch. Kinda like a short advertisement (for our department) when the viewer wants to watch one of our football games.
With the help of another user here, I was able to get a video player to work using an xml list containing all of the video file names, once the title is clicked in the .swf file the player plays that video file.
xml file
Code:
<root>
<video>
<filename>UA029_Fb_1929_WA.flv</filename>
<title> WSU VS UW 1929</title>
<description></description>
[Code]....
so what I am trying to achieve is to have a short clip play every time a person wants to watch a video.
Also, Is there a way to create some type of text box in the swf player that will display all the metadata (game, year, score etc.) in that box?
View 2 Replies
Jun 17, 2010
i have a button with some code on it to play a movie clip when pressed. the movie clip should run until the last frame and then stop at the end where i have a stop action.what actually happens is the movie clip plays the first time the button is pressed but not the second time. the third time it plays again but not the fourth, the 5th time it plays etc. etc.i have noticed that if i change the stop action to a gotoAndStop(1) action the film plays everytime without problems. but what i need is it to play everytime and then stop at the end without going back to frame one until the button is clicked once more.
View 1 Replies
May 9, 2010
Im making an animation to describe how a potential iphone app would work. Its going to be a 3 min clip not interactive at all, just plays right through showing how it would work. This is not for web. Just for presentation purposes.
By problem is this: Within the timeline, i need to embed a 20 sec clip (with audio) the plays automatically and when it ends the rest of the animation continues. I cannot for the life of me figure out how to do this without the audio and video being all messed or the video not exiting the screen once its finished. I hear all this talk of action script but have no clue where to start.
View 1 Replies