Movie Clip Visible After 5 sec

Hello,
I have 3 Movie clips foam1, foam2, foam3
they have to visible after 5 sec on hit test with scratch movieclip
scratch.onEnterFrame = function() {
    this.startDrag(true);
scratch.onRollOver = function() {
    if (this.hitTest(_root.soap1)) {
    foam1.gotoAndPlay(2);
           else if(this.hitTest(_root.soap2)) {
    foam2.gotoAndPlay(2);
          else if (this.hitTest(_root.soap3)) {
    foam3.gotoAndPlay(2);

scratch.onEnterFrame = function() {
    this.startDrag(true);
scratch.onRollOver = function() {
    if (this.hitTest(_root.soap1)) {
    foam1.gotoAndPlay(2);
setTimeout(5000,visibleF,foam1);
           else if(this.hitTest(_root.soap2)) {
    foam2.gotoAndPlay(2);
setTimeout(5000,visibleF,foam2);
          else if (this.hitTest(_root.soap3)) {
    foam3.gotoAndPlay(2);
setTimeout(5000,visibleF,foam3);
function visibleF(mc:MovieClip):Void{
mc._visible=true;

Similar Messages

  • Playing movie clips one after the other

    Hello, I am trying to figure out how to play several movie clips one after the other. Each clip has animation in it. When I drag the clip on the main timeline the timeline plays the frame but does not play the contents of the movie. how do I get it to play the contents of the first movie then play the contents of the second movie which is in frame 2 and so on?
    Thank you

    do you mean in the authoring environment you don't see nested movieclips play when scrubbing the timeline?  if yes, that cannot be changed.  if you used graphic symbols (instead of movieclips), you can see nested graphics play when scrubbing a parent timeline (if the parent timeline has sufficient frames).

  • Movie clips: 'visible' vs 'stop' as far as Fla performance

    Hi All,
    I would like to know if I should stop a FLV from playing as well as make it invisible (MC.visible = false) as a 'best practice.' Does an invisible movie clip -that was not stopped- cost more as far as cpu performance than a movie clip that was both stopped and made invisible?
    Thanks

    Not sure I understand your terminology (I'm new to AC3):
    I have an externally-linked FLV that plays inside a FLVPlayback component that exists inside a movie clip. In the timeline of that movie clip I have a framescript. That framescript includes the following: a global index variable (which increments), an addEventListener (that calls), a function (which calls) and another function. <==These are all located in that movie cllip's framescript.
    That movie clip is then dropped onto the main timeline's stage. Then, in the main timeline's framescript, I put an addEventListener on a Tween of that movieClip (so I can tell when it's done scaling the movie clip's size). I also have a global variable that holds a reference to that movie clip in that main timeline's framescript.
    Which of the above should I remove?
    Also: If the User will always be able to replay that movie clip at will (any time during the 'show'), should I still remove the addEventListeners, etc. when the movie clip plays for the first time?
    Thanks
    Message was edited by: paul_james123

  • Playing multiple movie clips one after other on main timeline

    Excuse the probably simple question but I'm just starting off with Flash.
    I have imported a few video trailers directly into flash and saved them as movie clips.
    I want to be able to insert these movie clips onto the main timeline and play them one after the other, repeating once they have all played.
    On the main timeline I have set a layer for each clip and a keyframe where the clip is inserted for each layer.
    When I go to play the flash file, it is showing the first frame from each movie file and then moving to the first frame of the next movie file.
    What do I need to do to make flash play the entire movie file in that specific frame before moving to the next frame where the next movie file is and playing all that movie?
    Sorry for what is probably a simple thing to ask.
    thanks

    Create an actions layer on the main timeline and place stop(); commands on that layer in each frame where a movieclip resides.
    Within in each movieclip, at the end (last frame) you want to tell the main timeline to play(); so that it moves to the next frame (where it will stop because of the stop() commands you add).
    So at the end of each movieclip you will put either:
    for AS2:  _parent.nextFrame();
    for AS3: MovieClip(parent).nextFrame();
    For the last movieclip in the lineup you will replace nextFrame() with gotoAndStop(1);

  • Only one of the movie clips visible

    I have a few movie clips on stage. I want only one movie clip to be visible in each interval.  Please assist.

    same movieclip not selected twice in a row:
    var mcA:Array=[A,B,C,D,E];
    A._visible=false;
    B._visible=false;
    C._visible=false;
    D._visible=false;
    E._visible=false;
    clearInterval(vizI);
    vizI=setInterval(vizF,2000);
    vizF();
    function vizF(){
    if(prevMC){
    prevMC._visible=false;
    while(prevMC==nextMC){
    nextMC=mcA[Math.floor(Math.random()*mcA.length)];
    nextMC._visible=true;
    prevMC=nextMC;
    //be sure to execute clearInterval(vizI) before navigating away from this frame

  • Movie clip not visible

    I the code below I want to add the following array of movie clips: activeLevelofTilesArray
    After I added the code below the swf plays with the following error:
    ReferenceError: Error #1069: Property [object S],[object T],...etc.
    not found on builtin.as$0.MethodClosure and there is no default value.
        at WordArray/startTileTimer()
        at WordArray/activeLevelofTiles()
        at WordArray/tileGenerator()
        at WordArray/levelGenerator()
        at WordArray()
        at wordText/initWordText()
        at flash.display::DisplayObjectContainer/addChild()
        at BugGoopFSGame/startTimer()
    I can also not see the movie clips.
    To try to trouble shoot this I ran a trace statement successfully and I turned off any graphics that might be in front of it. Why can't I see my movieclips and how do I fix error 1069?
    package
        import flash.display.*;
        import flash.text.TextField;
        import flash.events.Event;   
        import flash.utils.Timer;
        import flash.events.*;
        import flash.events.MouseEvent;
        import flash.media.Sound;
        import flash.media.SoundChannel;
        public  dynamic class WordArray extends MovieClip
                    public var wordtext:wordText =  new wordText;
                    var activeWordArray:Array;
                    var activeLevelofTenWordsArray:Array;
                   var activeLevelofTilesArray:Array;
                    public var letterArray:LetterArray;
                    var tileTimer = new Timer(500,384);
            //Movie clips of letter tiles to be used
            public var a:A = new A();
            public var f:F = new F();
            public var g:G = new G(); //etc. for all mc's
            private var wordArray:WordArray;
            private var letterTiles:Array = [a,f,g..etc];
                                  private var  lettersL01:Array = [a,a,f,f,f,g,g,h,h,i,i,n,n,n,o,o,o,o,s,s,t,t,t];
                                  private var  lettersL02:Array = [th,th,  //etc for all levels..
                                public var letterLevels:Array = [lettersL01,lettersL02,lettersL03,lettersL04,lettersL05,lettersL06,lettersL07,lettersL08, lettersL09,lettersL10,
                                                                                 lettersL11,lettersL12,lettersL13,lettersL14,lettersL15,lettersL16,lettersL17,lettersL18,l ettersL19,lettersL20,
                                                                                 lettersL21,lettersL22,lettersL23,lettersL24,lettersL25,lettersL26,lettersL27,lettersL28,l ettersL29,lettersL30];
    public var  wordsL1W1:Array = ["a"];  //etc for all words
    public var  wordsL01:Array = [wordsL1W1,...etc for all levels];
    public var wordLevels:Array = [wordsL01,wordsL02,...etc. for entire word array]
                    private var tf:TextField;
                    // ***constructor code
                    public function WordArray(_tf:TextField)
                        tf = _tf;
                        levelGenerator();
                    function levelGenerator():void
                        //**To get next level of 10 words
                        if(wordLevels.length>0)
                            activeLevelofTenWords();
                            tileGenerator();
                        else
                        //Game is complete
                    function activeLevelofTenWords():void
                        // na
                    function tileGenerator():void
                        if(letterLevels.length>0)
                                activeLevelofTiles();
                        else
                                //Game is complete
                        function activeLevelofTiles():void
                            activeLevelofTilesArray = letterLevels.shift();
                            shuffleTiles(activeLevelofTilesArray);
                            startTileTimer();
                        function shuffleTiles(a:Array)
                            //works perfectly
                        function startTileTimer():void
                                tileTimer.start();
                               trace(activeLevelofTilesArray);  // show in output pannel without errors
                                activeLevelofTilesArray.x = 399;
                                activeLevelofTilesArray.y= 30;
                                addChild[activeLevelofTilesArray];    //can not see these in swf ***these show in output pannel with an error code ReferenceError: Error #1069: Property [object F],[object O],[object F],...etc
                                trace("Letters should run"); //this shows in output pannel
    //rest not applicable..

    Hi Ned,
    Thanks, I moved the shuffle function out of activeLevelofTiles like you said and it still works. Yippeeeee
    I have 3 more issues that I need to sort out:
    I'm not doing this whole tile business correctly. As you predicted - If I trace the tile_index value I see only one tile eg. [object a]. It gives me a different one every time so I know the suffle function still works. I need for it to shuffle through the entire active level *3 so that "the tiles fall from the sky" individually generated by the timer that I have built. I guess I have to add it to an event handler.
    Although the trace (activeLevelofTilesArray[tile_index]); worked, I still can not see even the one object generated in the swf file - I think this will solve itself when issue 3 is solved
    After I descovered issues 1 and 2 above, I attempted to declare the tile_index variable outside of the loop. I must have done it wrong or incompletely because I get the following error messages on all the lines I used tile_index:
                             1120: Access of undefined property tile_index.
    Below is the code now:
    function tileIndex():void   //this must be wrong because it gives me that error code and as you predicted only gives one value (I want te whole lot times 3)
                                    for (var i: Number  =0; i < activeLevelofTilesArray.length*3; i++)
                                var tile_index = (i%activeLevelofTilesArray.length);
                        function activeLevelofTiles():void
                            activeLevelofTilesArray = letterLevels.shift();
                            shuffleTiles(activeLevelofTilesArray);
                                tileTimer.start();
                                trace(activeLevelofTilesArray);
                                activeLevelofTilesArray[tile_index].x = 399;
                                activeLevelofTilesArray[tile_index].y= 30;
                                addChild (activeLevelofTilesArray[tile_index]);  //maybe the addChild will work (issue 2) when the tile_index problem is solved
                                trace("Letters should run");
                                trace (activeLevelofTilesArray[tile_index]);

  • Loading and Unloading Movie Clip

    I'm trying to create a timer that would affect when a movie
    clip reloads after it has intitially unloaded using AS2. Could
    anyone offer any possible options.
    Thanks in advance.

    Look into the setInterval and setTimeout functions

  • How to unload a movie clip within a movie clip.

    Hi all,
    I am trying to unload a movie clip that is on a layer in a
    movie clip. After clicking on a button, I would like the movie to
    go back to the previous menu without playing a couple of movie
    clips that's in the main movie clip.
    So at the end of my movie clip I have:
    _parent.gotoAndPlay("resources"); // resources is the frame
    name in the main movie clip where I would like the movie to restart
    from
    _parent.vhost_mc.unloadMovie("vhost_mc"); //vhost_mc is a
    movie clip in the main movie clip that I want to unload
    _parent.videoScreen_mc.unloadMovie();
    But the videoScreen_mc doesn't unload. The main movie clip
    starts with the videoScreen and I've actually deleted the frames of
    videoScreen_mc where the "resources" frame starts, but still it
    appears.
    I've even tried _parent.videoScreen_mc._visible = false; but
    nothing works! I've tried createEmptyMovieClip, but since the
    videoScreen_mc is on the main timeline, I don't think it works.
    I've even tried putting this function on the "resources" frame:
    onEnterFrame = function() {
    play();
    vhost_mc.unloadMovie("vhost_mc");
    vhost_mc.removeMovieClip();
    this.videoScreen_mc.unloadMovie();
    this.videoScreen_mc.removeMovieClip();
    this.mask._visible = false;
    But when I do this, the play button loops starting at the
    "resources" frame.
    Essentially I would like the main movie clip to play without
    certain movie clips that's included within the main movie clip.
    I hope I'm making sense. Please help, I've been at this for
    days!

    Olá Felipe, tudo bem com você?
    In order to unload content loaded into a Loader object you can use either the unload() method or the unloadAndStop() method. The difference between them is that unloadAndStop() will unload the loaded SWF and try to stop executing any code that it was running including animations, sound and event listeners.
    If you wanto to call the unload() or unloadAndStop() methods from the loaded SWF you can use its loaderInfo.loader property to reference the Loader object that loaded it.
    It could be someting like this:
    this.closeButton.addEventListener(MouseEvent.CLICK, this.handleClose);
    protected function handleClose(event:MoueEvent):void {
         this.loaderInfo.loader.unloadAndStop();
    You can pass a Boolean parameter to unloadAndStop() to indicate if Flash's garbage collector should be run ont the unloaded SWF in order to free up memory. Considering the size of your SWFs, this could be a good option. The downside is that there is a performance penalty and in my professional experience, CPU is still a resource that is more scarce than memory, so use with care.
    Hope this helps.
    Abraço,
    Rui

  • Movie clip RemoveEventListener isn't working - AS3

    Friends,
    what seems to be a pretty straightforward code doesn't seem to work. I have a movieclip on the stage( this is on the second frame while the first one is the login screen). On this movie clip i load a textarea.
    When the screen goes from 1 to 2, i setup a zoom listener on the movie clip. Once the user initiates a zoom on the movie clip, i add two move event listeners (mouse down and up) to drag the movie clip. After all is done, i restore the movie clip to it's original position. In this restore code, i remove the mouse down and up events. But i don't think the remove event listener is working as i could still drag the clip(mouse down and up events are still active).
    What could be the issue ? Am i missing something here ?
    Thanks

    This is onZoom();
    public function onZoom(event:TransformGestureEvent):void
                // When the stage throws the gesture zoom event, enlarge the stage.
                event.stopImmediatePropagation();
                scStage.scaleX *= event.scaleX;
                scStage.scaleY = scStage.scaleX;
                if ( ! scStage.hasEventListener(MouseEvent.MOUSE_DOWN) ){
                    scStage.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
                if ( ! scStage.hasEventListener(MouseEvent.MOUSE_UP) ){
                    scStage.addEventListener(MouseEvent.MOUSE_UP, onUp);
    and this is restore code - both are in the same frame;
    public function onRestore(event:MouseEvent):void{
                scStage.width = mwidth;
                scStage.height = mheight;
                scStage.x = mx;
                scStage.y = my;
                scStage.removeEventListener(MouseEvent.MOUSE_DOWN, onRemove);
                scStage.removeEventListener(MouseEvent.MOUSE_UP, onRemove);
    scStage is the movie clip.
    however, i solved this problem in a different way as the eventlistener removal didn't work. if the component has been restored to the original position, i take appropriate action. thanks for your time.

  • How can you make movie clips partially visible?

    Okay, so this sounds simple, but I'm tottally lost... I'm a thirteen year old boy that has been using Flash for a little over 3 years. I program video games. I recently embarked on a game where one of the modes is to be split screen, player one gets the top half, player 2 the bottom. The promblem with this is that my game is based off of a moving background, where inorder to keep the main character centered the background moves instead of them. Becsause of this,when setting up split screen, the screen on the upper layer takes over the bottom because there would be more showing then there would be in the game: Parts would be off screen. I was wondering if there was anyway that using hitTest(s) (or some other method) you could make a movie clip partially visible/ invisible. I know the code for making something invisible when touching something else. But I was wondering if there was a way to make only the part of the movie clip touching another movie (it would have its alpha turned off... let's say it's a hitBox) or only the part of the movie clip touching the hitBox visible, invisible. Another way of looking at this is that I want a movie clip to be a small box, but inside I want their to be a huge picture. I want to make it so that when you move the picture different parts are viewable in this little box. And to make this as clear as I can... : I want to make a circle that I'll call the magnifying glass. I want to make an invisible picture that can be moved using code (I know that part). I want it so that when part of the picture is under the magnifying glass it's visible, not the hole thing, jus that circular area. Another reason I'd like to have this promblem solved is for a moving water effect. I want to make a movie clip and tween showing a square of rushing water, but without putting anything over parts of it (other than a hitBox) I want to make only a squiggly line of that water box visible. Thank you so much! =D I really hope you guys know! =D P.S. I also am currently using the trial of CS4, if that helps anything. But if it's only possible in AS3, then it's impossible to me because I use AS2 conservatively.

    Thanks... but I think you've misunderstood my question. I suppose magnifying glass wouldn't be the right word... I just wanted to explain that I want only the part of one mc touching another mc to be visible. I hope this isn't confusing. I have no need to enlarge an image. I want to make a movie clip only partially visible. Check out the fla.

  • My current os x is 10.9.5, using final cut express vers. 4.0.1.  I have imported .mov clips created with a older mac os x (lion) and converted them to import into fce. after doing this as well as putting clips on the fce timeline when playing back t.h

    My current os x is 10.9.5, using final cut express vers. 4.0.1.  I have imported .mov clips created on a older mac os x (lion) and when I wanted to import them into fce, a quicktime conversion window opened up and converted them (I haven't experienced this in the past). I then imported the converted quicktime clips into my fce project.  After doing this I took selected clips and put those edited clips on the fce timeline.  When playing the video back in the fce timeline,I noticed
    1) the video wasn't playing back smoothly like the original content
    2) when looking at the timecode reading of the timeline, the timecode was sputtering as well as the video and audio.  I exported to quicktime just to see if that was consistent, it was.
    When I play the converted quicktime content independently of fce,  it plays normally (no sputtering of timecode, video and audio.  Need help to resolve the sputtering playback of converted video content in the fce timeline.  I've never experienced this before.  Any suggestions?

    When you say you converted the clips before importing them into FCE, did you convert to AIC or DV and do the converted clips match your FCE Sequence settings exactly?  If not, go back and convert the original files again, using the intended Sequence settings as a guide.
    -DH

  • CC 2014 trial. MPEG MOVIE clips flickering on my time line! after render, and after export. tried all kinds of sequence settings,taking out transitions and effects ,even the audio tracks.....still flickering. They play fine outa the project files!?  HELLL

    CC 2014 trial. MPEG MOVIE clips flickering on my time line! after render, and after export. tried all kinds of sequence settings,taking out transitions and effects ,even the audio tracks.....still flickering. They play fine outa the project files!?  HELLLLLPPPPP!!!!

    We can not see your computer, your settings or even know what your source files are because we are not in the same room as you are!
    We cant see what you are doing wrong ...so you will have to tell us a lot more and show us some screen grabs of your settings.

  • Is there a way to restore a movie clip after you have closed the swf

    Can you restore the state of a movie clip after you have closed it?

    Could you explain more about what you mean by "assign component parameters" because I dont understand. Is this something I would do before it closed? Maybe I failed to explain clearly. i really need some help on this because i have no idea where to start. I have created an app, but I want a user to be able to reopen the app after close and pick up where they left off, or be able to change one thing and not have to start from the begining. I have searched around and cant find information on what i need so Im starting to wonder if that is possible using as3?

  • How do I make all buttons on stage unclickable, while a certain movie clip is visible?

    Hi,
    I have a button on stage which opens a popup (movie clip is popup + several other buttons). The movie clip and the buttons on it take up most of the stage.
    The problem is that the buttons which are on the stage, and are behind the movie clip, remain clickable (you can click through the movie clip!). How may I disable this?
    Basically, I need to make it that you cannot click through the movie clip.
    Thanks in advance!
    PS I am using CS5 and AS2.

    One way would be to make the movieclip clickable.  That would make it block the other objects behind it...
         mc.onRelease = function(){ }
         mc.useHandCursor = false; // to hide the hand cursor
    Another way would be to disable the buttons while the movieclip is present...
         btn.enabled = false;
    Another way would be to build conditional code into the button clicking code to not work if the movieclip is visible.
         btn.onRelease = function(){
              if(!mc._visible){
                    // okay to do stuff

  • Tracking the visible property of a movie clip

    Hello,
    I am trying to track the visible property of a movie clip as
    I need to perform a function when visible = true and another when
    visible =false
    I have tried to use a listener object but I can’t get
    it to work. Can you attach a listener object to listen for the
    visible property?
    I have also tried an IF statement inside the move clip but
    this only knows the state of the ._visible when it first runs.
    I have got it to work with an onEnterFrame function on a
    movie clip inside the one I want to know the property of but I
    don’t like using the onEnterFrame as it uses a lot or
    processor speed
    Is there an easy way to track the visible property of a
    movieclip???
    Thanks
    Sam.

    > thanks for the help but the watch() method doesn't work
    for getter/setter
    > properties. is ._visible a getter/setter property?
    I was afraid of that. Yes, _visible is a getter/setter, most
    properties are. Basically watch() only works on read-only
    properties and custom variables, which is a shame.
    So I don't know of any more elegant way than constantly
    checking to see if the value changed. Centralize it and maybe
    package it in a nice class and you might feel a little better about
    it...

Maybe you are looking for

  • Proprietary ati drivers for an old computer

    Hello all, as this is my first post; I've recently been getting a newly acquired, but fairly old laptop (a Dell latitude d600) set up with arch linux, and have been going through all sorts of fun problems. I've been enjoying arch, and the very strang

  • CN41N ABAP Dump

    Hi, When I am tryin to change object type in CN41N it is giving ABAP dump with funtion "AC_system_flush" and this function is calling another function "AC_FLUSH_CALL", Moreover when I checked "AC_FLUSH_CALL" got introduction statement "NO DIRECT CALL

  • Interconnect IP Issue

    Hello All, We haev a 4 ndoe rac..windows 64 bit. This is the information from alert log on ndoe 1 Interface type 1 Private 192.168.117.0 configured from OCR for use as a cluster interconnect Interface type 1 Public 192.168.0.0 configured from OCR for

  • Excel - Cube Set & Cube Ranked Member Filtering

    Hi There, I am trying to get something working in excel but for the life of me can not seem to make it work. I am trying to calculate measures on a list of top 10 countries. These countries must be filtered to international and also have additional f

  • Can't Install Photoshop CS5 Extended

    Hi, Just purchased a legit DVD copy of Photoshop CS5 Extended, and I am trying to install it on my Windows 7 Professional 64Bit machine.  After, I attempt to run Set-up.exe, the Adobe Installer comes up.  However, after a couple of minutes I get the