How To Sequentially Play/Load External Video Clips (in SWF Format) In Main Timeline?
Hi,
Does anyone know how to sequentially play external SWFs loaded into the main timeline?
I have several SWF files with short videos embedded in them. I wish to load these external SWF files into my main timeline as follows:
User Presses Button -> Play Video Clip in External SWF#1 -> Once Video Clip in External SWF#1 has Finished -> Play Video Clip in External SWF#2.
I tried achieving this by adding: “var endmovie:Boolean = true;” to the end of each video clip inside the external SWF’s (e.g. “1.swf”) then cycling through an if statement in the main timeline to see when this condition was meet:
ActionScript In Main Timeline:
Code:
var mc_Loader = new MovieClipLoader();
mc_Loader.addListener(this);
this.createEmptyMovieClip("Container", this.getNextHighestDepth())
Container._x = 0
Container._y = 0
button_mc.onRelease = function () {
mc_Loader.loadClip("1.swf",Container);
function onLoadInit(target_mc:MovieClip) {
myInterval = setInterval(cycle,30);
function cycle() {
if (Container.endmovie == true){
mc_Loader.loadClip("2.swf",Container);
}
}
}
}
To my surprise, this code does actually work - until you add the "button_mc.onRelease = function () {" part!
How is the best way to go about achieving this? Am I on the right track? (By the way, using .FLV files or one long external SWF file is not really an option due to long loading times...I think...)
Please Please Help!
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-14-2008, 05:00 PM
View Complete Forum Thread with Replies
Sponsored Links:
Help With Loading/triggering External Clips Into Main Movie Timeline
I have a scenario I need some input on if anyone could be so kind...hopefully it makes sense...
I have a Flash movie file, and I have 5 large 'external' SWF files being called. There are 5 buttons in the main movie, each one when clicked needs to load it's proper exteranl MC into the main movie (ie button 1 loads/plays MC1.swf)
...but, it needs to start each each external clip at Frame 2, so it can't just load the movie on frame 1 and go...
so far I have something like this, but obviously its not right:
on (release) {
_root.contents.loadMovie(“externalfile.swf”);
}
How do I code the buttons to do that properly?
Also, is there a way to preload those external clips right off the bat?
Thanks for any help...
seanpc
View Replies !
View Related
Help With Loading/triggering External Clips Into Main Movie Timeline
I have a scenario I need some input on if anyone could be so kind...hopefully it makes sense...
I have a Flash movie file, and I have 5 large 'external' SWF files being called. There are 5 buttons in the main movie, each one when clicked needs to load it's proper exteranl MC into the main movie (ie button 1 loads/plays MC1.swf)
...but, it needs to start each each external clip at Frame 2, so it can't just load the movie on frame 1 and go...
so far I have something like this, but obviously its not right..it's only calling and loading the external clip, but not goign to frame 2 like I want it:
on (release) {
_root.contents.loadMovie(“externalfile.swf”);
}
How do I code the buttons to do that properly?
Also, is there a way to preload those external clips right off the bat?
Thanks for any help...
Van
View Replies !
View Related
Help With Loading/triggering External Clips Into Main Movie Timeline
I have a scenario I need some input on if anyone could be so kind...hopefully it makes sense...
I have a Flash movie file, and I have 5 large 'external' SWF files being called. There are 5 buttons in the main movie, each one when clicked needs to load it's proper exteranl MC into the main movie (ie button 1 loads/plays MC1.swf)
...but, it needs to start each each external clip at Frame 2, so it can't just load the movie on frame 1 and go...
so far I have something like this, but obviously its not right..it's only calling and loading the external clip, but not goign to frame 2 like I want it:
on (release) {
_root.contents.loadMovie(“externalfile.swf”);
}
How do I code the buttons to do that properly?
Also, is there a way to preload those external clips right off the bat?
Thanks for any help...
Van
View Replies !
View Related
Pros & Cons Of Load Movie Vs. Putting Clips On Main Timeline
hi, i have a sort of theoretical question:
i often see the advice to "load movie" when you want to string several movie clips together on the main timeline. what's the advantage of doing that vs. just putting the movie clips one after another on the main timeline. and, i've never had much success getting "load movie" to work for me (i'm pretty new at this). so, can someone explain how it works?
View Replies !
View Related
Play Multiple Timeline Sections Sequentially?
Hi,
this is the first time I've tried to build a flash site, so i'm not really sure what i'm doing yet.. i hope someone can help.
I don't really know much actionscript, but it seems i'm missing something, as when i write 2 lines of code, supposedly to play 2 timeline sections in sequence, only the second one plays. This makes me think i need some kind of delay or pause condition, as i guess they are SET playing sequentially, rather than waiting til the first section has finished playing to play the second.
Heres what i'm actually trying to do:
Each "page" has a "fade in" animation and a "fade out" animation. So far i've only made a couple of pages, and it's worked fine, but now i've realised that every time i load the homepage, for instance, i will want to fade-out whatever page is on the screen, and fade-in the homepage. So i've tried to split the transition animation in two, so i can, for instance, reuse the "fade-in homepage" section with a new "fade-out" section.
this is the first piece of code i tried;
stop();
back1.onRelease = function () {
gotoAndPlay ( "rubout about page" );
gotoAndPlay( "redraw home buttons" );
};
then i tried to introduce a variable, in an attempt to prevent the second section playing before the first had finished (i put a piece of code at the end of the first section which resets mystop = 1. But anyway still only the second section plays.
stop();
var mystop = 0;
back1.onRelease = function () {
if (mystop =0){
gotoAndPlay ( "rubout about page" );
}
if (mystop = 1){
gotoAndPlay( "redraw home buttons" );
}
};
any ideas why this doesn't work or whats a better way of doing it?
many thanks.
View Replies !
View Related
Playing Two Video Clips Sequentially
OK - this is my first post to this forum. I've been working with Flash for a while. No problem with basic timeline images, text, and music. (See pvhistory.org splash page). I've also got no problem encoding and uploading video to play on the web. (see the onliine history show playback on the website).
Here's the problem. I want to tack short ads onto the front of the segments, but I don't want to edit the ads into the videos. I want to attached the ad clips after everything is encoded to an FLV. This way changing ads will be quick. For the life of me I can't figure out how to get two videos on the timeline playing sequentially. This has to be easy and I"m missing something obvious.
Any help from the more experience, or simply more astute, members of the group appreciated.
Ned Barber, Pascack Valley History Project
View Replies !
View Related
Load External Swf (quiz) Into Main Flash 8 Timeline
Hi there,
I am creating at learning module in Flash 8 on Mac OS X, I have four external swf quizzes created from the template. To load it into the main timeline, I made a movie clip, and successfully loaded the swf quiz into my main timeline, using loadMovieNum, and to get it to unload, I put in the unloadMovieNum script, but once the short quiz is completed, it does not go back to the main timeline. It just sits there at the end. I guess you can tell I'm new at this
If anyone knows what i should add to the movieclip actions to get my swf to go away and put me back on my main timeline, I'd really, really appreciate it!
Thanks so much!
Connie
View Replies !
View Related
External Movie, Load Button In Main Timeline
Hi there,
Just new on this forum and hoping to get some help!
I've build a website that loads an random banner every time the page is reloaded. This is done bij the loadmovie function that loads randomly external .swf files.
I hope to establish, that when people click on the banner they get redirected to a certain point in the main timeline. So the external swf file is containing a button and when pressing it must work for the main timeline.
Doe anyone has a suggestion?
Thanks Rik
View Replies !
View Related
Load And Play External Swfs In 1 Main FLA File?
Hello! I have one main file that I'm using as my main 'loader' file for 7 external swf files that are like 'mini movies' that I want to play inside my main loader file. I wrote the code to play one movie just fine and I can even write the code to load them all into the main code. The problem is that they load and don't stop and wait for each one to play and then move onto the next one.
I'm new to AS3, coding of any sort actually, so I'm really hoping someone can help me. I'm attaching my fla file for the main loader so you can see how far I've gotten. I know that if I can get the code portion for one of the movies, it's then just a matter of cutting and pasting for each additional movie but I'm stuck.
Please help in any way! Thank you!
View Replies !
View Related
How Do I Load External SWF Video Files Into Main Flash?
Hello,
I need to know how to be able to load external SWF video files into a main flash movie via buttons on the main flash. What I am trying to do is to show video clips in a window on the main flash movie. I know I need to convert the video clips to flash first. Could someone tell me how should I convert them in flash professional 8, then have on the main flash movie different play buttons which can each bring a certain clip to play in a window. I'd like to be able to also allow the viewer to control the audio of each clip, as well as pause the clips, start them over again, etc. I'm just trying to allow my viewers the choice of which clip they want to play into a window on the main flash movie and be able to control them as well. I'd really appreciate it if someone would help me. It's really hard to find a solution anywhere else.
Thanks!
Rob
View Replies !
View Related
Referencing Clips On Main Timeline From My Main Document Class
Hi All,
I'm trying to reference clips on the main timeline either in or via my main Document class, but if I declare any clips as public in the class body as I would have done is AS when linking an external class, I get:
Code:
1151: A conflict exists with definition tfLength in namespace internal.
If I don't declare the clip, then I can reference it from within the same class with this.tfLength, but other classes complain it the Document classes tfLength variable doesn't exist!
So how do I reference a clip on the timeline in my class?
Thanks,
Dave
View Replies !
View Related
Play Movie In Timeline But Keep Main Timeline In Place
Hello,
Scenerio: You are at frame 1 of the timeline and it's stopped, you hit a button and it jumps you to frame 20 and then at frame 20 a movie clip plays.
Question. Can I have that movie play for however long I want (let's say it's a 100 frame movie) BUT have my main timeline still sit on frame 20? And then when the movie is done playing it goes to frame 21 of the main time line? Currently I have to make my main timeline be the same length as any movie I have in it, and so my main timeline ends up being an absurdly long.
Just a general answer will help - which action scripts would I be looking to use (I'm using Flash 8 Pro)?
Thanks
View Replies !
View Related
[F8] Actionscript To Load Multiple External Movies Sequentially
I have 4 separate external swf files called:
"spinner1.swf"
"spinner2.swf"
"spinner3.swf"
"spinner4.swf"
I also have a placeholder called "loader_clean_out_valve" in my index.swf
I just need a wee bit of code to load spinner1.swf into the index scene and play it, when spinner1.swf is finished playing i want to then load spinner2.swf and play it, when spinner2.swf is finished playing i then want to load spinner3.swf and play it. I think you get the idea.
Im not sure if each movie that has just plays needs to be unloaded or what
I have searched high and low but cant find a solution anywhere.
I am using flash 8.
Any help would be a godsend
View Replies !
View Related
Movie Clips And Main Timeline
When scrolling through the main timeline, I am only able to view the
first frame of each movie clip I've inserted (my layers are made up of
movie clips with no other objects in the main timeline). These views
change with each keyframe, but leave me with an inaccurate
representation of what is happening as I drag the slider across the timeline. I am able to view the outline of
the shape in the movie by clicking the view outline box next to the
lock, but this still does not show me what is going on in the movie
frame by frame. Is this normal, and can it be
changed?
Also, if I want to export only part of the movie for test, is this
possible?
Any help would be most appreciated.
View Replies !
View Related
Nested Mov Clips And Main Timeline
Hi all,
I have 3 nested movie clips within the maintimeline. I am wondering what the code is that i use to return from one of the movie clips ti the maintimeline? I''ve tried at the end of my nested movieclip:
gotoandplay(_root.nameofframe);
but it doesn't work.
Thanx
View Replies !
View Related
Movie Clips On Main Timeline
HI! I'm using Flash MX and I'm not very good at it. So I would appreciate your help! Anyway, I'm making a movie w/ no interactivity and I want to put a series of movie clips on the main time line, each to play after the previous movie clip is done. The only way I can make it work is to put the movie clips in keyframes and then allow all all the frames for the movie to play. My movie is way too long and I know there has to be a better way! I'm trying to figure out the action to assign to the keyframe that will play the movie clip within that one frame and when it's done, go on to the next movie clip. Is that possible?
Thanks to anyone who can help!
View Replies !
View Related
See Movie Clips In The Main Timeline?
Is it possible to view the position of elements in the main timeline that are held within a movie clip. For example all elements must be at frame one in order to see the movie content. If A space was given in the movie clip, we would not be able to see the position of elements, hope all this makes sense, but is it possible.
I have navigational buttons held within a movie clip. The buttons come with a animation, and start at frame three in the movieclip, except I need to position this acurately with the rest of my design, but dont have a visual for this.
Hopefully someone can explain.
Trev
View Replies !
View Related
Movie Clips On Main Timeline
HI! I'm using Flash MX and I'm not very good at it. So I would appreciate your help! Anyway, I'm making a movie w/ no interactivity and I want to put a series of movie clips on the main time line, each to play after the previous movie clip is done. The only way I can make it work is to put the movie clips in keyframes and then allow all all the frames for the movie to play. My movie is way too long and I know there has to be a better way! I'm trying to figure out the action to assign to the keyframe that will play the movie clip within that one frame and when it's done, go on to the next movie clip. Is that possible?
Thanks to anyone who can help!
View Replies !
View Related
How Do I Play One Frame From The Main Timeline From An MC ?
as the title sais , i am in a movie clip and when i click on this button i wanna gotoandstop a frame that is on my main timeline. I cant put this
on (release) {
_root.gotoAndStop (framenumber);
}
because i want it to go to the main timeline in the second scene , but when i put _root... it goes to the root of the whole prject i want it to go to the root of the second scene
View Replies !
View Related
Unload Mc And Play Main Timeline?
I have a main movie "main.swf" and in an empty movie clip (instance name "empty") on that timeline, I have it loading another movie ("continue.swf") that takes you to the end of the presentation...
This is the action on frame 1 of "empty":
loadMovie("continue.swf", 1);
I need the entire presentation to loop. I have a frame labeled "startsite" where I need the movie to start over from on "main.swf"
So at the end of "continue.swf" I need an action that tells it to go to "main.swf" and play frame labeled "startsite," right?
I've tried:
_parent.gotoAndPlay("startsite");
I've tried:
_root.gotoAndPlay("startsite");
I've tried unloading the movie clip "empty" from the main.swf with:
this.removeMovieClip()
but everything I try only loops the "continue.swf"???
Can someone please help?
View Replies !
View Related
Play/Stop Flv From Main Timeline?
http://studio34design.net/aleks/aleks_chem3.html
about 30 seconds into this flash, there is an FLV of a computer screen. The problem is, when I pause the swf, the flv keeps going. How do I get around this?
1. Is it possible to convert the flv to swf?
OR
2. Is it possible to control the flv from the main timeline?
thanks people!
View Replies !
View Related
I Want To Play Any Video Format In Flash Player
Hi
im using dreamweaver in fact but im importing flash video and ir runs only flv format
im uploading vidoe files to the website and i want to convert all formats to flv dynamiclly
other people recommend me "import linked media. You can link
quicktime videos dynamically and play them in the swf and some other formats that flash player can play." if so
how can i do that?
by te way the server don't insall flash media server .all should work by flash player on the broweser
thanks in advance.
View Replies !
View Related
Movie Clips Working In The Main Timeline.
I know how to make a movie clip. but what I am confused about is. how do you get the movie clip to animate in the main timeline?
I try just adding the clip by dragging it from the library but it doesnt animate. it just sits there on the first frame of the movie clip.
how do I get it to animate on its own without having to manually do it. because if I do that, what is the point of making movie clips. I am obviously missing some step here. Please advise.
View Replies !
View Related
Playing Movie Clips One After Another On Main Timeline
Hi,
I have a series of movie clips that I'd like to add to the main movie timeline, all on separate layers. I want one clip to play after another, as opposed to having them all play at the same time...Do I need to write some code to allow that to happen?
For example, I'm creating a mini movie, with opening credits, ending credits and everything in between. Each segment is an individual movie clip. I dragged an instance of each clip onto the main stage, separate layers, all on frame one. I'd like for the clip in layer one to play first followed by the next clip in layer two, etc.
Please Help
Thanks
View Replies !
View Related
Help How To Control Main Timeline From Nested Clips
I KNOW i'm just getting some punctuation mark wrong, right?
I have a dozen sub-movie clips nested in my main movie clip (Scene 1) and I would like to set up action frames in these sub-movies that tell the playhead in the main movie to gotoframe, etc... can someone send me the simple gotoframe script?
when i use gotoframe("Scene 1", 5) or gotoframe(_root.5) ... 5 being the frame i want to jump to... Flash tells me it contains no errors, but it just wont work!
thanks!!!!
jason
View Replies !
View Related
Action On MC To Play A Frame On Main Timeline
Flash 8
I'm trying to get a Movie Clip (in the 1st frame of the main timeline) to end by going back to frame 10 of the main timeline in Scene 1. I put an action in the MC's last frame
gotoAndPlay("_parent", 10); but nothing happens
I also tried "scene 1" " _root1" "_level1
Is there a way to navigate from the Movie Clip to the main timeline of Scene 1??
Thanks
View Replies !
View Related
Loadmovie On Main Timeline, Play, Then Continue...
Work on my Flash site is going great, but like most newbies it feels like I'm literally pounding this thing into shape with a sledgehammer.
I've got a simple question (aren't they all), and I swear I've searched the forum but to no avail. The answer is out there, but for some unGodly reason I can't find it.
I've got a main timeline with, say, 55 frames. There's a brief animation tween in the first 10 frames. At frame 11 I'd like to stop the main timeline, load a movieclip called mcPort (SWF would be fine as well) and have it play AUTOMATICALLY, and then restart my main timeline at frame 12 once mcPort is finished.
mcPort is basically a long slideshow type movieclip. I plan on adding 1 or two others of this type into my main timeline. I realize that I could just do all of this slideshow animation stuff within my main timeline, but it just gets unmanageable.
I gotta think this is possible. My search reveals people wanting to do the same thing, but always with a button action. My hunch is that a container is used, but I've not used one yet.
Thanks much
View Replies !
View Related
Play A Movieclip Once, Then Go To The Next Frame On The Main Timeline
Hello, I'm sorry for the long topic's title.
I have an animation I'd like to use as an INTRO in my flash movie. I will joint it inside a movieclip, giving it the istance name "INTRO". And I position it in the first frame of the main timeline.
How can I make possible that played once my intro (my movieclip) the player jumps to the second frame of the timeline, named by the istance "HOME".
Is it possible?
Thankyou very much for your help,
and great things.
Stebianchi
View Replies !
View Related
Making Main Timeline Play From Inside Mc In AS3
Hi
I'm primarily a motion graphics guy but am helping out a friend with some Flash web work. I have CS3 now but haven't touched the app since MX so Actionscript 3 is taking me some time to get to grips with - not that I was any more than a dabbler anyway.
I am simply trying to make the main timeline play when an MC on the stage reaches the end of its animation. I have tried variations of root.play("menu") or parent.play("menu") in the last frame of the MC but I get:
"1061: Call to a possibly undefined method play through a reference with static type flash.display:DisplayObjectContainer."
Also it breaks the previously ok code and the 'stop' on the 2 frames of the main timeline are now ignored.
Then I see stuff like this -
View Replies !
View Related
MC Instance On Main Timeline Play In Order
I don't know if my title is clear enough, but I'll try to clarify.
I have one MC on the main timeline, and duplicates of the same MC one after another. So basically 8 of the same MC lined up beside eachother.
Now the tricky part. I want halfway through the original MC, to jump to the second MC instance and start from frame1. Now the dilema is, that if I make an actionscrpit on the MC, it affects all the MC lined up together, because they are an instance of the original.
Could I use the duplicateMovieClip command, and how?
View Replies !
View Related
MC Instance On Main Timeline Play In Order
I don't know if my title is clear enough, but I'll try to clarify.
I have one MC on the main timeline, and duplicates of the same MC one after another. So basically 8 of the same MC lined up beside eachother.
Now the tricky part. I want halfway through the original MC, to jump to the second MC instance and start from frame1. Now the dilema is, that if I make an actionscrpit on the MC, it affects all the MC lined up together, because they are an instance of the original.
Could I use the duplicateMovieClip command, and how?
View Replies !
View Related
Buttons Within Movie Clips, Targeting The Main Timeline
I have five buttons (1-5), in a movie clip (MC1). I want the buttons to go to frames on my main timeline--NOT within the MC1, but I am having a problem with it.
Currently I use:
on (Press){gotoAndPlay(frame);}
but this plays the frame within the movie clip, not on the main timeline.
I am sure there is a simple solution to this. Any help would be greatly appreciated.
Thanks,
shotbot
View Replies !
View Related
Complex Amins -- Use Movie Clips Or Main Timeline?
Hello everyone, I'm hoping someone can offer some advice--
I am trying to make a complex animation sequence. At the same time, I want to include a sound on/off button. The instructions for the sound on/off button I have seen so far say to make a sound movie clip and a button movie clip and place them in the 1st frame of the main timeline. So I have done that sucessfully. But, testing has indicated that I can't build out animations in the main timeline without causing glitches in the on/off audio process. Is that right, or is there a workaround for this?
If so, then my option is to build my animation sequence as a MovieClip Symbol. I could do this, but the MovieClip Symbol workspace does not correspond to my actual movie dimensions -- so I feel like I am working 'blind' while in the movie Clip mode. Any suggestions? Thanks!
View Replies !
View Related
Consecutive Movie Clips On The Same Frame (main Timeline)
-flash movie has 1 frame with about 10 layers.
-on each layer there is a 10-frame movie clip
-after one movie clip, I want another movie clip on another layer to play.
-the other mc "instance" is named "mc02"
-on that 2nd mc, it starts with a stop() frame so it doesn't play right away.
-the 2nd frame is called "start01"
-here's the action script on the last frame of the 1st MC :
stop();
_root.mc02.gotoAndPlay(start01);
I thought this would work, but it doesn't...any help greatly appreciated!
Thanks in advance....
md
View Replies !
View Related
[F8] Scoping / Path From Movie Clips To Main Timeline
I've got a interactive movie that let's a user choose different combinations to customize an item. Each category is it's own movie clip (a total of five movie clips) with buttons that update it's own dynamic text box with a value. This works fine...
On the main timeline, there's a "total" dynamic text box with a "calculate" button that is supposed to get the sum of each value from all five of the dynamic text fields within the movie clips. It worked when everything was in the same movie, but now that the dynamic text boxes are broken up into separate movie clips, I'm not getting anything in the main movie's "total".
From what I understand, it's something to do with setting the right path... How can I fix the code?
Here's what I currently have on the "calculate" button in the main timeline:
on (release) {
total.text = Number(a.text) + Number(b.text) + Number(c.text) + Number(d.text) + Number(e.text);
}
Thanks
View Replies !
View Related
Anyone Developed For Large-format Screens Using Embedded Video Clips?
I'm developing a Flash piece for a large format plasma (1360x765) and will be using embedded video clips within Flash. The final video clip I'll be embedding will be delivered on 10-bit 720x486 format (standard -not widescreen).. -does anyone have experience with using video that will need to be displayed in a larger format than what it is delivered in? I'm thinking the image quality will not look good at all.. -problem is, I can't test it without purchasing the *&$ video! $$$$$$...
anyone? anyone? am I in the wrong forum? help!
Lisa
View Replies !
View Related
Anyone Developed For Large-format Screens Using Embedded Video Clips?
I'm developing a Flash piece for a large format plasma (1360x765) and will be using embedded video clips within Flash. The final video clip I'll be embedding will be delivered on 10-bit 720x486 format (standard -not widescreen).. -does anyone have experience with using video that will need to be displayed in a larger format than what it is delivered in? I'm thinking the image quality will not look good at all.. -problem is, I can't test it without purchasing the *&$ video! $$$$$$...
anyone? anyone? am I in the wrong forum? help!
Lisa
View Replies !
View Related
Pause/Play Button Referring To Main Timeline...
I'm working on a site that includes a button that says "pause" - when the viewer clicks it, it switches to say "play." Right now, it's a two-frame movie clip that has one button on each frame. I know I need to specify that the Pause/Play action refers to the main timeline (possibly using "_root"?) but I have no idea where to place that. Here's the script for both frames:
Frame 1:
on (release) {
stop ();
}
on (release) {
this.nextFrame();
}
Frame 2:
on (release) {
play ();
}
on (release) {
this.lastFrame();
}
Am I on the right track? Would _root go before or after the command? It's switching from "Pause" to "Play" and back perfectly....
Thanks for your help....
Julia
View Replies !
View Related
|