Playing Movieclip Once Only On Repeating Timeline?
Hey all.
I've got another newbie problem. I'm making a timeline-based product presentation. One of the functions of this presentation is to zoom in on it's content and zoom out again.
On FrameLabel "forward" I have a gotoAndPlay action that sends you to FrameLabel "zoomout".
Here is where I want a MC containing instructions on how to use the product to play only once. The MC is called info_mc.
Once it has played I want it to never play again. Cuz here the user has the option to go back to the FrameLabel "forward" and all it's functions. That means that the user can again chose to go to the FrameLabel "zoomout", but this time the instructional MC (info_mc) shouldn't play again.
Now I can't seem to get any easier function for this to work. I figure there's at least two ways of doing it.
1. to record if the MC has been played and if it has not to play it again.
2. using attachMovie and removeMovieClip and whatever else comes with that.
Now the problem at this point is that I know too little AS to pull this off. I would really appreciate if someone could help me out with some solutions.
regards / Johan
Ultrashock Forums > Flash > Flash Newbie
Posted on: 2005-05-26
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Help With Flash Timeline And Playing Movieclip....
OK here's the situation...My Movieclip is 50 Frames long. I want to be able to play the MC and stop at Frame 25 where the movie displays 3 buttons. From this point I want the buttons to be able to go to their respective scenes. But I want the MC to finish playing the rest of the Movieclip...Is this possible??
Playing A Timeline In A Movieclip Using A Variable From Another Clip..
trying to play a timeline in a different movieclip when a hitpoint variable = 0 in a different movieclip.. cananyone suggest how to work this?
this movieclip with the timeline i want to play is and explosion and the variable is on a tank. I've placed the explosion clip on a layer inside the tank clip the variable is in the tanks object actions.. (if this helps.. )
Unloading MovieClip And Playing The Main Timeline
Hi
I seem to be having issues contolling the main timeline from a child timeline. I'vr poked around on the forms to the point of confusing myself.
Here's the sequence of events I'd like to occur:
1. Child MovieClip that's loaded into the maintime on level 12 unloads itself once a button is pressed on the child's timeline.
2. On the last frame on the the child's timeline it tells the parent movie to go to frame 12.
Here's the code I placed on the last frame of the Child's timeline.
_parent.gotoAndPlay(12);
this.unloadMovie()
Right now the Child mopvie unloads successfully but it does not go back to frame 12 of the parent ( main) timeline???
Any suggestions?
Playing A Nested Movieclip From Main Timeline
I'm creating a website and my knowledge of actionscript is pretty limited so I am asking for help on what is pretty basic stuff.
I have a movieclip called mc_manikin which contains another movieclip called manikin_arm. On Rollover of mc_manikin I want the movielip manikin_arm to play frame 2.
So far I have this:
function wave (e:Event){
manikin_arm.gotoAndPlay(2)
}
mc_manikin.addEventListner(MouseEvent.ROLL_OVER,wa ve);
My function is called wave I'm not sure how to pick out the movieclip inside mc_manikin (something to do with parent and child?)
Help!
Playing A Movieclip Backwards To A Specific Frame In The Timeline
Hi
I've managed to reverse play my Movieclip
with this code
if (_root._currentframe == 1)
_root.gotoAndStop(245)
else
_root.prevFrame();
However, I want it to reverse play from a specific frame and stop at a specific frame. Right now, it's playing all the way from fram 245 to the start.
Please help, I am a beginner to actionscript!
Thanks!!
Repeating A Timeline
Hi, I have a MC with a 20 frame animation. I want its time line to repeat a couple of times but not forever. Besides copying and pasting frames, is there a way to set the number of repeats? and then just have it stop on the last frame? Isn't there a setting somewhere?
Appreciate the help.
D2
OnDrag:scroll Thru Timeline / OnRelease: How To Resume Playing The Timeline
i want to scroll thru the timeline by dragging a slider. (just like scolling thru QT) framenumber will be calculated based on slider._x.
when release slider, timeline should play from that point normally
when i stop dragging the slider, the procedure of gotoAndPlay(calculatedFramenumber)does not stop and movie sticks on that frame where slider-button was released.
slider-button-code:
on (press) {
startDrag("", false, 276.5, 331.5, 757.5, 331.5);
}
on (release) {
stopDrag();
}
slider mc-code:
onClipEvent (enterFrame) {
slideframe = math.ceil(1.892*(_x-276.5)+1908);
_root.gotoAndPlay(slideframe);
}
onClipEvent (mouseUp) {
_root.play();
}
can anyone help me on that simple issue?
Playing Timeline In Reverse Mode (the Whole Timeline, Not A MC)
hi,
I have to make a flash book where you can view each page forward and backwards - as if you were actually reading the book by clicking on a next or back button depending on what you wanna do.
My problem is: I have the main timeline and all the animations are placed there without using any MCs.
i know a similar topic has been covered hundred of times on this forum, but i didn't found anything covering this specifical issue.
All topics refer to MC's placed on the timeline, but i have all my stuff on the main timeline, without any mc's, so.... i have to ask
Is there any script to make the movie, once stopped, move backwards and then stop, when it finds the stop command?????????
Help!
Thanx in advance
Mcclaine
Repeating A Create Movieclip 2 Times With Xml
Hello,
I have this code that is working fine listed in the example below. It takes an xml feed of 4 image titles and loads the images within a MC that is on my main layer.
What I would like to do is repeat the i loop 8 times so that instead of just once showing the original four images it would show 8 images. The original 4 2 times so that I can now scroll this MC later on.
any ideas that I can try?
Code:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 100;
//spacing is the width of the thumbnails plus the space inbetween
//total length of the clip should be the number of images x the space
width_txt.text = numimages*spacing;
startx=j*520;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._x = i*spacing;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.main = this.picHolder.attributes.main;
this.thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
};
}//end of i
};
myPhoto.load("xmlphoto.xml");
Repeating MovieClip 3 Times, Then Skipping Script.
I have a movieclip that I want to repeat 3 times, and I am using gotoAndPlay(12);
just to get back to the part I want...how do I make it so on the 3rd time it skips that script? Thanks.
And also, how to I make a movieclip stop when someone pauses the movie?
Playing With The Timeline
Any idea how 2Advanced did this effect?
http://www.spacex.com/falcon/falcon2.htm
As you click on the links at the top the rocket seems to roll back and forth in it's timeline. I'd like to do something similar to a map I'm making so people can get directions to my house, but so far it only works right if you start at the smallest zoom setting and zoom out.
http://www.web-mirage.com/house
Any ideas?
Playing MC's In Main Timeline
This is a really basic question:
If I have an MC that has a timeline of 50 frames and I place it in frame one of the main timeline - is there a simple way of having the MC play to the end before it goes on to the next frame in the main timeline or do I have to assign it 50 frames and then place my next MC after that?
Thanks for your help
Playing Timeline Backwards
i have been trying to play a movieclips timeline backwards but i am not
having any luck. one way i figured out is by copying the frames and
pasting them in the same clip and reversing the direction of the frames
, but that takes too much space. So if anyone knows how to do this trick
with actionscript please let me know. i would greatly appreciate
if you could explaine each step, as you can tell i am not an actionscript
pro.
Thanks in Advance
Najib
Timeline Keeps Playing Even With Stop();
I've added a file, its going to be a game, but i have a problem with it:
After the power goes down to 0 (if u collide with enemy power goes down) the game takes you to the loosing screen, and there's a "replay" button there. When pressed it supposed to take you to the first frame of the main time line, but it starts looping for some reason. please help, thank u
Playing The Timeline Backwards?
Hello all!
I've created a scroll box in flash by masking a tweened text layer...it is controlled by two buttons - 'up' and 'down'
Getting the text to scroll down smoothly was not a problem - I just used the following code
on (press) {
play();
}
on (release) {
stop ();}
But I cannot get it to scroll back up smoothly - at the moment I've got
on (press){
PrevFrame();
}
which means that the user has to continually click the up button - which is a bit frustrating!
Soooo...I need to somehow get the timeline to play backwards continuously...so when the user clicks and holds the 'up' button it scrolls smoothly....anyone got any ideas...? Would be greatly appreciated!!!
Thanks
jo xx
Playing Timeline In Reverse
Hey im using flash CS3 with actionscript 2.0. what i want to create is a column for an online magazine, the column will display a list of content, this list will be longer than it appears and have a "next" and "prev" buttons located at the bottom. i can set it up so than when next is clicked the content shifts and displays more, the problem is, what do i do about the "prev" button? i cant make the timeline play in reverse can i? i have a test swf at www.waffleconezone.com/test.html .. and i tried to attach the fla but you cant?
thanks!
Playing Timeline Randomly
Hi,
the answer to this question will probably be easy, but hey, a forum needs to be questioned...
I made a very simple flash-animation which you can see on www.promvideo.be
Question is, how can I make it play the animation from a random frame, so that it won't provide Agfa gevaert with free publicity?
Thx a lot for any given piece of advice...
Djo
Playing Movies In A Row In Timeline
Hi - I am trying to make a video heavy flash site. I want it to play through a series of videos in a row unless the viewer clicks on a button then it will advance to a specific chosen video.
I inserted FLV components on the timeline. Each different FLV component is on its own single frame. When I test movie, it won't play any of the videos. I tried putting the FLV components into Movie Clips and extended the timeline within the MC, but it still didn't play the video when I tested it.
The only way I could get them to play in a row, was if I had each of them stretched out to their duration on the main timeline. This is going to become a ridiculously long timeline that I do not want to work with.
Is there a way I haven't thought of to get these to just play in a row but keeping the timeline clean and simple.
Thanks!!
kc
Playing Timeline For Predefiend Nos
Hi
I m new to AS3. I m not working on any project i just want to know that how can we play the timeline for predefined time with for loop.
for example i have a circle is animating on main timeline. i want that it should play only 3. times and then should stop... i know that for loop can be used in this matter, but do not know the code...
Please help me in this prob.
Thanks..
Timeline Sound Keeps Playing [BUG?]
Hi,
when playing a sound from a clip that is used on the timeline and go to
another frame on the _level0 timeline the sound keeps playing but the
clip where the sound is included doesn't exist on this part of the
timeline anymore.
Is there a way to stop the sound from playing?
TIA
MX04 Help Playing Timeline With SWF
After a swf movie loads, is it possible for the main timeline to contine to play? Right now if I don't put a stop action where I call in my loaed movie, my main time line plays while the called swf file loads, and the end animation is off then. Is there a way to fix this?
Playing Choppy In Timeline
I have MC and when I hit 'enter' to play the movie it plays a 8 fps slower than the actual fps. I have it set to 18 and it play jumps around anywhere from 9 to 18 fps. Does anybody what the problem is or how to fix it?
-logan
MX04 Help Playing Timeline With SWF
After a swf movie loads, is it possible for the main timeline to contine to play? Right now if I don't put a stop action where I call in my loaed movie, my main time line plays while the called swf file loads, and the end animation is off then. Is there a way to fix this?
Playing Choppy In Timeline
I have MC and when I hit 'enter' to play the movie it plays a 8 fps slower than the actual fps. I have it set to 18 and it play jumps around anywhere from 9 to 18 fps. Does anybody what the problem is or how to fix it?
-logan
Playing Through The Timeline Backwards
hello
i want to press the left arrow key on my keyboard and a movieclip on stage to play backwards through its timeline and then loop when it gets to the end.
i want to also be able to press the right arrow key and it plays forwards through its timeline.
I want it to be only while the key is pressed
any ideas how to do this in AS2 ??
thanks in advance
Preloading An SWF Without The Timeline Playing Out
Hello all my people. I have a slight issue with preloading an external swf. The preloader works fine it is pretty basic. However when the preloader is working, Ondrox.swf is playing out it's own timeline. When the loader is complete the clip is already halfway completed.
I have solved this problem in the past by putting a stop(); on the first frame of the external swf. Then targeting the external swf timeline with gotoAndPlay("2"); but this was in school and I have since forgotten how target the external timeline.
Is there any way play the swf only after the loading is complete?
Code:
import flash.display.Loader;
import flash.display.LoaderInfo;
var myLoader:Loader = new Loader();
var myRequest:URLRequest =
new URLRequest("ondrox.swf");
import flash.net.URLRequest;
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showLoadResult);
import flash.events.Event;
import flash.events.ProgressEvent;
var loadProgress_txt:TextField = new TextField();
import flash.text.TextField;
function showPreloader(evt:Event):void {
addChild(loadProgress_txt);
}
function showProgress(evt:ProgressEvent):void {
loadProgress_txt.text = "loaded:"+evt.bytesLoaded+" from "+evt.bytesTotal;
}
function showLoadResult(evt:Event):void {
removeChild(loadProgress_txt);
addChild(myLoader);
}
The MP3 In My Timeline Won't Stop Playing
As most newbies say, I apologize if this has been asked before. I did a search and came up with nothing, however.
I'm pretty new with Flash with almost anything except simple animations. I'm doing a project for class and have to use a song in the background. Problem is, every time I play it the animation will stop (I have figured out the 'stop' action as well... ), but the music keeps on going.
I've tried everything in the Control menu, and the only thing that gets the music to stop is clicking "test movie" or "test scene." It then goes into that mode (obviously), and the music will only stop once I exit from there and go back to the stage/timeline screen. Which is a HUGE hassle when all I'm trying to do is to line up the music with the animation.
I'm new to Flash but definitely not new to computers in general...and have racked my brain trying to figure this out. I did a search online, checked Flash's help site, and looked in the Visual Quickstart Guide for Flash that I have...and I got nothing.
I only have the beginning done to the animation, 30 seconds or so of the entire song. And, like I said, the music just keeps on going even though I really only want to see that first 30 seconds to see if everything's lined up correctly so I can finish.
Someone please help before I destroy my monitor.
Movieclip Inside Movieclip (Timeline Problem)
Temp link to the swf file:
http://avflower.com/
Fla file (rar archive): (deleted)
Click to the fish, so, the top part of the fish would break and stop. Please, help me to change the AS3 code the right way.
Playing Movieclips In Main Timeline
I asked this question in the MX forum but nobody gave me any useful advice apart from the file size wasn't big enough to make it play slowly.
I'm using MX. basically my problem is this. I have a webpage I've made in flash, on the first frame I have a preloader (the loading with the dots thing) and I've scripted onto it, goto and stop on frame two. on frame two I have an instance of an animation which is 150 frames long. on the animation itself I have a stop action, and a goto and stop on scene 1 frame 3. BUT when I play the swf it just loops the animation on frame 2 and never gets to frame 3. If I make the frame one action a goto and play then it jumps straight to frame 3.
PLEASE someone help me. I'm feeling SO dumb here. I'm sure it must be something basic I have got wrong.
thanxs heaps
Timeline &MCs Ocmmunicating And Playing Problems
hi everyone...i'm almost anewbie and need some help...
in the .fla file i attached i'm trying to create my first (simple)website.
the "name" mc should play for first and then disappear;after that i would "fixedname" to be on the right side of the stage and remain there always.then i created some containers for menu and content..
the problem is that i cannot load "fixedname" after flash plays "name".
"name" mc has a simple motion tween of about 20 frames in,while "fixedname" mc has just a text symbol inside.
pleaseee...have alook to the fla...
i'm waiting for your support,
thanks
soren
Playing Root Timeline Across Movies
I have two swf files.
Main.swf is displayed which loads home.swf. Home has a close button with the following code:
Code:
on (release) {
unloadMovie("_root.loadInTo");
//_root.main2.gotoAndPlay(1);
gotoAndPlay("_root.main2");
}
it unloads itself fine (as i see it disappear) however i cannot then play the main timeline. (everything is contained in a movieclip called "main2" - so i was trying to play that.)
thanks.
Trying To Get Info Of The Present Timeline While Playing Swf
heres the situation
i have 5 pages, history , about us, whatsnew, get to us, contact us
i have a few (frame set sequences, eg frame1-10 = history_in frames 11-20 = hisotry_out frames 21-30= what_in)
i have buttons where where say when im in the "history page", and i click "about us", it plays "history_out" and than "aboutus_in".
then when im in "about us" page, i click "contact us" and it plays "aboutus_out" and than "contactus_in" .
so heres the problem
i cant get it to be "page specific". like no matter at which at which page(eg history) it plays that page's out(history_out) and than goes to the page which i pressed on the button (about us)
so if i can call the info from flash, as to which frameset (history_in), (aboutus_in) etc, i would be able to do that but i cant.
Playing The Timeline Of A Movie Clip
Hello all. I'm a noob here.
I'm trying to play the timeline forward or backwards by either pressing and dragging left or pressing and dragging right. I can't figure this out.
I have been using instances of buttons to do this but I don't want to use buttons I just want to be able to press anywhere on the screen and weather I drag left or right the movie plays, if I stop pressing the movie stops playing on its current frame.
I hope any of you can help me.
Thank You very much.
Playing Reverse On The Timeline Not Working
I have made this flash that basically runs a presentation. Using the arrow keys you can cyle through the presentation. I can't get the thing to go back one section at a time using the back arrow key. It goes all the way back to the beginning. I tried to use variables but I don't know what I am doing I guess. If someone could take a look at the flash and let me know I would appreciate it.
http://www.lucidpixel.com/misc/flash/movietest.zip
This is not a presentation for the web so the mouse has been disabled in the flash piece.
Thanks.
sg
Playing Back Mp3 Clip In Timeline?
When I place an .mp3 clip into the timeline, it seems stop up the playback of the whole scene. I press play to try and watch it, but it stops right away at the next frame. It's definitely related to the audio clip - timeline plays fine without the sound.
Please advise.
Playing Movie Clip In Timeline
beginner here: i'm having difficulty playing a movie clip in my timeline.
basically, I need the movie clip to play while the timeline plays, but with the action script that I have, it only plays the action in one frame and doesn't play the rest of the movie while that movie clip is playing. It's a movie clip of a flame and I need the flame to flicker while everything else is happening in the timeline.
Would anyone be able to help me on this one? I'm sure it's something very simple that I just can't figure out.
On my actions layer I have three frames with the following code:
frame #1
r = 0;
setProperty ("flare", _visible, 0);
xx = getProperty("flare",_x);
frame#2
if(r < 80)
{
duplicateMovieClip ("/flare", "flare" add r, r);
setProperty ( "flare" add r, _alpha,r*5);
setProperty ( "flare" add r, _x,random(40) + xx);
r = r + 1;
}
frame #3
_root.gotoAndPlay(2);
my movie is 120 frames long with various tweens, etc.
Thanks...
Playing The Main Timeline From An Loaded Movie.....?
Hi all, I have a simple question, In the main Scene in a frame I have a action:
Stop
Load Movie ("graficooo.swf", "porttarget2")
After, the movie open and play... but in the end I need to put a action that unload the movie
(Stop // Unload Movie ("../porttarget2")
and play the timeline of the scene..... What is the correctelly action ???
Thankx
Loffi
Button In Moviclip Playing Main Timeline?
can i make a gotoandplay statement from a button in a movieclip to the main timeline, where this movieclip is placed?
goal: i want my menu (which is a movieclip on the main timeline) to slide out from the stage when button in the menu is pressed, in its current position of its own timeline.
tweens: frames 1-30 menu slides in [stop]. frames 31-60 menu slides out [stop].
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
Playing Timeline Backwards...not Good At Actionscript
I'm creating a calender where the months slide from side to side. Obviously I can get them to go one way but not the other which would be backwards. I've looked at some .flas on the site, but I'm not very experienced with actionscripting and don't understand how to make this work.
Can someone please help me out? Thanks!!
Audio Files Playing Once They Are Preloaded, Not With Timeline - Help :-)
Hey all,
I'm having a problem I can't seem to fix and my job may be on the line if I can't figure it out...
I've been given a flash project that was previously created, with directions to add sound clips to the .fla/swf files that play later in the project.
I dropped the sound files in the fla's at the appropriate times
BUT
when tested over the web, the sound files seem to be playing when they are "pre-loaded". Then then do play at the correct time later in the project.
Can anyone be so kind as to give me some direction as to what might be going on and how to fix? I'm really stuck.
Thanks a million!
chearn
TimeLine Help, Playing In Reverse With Button On Release
Hows it going
Im trying to have a movie clip play forward and in reverse, so something like, on release play this movie at the enterframe rate untill youve played for a set number of frames or until you get to a varriable which detimines the play lenght. Similar to this.
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
but with a button on release, and id like to have on button to play in reverse and on for forward.
thanks chris
Movie Clip Not Playing In Main Timeline?
let me get straight to the point - I think it's a bug.
Have you had this problem. I have a moviclip with some text tweened, it is inside another movieclip, and that movie clip is on the main timeline. With I view the swift, I can't see the text. But if I test the movie clip with the text "test scene", it works perfectly, it only doesn't work if I view the whole movie. The text seems to be there but I can't see it, becuase my cursor changes into a text thingy (no it is not hidden behind something else), it is in front. There is noothing wrong with my file, I have looked at every single possible avenue.
I also tried creating a swf out of this movieclip with the text and then load the swf into a movie clip holder
var myMCL:MovieClipLoader = new MovieClipLoader();
myMCL.loadClip("text.swf", "textcontainer");
and it still doesn't work.
BUT, if I load this movie clip into the FIRST scene (root scene), it works. It only doesn't work when it is in another movieclip, which is where I need it. On my main timeline I have a movieclip called "site content" and all my content is in there, so it needs to be in there.
WTF is going on, can you guys help.
Also, on more question, with the exit command for a projector
on (release) {
fscommand ("quit");
}
It quits it straight away. Can I get it to quit after a certain time interval, like 5 seconds so I can hear the button sound and have a little animation before it closes.
Thanks guys
[CS3] Playing A Movie Clip From Main Timeline
Hello friends
I have a problem trying to play another frame in a movie clip from a button on my main timeline. I made a scroll bar and I have Movieclips within many other movie clips. I am trying to play an animation which will change the content that the scroll bar has. However I cant get the movie clip to play another frame from my button on the main timeline. I know if you want a movie clip to play from the main timeline the code looks something like this:
on (release) {_root.pages.gotoAndPlay(2);}
But I think I am having problems because the the movie clip im trying to play is within two other movie clips. Is there code that can get me what I am trying to acomplish??
Thanks
djratlif
|