Sound in a Time Line?

I want to run a sound once in a timeline but want the sound to stop at the end of the first run on the timeline but want the timeline to continue to repeat without the sound running again.
Is there a way to do this?
Gary

learn about the sound class.
otherwise, what you're trying to do is not possible or, you may be lucky this time and be able to work around your setup but, sooner or later, you'll have problems when you attach sound to a timeline and then want to control the sound independent of the timeline.

Similar Messages

  • I have Adobe premiere 12 elements I have Buy it but this program is Corrupt. the are no sound on the time line. I have sound in my computer, this is no problem, I can listen every another things but NO Elements 12 OK I make ia video take down to the time

    i have Adobe premiere 12 elements I have Buy it but this program is Corrupt. the are no sound on the time line. I have sound in my computer, this is no problem, I can listen every another things but NO Elements 12 OK I make ia video take down to the time line. Video is OK BUT NO sound I have makit in 2 veeks from monday to next vek here whit this very bad program so i go to garbags I think I buy a another program is be better and have a Sound. This is very bad I am not god to English. I Have a pro camera and I will have a god support but this is very bad. I is bad to English. But this Program I buy i think this is very Corrupt. The mast find a sound in this program. I cvan not understan if You can sell this very bad program Videoredigering and this program have nothing sound. This is crazy.

    i have Adobe premiere 12 elements I have Buy it but this program is Corrupt. the are no sound on the time line. I have sound in my computer, this is no problem, I can listen every another things but NO Elements 12 OK I make ia video take down to the time line. Video is OK BUT NO sound I have makit in 2 veeks from monday to next vek here whit this very bad program so i go to garbags I think I buy a another program is be better and have a Sound. This is very bad I am not god to English. I Have a pro camera and I will have a god support but this is very bad. I is bad to English. But this Program I buy i think this is very Corrupt. The mast find a sound in this program. I cvan not understan if You can sell this very bad program Videoredigering and this program have nothing sound. This is crazy.

  • We have adobe premiere elements 10 and my picture is frozen on my time line. went i push play the image froze but sound play......what can i do

    the video on my time line froze . he do not play only sound .

    andrep
    What computer operating system and what video card/graphics card does that computer use?
    There is a known problem with Premiere Elements 10/NVIDIA Ge Force which is resolved by rolling back the driver
    version to May 2013. Let us determine first if that applies to your situation.
    ATR Premiere Elements Troubleshooting: PE10: NVIDIA Video Card Driver Roll Back
    If not, then we can move to other troubleshooting possibilities including properties of your source media, do you
    have the latest version of QuickTime installed on your computer, and other.
    Thank you.
    ATR

  • Sound time line not visible while editing.

    Hi all,
    I'm trying to edit a wedding AVI file that was ripped from a DVD. The ripping was done through ImTOO DVD Ripper Platinum 5, and the video played well with sound. Then I decided to import the video into Premiere to do some editing. After the video is imported, I dragged the file from the library onto the video time line. Normally when we do this in Premiere, corresponding sound time line will automatically appears below the video timeline. But it didn't happen for this file. Finally, when I play the file in Premiere CS3 Pro, no sound can be heard. Can someone help me solve this problem? Thank you!

    > Maybe he got divorced and he wants to cut all shots of the bride out (or paint a mustache on her)
    Rotoscoping may be the solution in that case. But that leaves the question of why invest so much time to achieve that? The result may be that optically he married a nobody or a mustached person and who would want to advertise that?

  • Sound cutts out while time line of song continue's

    Hello every one,
    I have a question to ask that's of a tolerable problem. Some time's the sound cut's out of my songs when I'm listening, and it happens in random area's through my play list's. It never happens in the same spot of the songs again so I know it's not the tracks fault or the download's. and when the sound does stop, the time line of the song keeps going, I just cant hear it. it's about ten seconds long when it happens.
    I have the 8-gig ipod touch with wifi,and, ask to join a wifi setting off. It doesn't bug me that much when it happens but I am wondering if it could prove to be a bigger problem down the road. Possibly a known sign of memory or early ram failure?
    Guru's unit! help a fellow ipod'r out please. lol
    P.S. I love the product! She's my 1st ipod and Apple product, and I'm VERY pleased with it...
    Thanks for reading!! Krempa...

    I have the same problem except with Audio Books. Also the cutting out seems to have no bearing on whether the audio book has been downloaded form ITunes or from a CD disc set. Very frustrating.

  • Multiple use of the same video time line for different audio tracks

    I have a 90 minute video timeline
    I will be putting different audio tracks in multiple languages.
    But as i was just editing i wondered if i could use only a segment (30 minutes ) of the timeline
    along with a 30 minute audio.
    Example:
    So the first thing on the menu will be the whole 90 minute video
    with a 90 minute music track
    Second thing might be the 90 minute video with a 90 minute commentary
    Third thing might be the first 30 minutes of video with a different commentary
    Forth thing on the menu might be the first 30 minutes of video and 30 minutes of
    a different language
    Etc.
    I realize i will need to make space (mb)  for all the audio.....but if i could use the same video or pieces of it
    that would be fantastic.
    If i can do this i am presuming i should use playlists and chapter playlists to get it done?
    I have never done this before and would love some feedback on an over view or tips
    that might save me some guess work
    Thanks for any help :-)
    Soshman

    Soshman wrote:
    Hey Stan!
    Thanks for your help...i think i am really getting this. And have learned a lot.
    I had to go back to my computer programming and flowcharting skills to figure out the flow :-)
    And i still have 153mb to spare when i build it.
    I ended up lining up all the different videos and audios exactly for each time line except for 1 timeline.
    Question: I know if the audio is shorter it will be ok.... but if the audio is longer than the video on a timeline ( and its the audio i assigned it by specify link )
    Will the DVD keep playing until the audio is done or end when the video is done playing?
    2nd Question: I am previewing the playlists with the "Preview from Here" feature
    I specify the link and chapter within that timeline ( it is the only timeline with more than one chaper....the one with the longer audio than video from the question above )
    For most of the audios i only need video chapter 1.....the preview here plays it ok but if i hit the skip to next (in the preview button on theright of the play button)...it goes to the next chapter #2... instead of the next timeline chapter 1 like it is programed to do from the playlist.
    I am wondering if this is just fluke in the preview feature...or will it do that on the actual DVD as well?
    Lastly because i am using different timelines. I am wondering if there are delays between playlists? for example...i have a long audio that continues between three timelines...i have spliced it pretty fine so it picks up perfectly on the next timeline...but i am wondering if the DVD when playing in realtime will have a little black space inbetween timelines.
    Thanks again for your help and time :-)
    Mark
    Hiya Mark.
    DVD-Video is video dominant, with the audio always following the visuals so if the audio ends berfore the video it will not (okay, should not) be a problem.
    However, the other way around could go either way - if the actual video timeline has ended the audio may well truncate so I would personally add videoblack at the very least.
    I am also not at all sure how you are going to work a single contiguous audio file across 3 separate playlists. This sounds flawed in concept to me (have I misunderstood your meaning?). In DVD-Video the format is graphically/visually dominant - the audio must always be tied to a visual asset be it a menu or a timeline - so there is no way to have one piece of audio playing across 3 timelines and having it play back glitch free whilst the timeline changes. You will not get a black space - it will simply stop. So unless I have misunderstood you in some way.........
    As Stan says, preview is flaky - the only way to know for sure is to multiplex & burn.

  • How can I create a function of sound volue from time using AudioQueueBufferRef??

    I have a question how can I analyze class AudioQueueBufferRef, for creating a function of sound volue from time?? Here is what I get . there is AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex]; volume height is 2000 elements from SInt16* coreAudioBuffer = (SInt16*)fillBuf->mAudioData. so function looks like H(t*i)=coreAudioBuffer[i] where t = 1/sampleRate = 1/22050 but here is a problem. my program gets sound and uses a class AudioStreamer for this. AudioStreamer has 3000 lines when I play music from Free Internet Radio - SHOUTcast Radio - Thousands of Free Online Radio Stations. internet radio - my problem is as follows either I dont know where 85 % of sound information is or I dont know how I can analyze class AudioQueueBufferRef
    Here is the code where I analyze Buffer.
    {@synchronized(self)
    if ([self isFinishing] || stream == 0)
    return;
    inuse[fillBufferIndex] = true; // set in use flag
    buffersUsed++;
    // enqueue buffer
    AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex];
    fillBuf->mAudioDataByteSize = bytesFilled;
    // ======>in this place I analyze Buffer
    if (packetsFilled)
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, packetsFilled, packetDescs);
    else
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, 0, NULL);
    when bitRate = 24 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 1,5 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.15 so it is 15 % of all information
    as a result If buffer comes at 0.0 seconds he lasts up to 0.1 seconds.farther in my function there is no volume. second buffer comes in 0.7 seconds and lasts up to 0.8 seconds. but in reality the sound doesnt breaks. Maybe I'm doing something wrong .please tell me.
    just for comparison
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 2 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 1660 double sampleRate=asbd.mSampleRate == 44100 numberOfChannels = asbd.mChannelsPerFrame == 2 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.02 number of buffers per second float numBuffersInOneSeconds == 10 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information

    You cannot write custom commands for expressions.
    That being said, there are a couple of options:
    Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
    Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
    Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
    Norbert

  • No audio in source monitor but it works on the time line

    Hi
    I just started to use a Canon XF300 and I have noticed that when I double click on a file and it opens in the source monitor the video plays but I get no audio. If I drop that same clip onto the time line I get video and audio.
    Is there a setting I am missing?
    Thanks
    Dennis

    Hi
    Yes both Channel 1 and 2.
    Also I just came across another funny thing. After opening the first clip in the source monitor I can not open any other clips unless I open them from the time line. Double click a clip in the time line so it opens in the source monitor and then THE SOUND WORKS!  Weird.
    Dennis

  • Bleep on audio on time line

    hi all i am new to fc when i have cut up my footage and put it on the time line there is just a bleeping sound on the audio tracks when played. however when scrubbing through the time line i can hear the right audio. it also plays in the viewer and canvas windows not sure what is wrong please help

    Your audio format does not match your sequence settings.
    Time to have a read through the intro sections of the manual - it does a good job explaining the issues.
    x

  • Clips on Time Line Moving forward

    I have video on V1 and photos on V2. When I delete V2 photos from the beginning of the time line all of the photos from the right of the time line move to the left. I cannot find a way to stop the other photos from moving. Also If I delete a clip from V1 there's no problem. All other clips stay in place. Only V2 moves.

    Sounds like you performed a 'ripple' delete instead of a 'lift' delete.
    If you have a full sized keyboard, the smaller DELETE key above the left arrow performs a 'ripple' delete, moving all clips further down the Timeline to the left to fill the gap.
    The larger DELETE key above the \ key, performs a 'lift' delete. The selected clip will be deleted but leave a gap.
    -DH

  • NEED HELP PLEASE / GREEN LIGHT LINE IN EDITING TIME LINE

    Hello,
    I am editing a video using premier 6.5.
    When I render the video edited the red line in the work space pass to dark green what is normal, but also appears a smal portion of the video with a light green line in the rendered area.
    When i play the video and the reader pass through this light green part the sound sudently increasy 80%.
    I tried everything even re editing that section but the light green line keep appearing after rendering and the sound problem back.
    This part of the editing where the light green line is have many sound tracks but the sound level is the same to the rest of video so dont understand why that happen
    can anyone help please?

    Hi thanks for your reply.
    When i render the time line a dark green line appears...as u say that show the working area has been rendered but in this case also other extra line appears in part of the video ( only in a section) the line is light green ...diferent to the other
    when I play video and pass though this light green line the music tract gets extra loud 80% higher.
    When I play again the video to check if the other parts has been affected I can see all sound levels have changed and need to use audio mixer to balance them again. In spite of that when pass thought light green line all happen again.
    could be that the sound tracks have different formats? in that section where the problrem is I have 6 diferent sound tracks overlaped but the sound level is the same for all so do not understand why when i render appear this green extra line

  • Sound problems with back line out port

    Hey everyone, I just sent an email to MSI Tech Support, but figure I would post a message here as well.  I just put together a new system, but I'm having a problem with the back line out port.
    My problem: When I plug in the front panel audio connectors (Left Audio Out, Left Audio Return, Right Audio Out, Right Audio Return) in the motherboard on pins 5-6 and 9-10 of JAUD1, the back line out does not work properly.  I get sound on only the right speaker of the headphones.
    More info:
    - Audio Driver: 5.10.0.5620 (from MSI CD)
    - If I instead plug the headphones on the front audio line out, then sound is fine
    - Here's the strange part, if I unplug the front audio connectors from the motherboard (and short pins 5-6, 9-10 with the jumpers, obviously), then the sound on the back line out works properly!
    - My Windows sound settings are fine
    Has anyone heard of this problem?  Any ideas/suggestions of what I could try?  
    Could this be a defective board?  Could it be bad wires on the case?  Seems unlikely since both back line out and front line out work depending on what I have setup.
    Help! :-)
    Thanks,
    icab

    Quote
    Originally posted by Steve F.
    You could try:
    1. Read the manual
    2. Search this forum.
    Rear sound problem
    Third time this has come up in 1 or 2 weeks.
    Steve,
    I appreciate the reply, but I believe you are wrong.  Yes, I have searched the forum and did find that thread.  Yes, I have read the manual.  The only thing that it says is: "If you don't want to connect to the front audio header, pins 5 & 6, 9 & 10 have to be jumpered in order to have signal output directed to the rear audio ports. Otherwise, The Line-out connector on the back panel will not function."  That's not my case since I want both ports to work (not outputting the signal both at the same time, obviously).
    This can't be ByDesign.  Either my board is defective or MSI is not following the Intel Front Panel I/O Connectivity Guide correctly.  The whole point of having 4 wires for the front panel audio ports, 2 of the wires being Aud_Ret_R and Aud_Ret_L, is so that the audio signal is sent to the front line out and _returned_ to the back line out if nothing is plugged in the front line out.
    I have an IBM machine with an intel mobo at work and it works as mentioned in the design guide.
    Any other ideas, anyone? I can still RMA my motherboard, but it's a design issue, i guess I'm stuck. I never got an automated reply from MSI Tech Support, so I guess my email never went through.  I'll send another email and let the forum know of the results.
    Thanks,
    Igor

  • Time line

    i know its a bad practice to use timeline scripting but  i was obliged to do that
    if user clicked a button that will goto and play for example frame 10 and at frame 10 i have my game code that ill start
    the problem is when user clicks the button ( i have a mosue event that shoots) so directly when its loaded i can see the shot in the middle of the screen how can i avoid this
    is there something i can do to delay that

    stop();
        import flash.display.*;
        import flash.events.*;
        import flash.ui.Keyboard;
        import flash.ui.Mouse;
        import flash.geom.Point;
        import flash.utils.Timer;
        import flashx.textLayout.formats.BackgroundColor;
        import flash.media.*;
        import flash.media.SoundChannel;
        import flash.media.SoundTransform;
        import flash.text.*;
        import flash.events.MouseEvent;
        import level2.greensock.*;
        import level2.greensock.easing.*;
        import level2.shumi.l2Building;
        import level2.shumi.enemy;
        import level2.shumi.enemyTank;
        import level2.shumi.ExplosionClass;
        import level2.shumi.groundUnits;
        import level2.shumi.Tank;
        import level2.shumi.TankBullet;
            var rightInnerBoundary:uint;
            var leftInnerBoundary:uint;
            var topInnerBoundary:uint;
            var bottomInnerBoundary:uint;
            var level2bg:aBackground ;
            var aBuilding:l2Building;
            var myTank:Tank ;
            var ghostTank:Tank;
            var hitCount:Number = 0;
            var _l2bullets:Array ;
            var _Gunit:Array  ;
            var groundUnit:groundUnits  ;
            var groundUnit2:groundUnits  ;
            var groundUnit3:groundUnits  ;
            var groundUnit4:groundUnits  ;
            var enemySoldier1;
            var enemySoldier2;
            var anEnemyTank:enemyTank  ;
            var speed:int = 1;
            var radians:Number = 180 / Math.PI;
            var turnRate:Number = .05;
            var agroRange:Number = 300;
            var distanceX:Number = 0;
            var distanceY:Number = 0;
            var distanceTotal:Number = 0;
            var moveDistanceX:Number = 0;
            var moveDistanceY:Number = 0;
            var moveX:Number = 0;
            var moveY:Number = 0;
            var totalmove:Number = 0;
            var hitCounter:Number = 5;
            var bullet:TankBullet;
            var shootSoundl2:shoot1;
            var soundControl:SoundChannel;
            var deadSound:dead;
            var explodeSoundl2:explode;
            var emptySound:empty;
            var hitSound:hit;
            var bombsLeftl2:Number ;
            var textFormat:TextFormat = new TextFormat ;
            var numberDisplay:TextField  = new TextField ;
            var Score:int ;
            var scoreDisplay:TextField = new TextField  ;//score display  text field
            var bombsLeftDisplay2:TextField = new TextField  ;
            var BombsNum:TextField = new TextField  ;
            var mybtn:btn = new btn  ;
            var mybtn2:btn2 = new btn2  ;
            var myCursor:cursor = new cursor  ;
            var _l2Timer:Timer;
            var enemyBullet1l2:TankBullet;
            var _eBulletl2:Array;
            var myTankHealth : uint = 10;
            var gameOverScreen : MovieClip;
            // var tankOffsetX :int = myTank.x + level2bg.x;
            // var tankOffsetY : int = myTank.y + level2bg.y;
                init();
            function setuptextfieldsl2()
                textFormat.font = "Helvetica";
                textFormat.size = 25;
                textFormat.color = 0x000000;
                textFormat.align = TextFormatAlign.CENTER;
                //Configure the  score  text field
                numberDisplay.defaultTextFormat = textFormat;
                numberDisplay.autoSize = TextFieldAutoSize.CENTER;
                numberDisplay.border = false;
                numberDisplay.text = "0";
                scoreDisplay.defaultTextFormat = textFormat;
                scoreDisplay.autoSize = TextFieldAutoSize.CENTER;
                scoreDisplay.border = false;
                scoreDisplay.text = "Score : ";
                bombsLeftDisplay2.defaultTextFormat = textFormat;
                bombsLeftDisplay2.autoSize = TextFieldAutoSize.CENTER;
                bombsLeftDisplay2.border = false;
                bombsLeftDisplay2.text = "50";
                BombsNum.defaultTextFormat = textFormat;
                BombsNum.autoSize = TextFieldAutoSize.CENTER;
                BombsNum.border = false;
                BombsNum.text = "Bombs Left :";
                //=====
                //Display and score text field
                stage.addChild(numberDisplay);
                stage.addChild(scoreDisplay);
                stage.addChild(bombsLeftDisplay2);
                stage.addChild(BombsNum);
                numberDisplay.x = stage.stageWidth - 40;
                numberDisplay.y = 10;
                scoreDisplay.x = stage.stageWidth - 150;
                scoreDisplay.y = 10;
                bombsLeftDisplay2.x = stage.stageWidth - 55;
                bombsLeftDisplay2.y = 40;
                BombsNum.x = stage.stageWidth - 200;
                BombsNum.y = 40;
            function init()
            Mouse.hide();
                setuptextfieldsl2();
            level2bg = new aBackground  ;
            aBuilding= new l2Building  ;
            myTank = new Tank  ;
            ghostTank = new Tank  ;
    _l2bullets = new Array  ;
            _Gunit = new Array  ;
            groundUnit = new groundUnits  ;
            groundUnit2 = new groundUnits  ;
    groundUnit3 = new groundUnits  ;
            groundUnit4 = new groundUnits  ;
            anEnemyTank = new enemyTank  ;
    bombsLeftl2= 50;
            Score = 0;
                                                                                    myTankHealth = 10;
                                                                                    // set patroling points in an array, as many as u like, soldier will start at
                // startPointX and StartPointY parameters passed in enemy creation
                var patrolPointsSoldier1:Array = new Array  ;
                patrolPointsSoldier1.push(new Point(333,1440));
                patrolPointsSoldier1.push(new Point(998,1447));
                patrolPointsSoldier1.push(new Point( 600 , 1800));
                var patrolPointsSoldier2:Array = new Array  ;
                patrolPointsSoldier2.push(new Point(444,1440));
                patrolPointsSoldier2.push(new Point(1000,1460));
                //enemy parameter (displayObjectContainer for stage refrence, PatrolPointArray,;
                // startPointX, startPointY)
                enemySoldier1 = new enemy(this,patrolPointsSoldier1,440,1440);
                enemySoldier2 = new enemy(this,patrolPointsSoldier2,500,500);
                rightInnerBoundary = stage.stage.width;
                leftInnerBoundary = 0;
                topInnerBoundary = 0;
                bottomInnerBoundary = stage.stageHeight;
                level2bg.x = 0;
                level2bg.y = 0;
                aBuilding.x = 700;
                aBuilding.y = 750;
                level2bg.addChild(aBuilding);
                addChild(level2bg);
                groundUnit.x = 500;
                groundUnit.y = 290;
                level2bg.addChild(groundUnit2);
                level2bg.addChild(groundUnit);
                level2bg.addChild(groundUnit3);
                level2bg.addChild(groundUnit4);
                level2bg.addChild(enemySoldier1);
                level2bg.addChild(enemySoldier2);
                groundUnit2.x = 780;
                groundUnit2.y = 290;
                groundUnit3.x = 500;
                groundUnit3.y = 700;
                groundUnit4.x = 70;
                groundUnit4.y = 960;
                _Gunit.push(groundUnit,groundUnit2,groundUnit3,groundUnit4);
                myTank.x = 300;
                myTank.y = 400;
                this.addChild(myTank);
                this.addChild(ghostTank);
                ghostTank.alpha = 0;
                anEnemyTank.x = level2bg.x + 500;
                anEnemyTank.y = level2bg.y + 500;
                level2bg.addChild(anEnemyTank);
                shootSoundl2 = new shoot1  ;
                deadSound = new dead  ;
                explodeSoundl2 = new explode  ;
                hitSound = new hit  ;
    mybtn.x = stage.stageWidth - 55;
                mybtn.y = stage.stageHeight - 50;
                mybtn2.x = stage.stageWidth - 90;
                mybtn2.y = stage.stageHeight - 50;
                myCursor.x = mouseX;
                myCursor.y = mouseY;
                addChild(myCursor);
                addChild(mybtn);
                addChild(mybtn2);
    _l2Timer = new Timer(200);
    _eBulletl2 = new Array ();
                addListenersl2();
            function controlAudiol2(snd:Sound):void
                // if statement to avoid overlapping of sound objects
                if (soundControl)
                    soundControl.stop();
                    soundControl = null;
                var trans:SoundTransform = new SoundTransform(0.8);
                soundControl = snd.play(0,0,trans);
            function l2moveBullets()
                for (var i:int = 0; i < _l2bullets.length; i++)
                    bullet = _l2bullets[i];
                    //bullet.rotation = _turretAngle
                    bullet.x +=  bullet.vx;
                    bullet.y +=  bullet.vy;
                    //check the bullet's stage boundaries
                    if (bullet.y < 0 || bullet.x < 0 || bullet.x > stage.stageWidth || bullet.y > stage.stageHeight)
                        //Remove the bullet from the stage
                        stage.removeChild(bullet);
                        //Remove the bullet from the _l2bullets
                        //array
                        _l2bullets.splice(i,1);
                        bullet = null;
                        //Reduce the loop counter
                        //by one to compensate
                        //for the removed bullet
                        i--;
                    if (bullet != null && bullet.hitTestObject(aBuilding.buildingMovieClip.buildinghitTest))
                        //Update the score, the score display
                        //and remove the bullet
                        aBuilding.destroyBuilding();
                        stage.removeChild(bullet);
                        numberDisplay.text = String(Score);
                        controlAudiol2(explodeSoundl2);
                        _l2bullets.splice(i,1);
                        bullet = null;
                        i--;
                    if (bullet != null && bullet.hitTestObject(anEnemyTank.enemyTankMovieClip.eTankHitTest))
                        //Update the score, the score display
                        //and remove the bullet
                        anEnemyTank.destroyEnemyTank();
                        stage.removeChild(bullet);
                        _l2Timer.stop();
              _l2Timer.addEventListener(TimerEvent.TIMER, enemyTankShoot);
                        Score = Score + 50;
                        numberDisplay.text = String(Score);
                        controlAudiol2(explodeSoundl2);
                        _l2bullets.splice(i,1);
                        bullet = null;
                    for (var j:int = 0; j < _Gunit.length; j++)
                        if (bullet != null && bullet.hitTestObject(_Gunit[j].base.baseHitTest))
                            _Gunit[j].bulletHit();
                            controlAudiol2(hitSound);
                            Score = Score + 50;
                            numberDisplay.text = String(Score);
                            stage.removeChild(bullet);
                            _l2bullets.splice(i,1);
                            bullet = null;
            function moveTank()
                //THE TANK
                //Increase the tank's speed if the up key is being pressed
                if (myTank.accelerate)
                    myTank.speed +=  0.1;
                    myTank.tankMovieClip.atank.play();
                    //Add some optional drag;
                    myTank.speed *=  myTank.friction;
                else
                    //Add friction to the speed if the tank is
                    //not accelerating
                    myTank.speed *=  myTank.friction;
                    myTank.tankMovieClip.atank.stop();
                //Calculate the acceleration based on the angle of rotation;
                var tankAngle = myTank.rotation * Math.PI / 180;
                myTank.acceleration_X = myTank.speed * Math.cos(tankAngle);
                myTank.acceleration_Y = myTank.speed * Math.sin(tankAngle);
                //Update the tank's velocity
                myTank.vx = myTank.acceleration_X;
                myTank.vy = myTank.acceleration_Y;
                //Force the tanks's velocity to zero
                //it falls below 0.1
                if (Math.abs(myTank.vx) < 0.1 && Math.abs(myTank.vy) < 0.1)
                    myTank.vx = 0;
                    myTank.vy = 0;
                if (myTank.x - myTank.width / 2 < leftInnerBoundary)
                    myTank.x = leftInnerBoundary + myTank.width / 2;
                    rightInnerBoundary = stage.stageWidth - myTank.x;
                    level2bg.x -=  myTank.vx;
                else if (myTank.x + myTank.width / 2 > rightInnerBoundary)
                    myTank.x = rightInnerBoundary - myTank.width / 2;
                    leftInnerBoundary = myTank.width / 2 + 10;
                    level2bg.x -=  myTank.vx;
                if (myTank.y - myTank.height / 2 < topInnerBoundary)
                    myTank.y = topInnerBoundary + myTank.height / 2;
                    bottomInnerBoundary = stage.stageHeight - myTank.y;
                    level2bg.y -=  myTank.vy;
                else if (myTank.y + myTank.height / 2 > bottomInnerBoundary)
                    myTank.y = bottomInnerBoundary - myTank.height / 2;
                    topInnerBoundary = myTank.height;
                    level2bg.y -=  myTank.vy;
                if (level2bg.x > 0)
                    level2bg.x = 0;
                    leftInnerBoundary = 0;
                else if (level2bg.y > 0)
                    level2bg.y = 0;
                    topInnerBoundary = 0;
                else if (level2bg.x < stage.stageWidth - level2bg.width)
                    level2bg.x = stage.stageWidth - level2bg.width;
                    rightInnerBoundary = stage.stageWidth;
                else if (level2bg.y < stage.stageHeight - level2bg.height)
                    level2bg.y = stage.stageHeight - level2bg.height;
                    bottomInnerBoundary = stage.stageHeight;
                //Move and rotate the tank
                myTank.x +=  myTank.vx;
                myTank.y +=  myTank.vy;
                myTank.rotation +=  myTank.rotationSpeed;
                if (myTank.hitTestObject(level2bg.hitTest1) || myTank.hitTestObject(level2bg.hitTest2) || myTank.hitTestObject(level2bg.hitTest3) || myTank.hitTestObject(level2bg.hitTest4) || myTank.hitTestObject(level2bg.hitTest5) || myTank.hitTestObject(level2bg.hitTest6) || myTank.hitTestObject(level2bg.hitTest7) || myTank.hitTestObject(level2bg.hitTest8) || myTank.hitTestObject(level2bg.hitTest9) || myTank.hitTestObject(level2bg.hitTest10) || myTank.hitTestObject(level2bg.hitTest11) ||myTank.hitTestObject(level2bg.gameHitTest1) || myTank.hitTestObject(level2bg.gameHitTest2) || myTank.hitTestObject(level2bg.gameHitTest3))
                    trace("tank hit" + myTank.x);
                    myTank.x = ghostTank.x;
                    myTank.y = ghostTank.y;
                else
                    ghostTank.x = myTank.x;
                    ghostTank.y = myTank.y;
                if (myTank.tankMovieClip.tankHitTest.hitTestObject(enemySoldier1._player.soldierHitTestPoint ))
                    if (! enemySoldier1.isDead)
                        trace("hit soldier");
                        enemySoldier1.killSoldier();
                        controlAudiol2(deadSound);
                        Score = Score + 100;
                        //numberDisplay.text = String(Score);
                if (myTank.tankMovieClip.tankHitTest.hitTestObject(enemySoldier2._player.soldierHitTestPoint ))
                    if (! enemySoldier2.isDead)
                        enemySoldier2.killSoldier();
                        controlAudiol2(deadSound);
                        Score = Score + 200;
                        //numberDisplay.text = String(Score);
                //THE TURRET
                //THE TURRET
                var _turretAngle:Number = getAnglel2();
                _turretAngle -=  myTank.rotation;
                //Rotate the turret towards the mouse
                myTank.turretMovieClip.rotation = _turretAngle;
                //var angle:Number = Math.atan2 (mouseY - myTank.y, mouseX - myTank.x);
                //myTank.turretMovieClip.rotation = (angle * 180 / Math.PI) - 180;
            function getAnglel2():Number
                //Convert turrets points from local to global coordinates
                //Compensate for the rotation of the tank
                var turretPoint:Point = new Point(myTank.turretMovieClip.x,myTank.turretMovieClip.y);
                var turretPoint_X:Number = myTank.localToGlobal(turretPoint).x;
                var turretPoint_Y:Number = myTank.localToGlobal(turretPoint).y;
                var angle = Math.atan2(turretPoint_Y - stage.mouseY,turretPoint_X - stage.mouseX) * 180 / Math.PI;
                return angle;
            function addListenersl2()
                stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
                stage.addEventListener(KeyboardEvent.KEY_UP,keyUpHandler);
                stage.addEventListener(Event.ENTER_FRAME,frameListener);
                stage.addEventListener(MouseEvent.CLICK,mouseDownHandler);
                mybtn.addEventListener(MouseEvent.MOUSE_DOWN,onClickl2);
                mybtn2.addEventListener(MouseEvent.MOUSE_DOWN,onClick2);
                stage.addEventListener(Event.ENTER_FRAME,pauseListener);
                _l2Timer.addEventListener(TimerEvent.TIMER, enemyTankShoot);
            function getAngle2l2(aObject2:MovieClip):Number
                var turPoint:Point = new Point(aObject2.x,aObject2.y);
                var turPoint_X:Number = aObject2.localToGlobal(turPoint).x;
                var turPoint_Y:Number = aObject2.localToGlobal(turPoint).y;
                var angle2 = Math.atan2(turPoint_Y - myTank.y,turPoint_X - myTank.x) * 180 / Math.PI;
                return angle2;
            function enemyTankShoot(event:TimerEvent):void
                //Create a bullet and add it to the stage
                enemyBullet1l2 = new TankBullet(getAngle2l2(anEnemyTank.enemyTurretMovieClip));
                level2bg.addChild(enemyBullet1l2);
                //Set the bullet's starting position
                var radius:int = 30;
                var angle:Number = (anEnemyTank.rotation + anEnemyTank.enemyTurretMovieClip.rotation - 15)  * Math.PI / 180;
                enemyBullet1l2.x = anEnemyTank.x    + anEnemyTank.enemyTurretMovieClip.x + radius * Math.cos(angle);
                enemyBullet1l2.y = anEnemyTank.y  +anEnemyTank.enemyTurretMovieClip.y+ radius * Math.sin(angle);
                //Set the bullet's velocity based
                //on the angle
                enemyBullet1l2.vx = Math.cos(angle) * 5;
                enemyBullet1l2.vy = Math.sin(angle) * 5;
                //Push the bullet into the _l2bullets array
                _eBulletl2.push(enemyBullet1l2);
                //Find a random start time for the next bullet
                //var randomFireTime:Number = Math.round(Math.random() * 1000) + 200;
                _l2Timer.delay = 750;
            function onClick2(event:MouseEvent):void
                stage.addEventListener(Event.ENTER_FRAME,frameListener);
                stage.addEventListener(MouseEvent.CLICK,mouseDownHandler);
            function onClickl2(event:MouseEvent):void
                stage.removeEventListener(Event.ENTER_FRAME,frameListener);
                stage.removeEventListener(MouseEvent.CLICK,mouseDownHandler);
                anEnemyTank.enemyTankMovieClip.eTreads.stop();
                //Mouse.show();
            function mouseDownHandler(event:MouseEvent):void
                fireBullet();
            function fireBullet()
                var bullet:TankBullet = new TankBullet(getAnglel2());
                stage.addChild(bullet);
                var radius:int = -20;
                var angle:Number = (myTank.rotation + myTank.turretMovieClip.rotation) * Math.PI / 180;
                //3. Position the bullet
                bullet.x = myTank.x +myTank.turretMovieClip.x + 20 + radius * Math.cos(angle);
                bullet.y = myTank.y +myTank.turretMovieClip.y - 5 + radius * Math.sin(angle);
                //Set the bullet's velocity based
                //on the angle
                bullet.vx = Math.cos(angle) * -7 + myTank.vx;
                bullet.vy = Math.sin(angle) * -7 + myTank.vy;
                //Push the bullet into the _l2bullets array
                _l2bullets.push(bullet);
                controlAudiol2(shootSoundl2);
                bombsLeftl2--;
                bombsLeftDisplay2.text = String(bombsLeftl2);
                trace("you still have " + bombsLeftl2);
                if (bombsLeftl2 == 0)
                    stage.removeEventListener(MouseEvent.CLICK,mouseDownHandler);
                    //stage.addEventListener(MouseEvent.CLICK , playemptySound);
                    explodeTank(myTank.x ,myTank.y,myTank);
                            myTank.ismyTankDestroyed = true;
                    endGamel2("You Loose");
            function keyUpHandler(event:KeyboardEvent):void
                switch (event.keyCode)
                    case Keyboard.LEFT :
                        myTank.rotationSpeed = 0;
                        break;
                    case Keyboard.RIGHT :
                        myTank.rotationSpeed = 0;
                        break;
                    case Keyboard.UP :
                        myTank.accelerate = false;
            function pauseListener(event:Event):void
                updateCursor();
            function frameListener(event:Event):void
                if(!myTank.ismyTankDestroyed)
                moveTank();
                l2moveBullets();
                if (! anEnemyTank.isDestroyed && !myTank.myTankisDestroyed)
                    moveEnemyTank(anEnemyTank);
                moveGroundUnits();
                moveEnemyBulletl2();
                //checkWinner();
            /* function rangeListener( )
                var eDistanceX:Number = myTank.x - anEnemyTank.x;
                var eDitanceY:Number = myTank.y - anEnemyTank.y;
                var rangeDistance:Number = Math.sqrt(eDistanceX * eDistanceX + eDitanceY * eDitanceY);
                if (rangeDistance <= 200)
                        _l2Timer.start();
                    else
                        _l2Timer.stop();
            function moveEnemyBulletl2()
                for (var i:int = 0; i < _eBulletl2.length; i++)
                        enemyBullet1l2 = _eBulletl2[i];
                        enemyBullet1l2.x +=  enemyBullet1l2.vx;
                        enemyBullet1l2.y +=  enemyBullet1l2.vy;
                        if (enemyBullet1l2.y < 0 || enemyBullet1l2.x < 0 || enemyBullet1l2.x > stage.stageWidth || enemyBullet1l2.y > stage.stageHeight)
                        //Remove the bullet from the stage
                        level2bg.removeChild(enemyBullet1l2);
                        //Remove the bullet from the _l2bullets
                        //array
                        _eBulletl2.splice(i,1);
                        enemyBullet1l2 = null;
                        //Reduce the loop counter
                        //by one to compensate
                        //for the removed bullet
                    if(enemyBullet1l2 != null && enemyBullet1l2.hitTestObject(myTank.tankMovieClip.tankHitTest))
                        level2bg.removeChild(enemyBullet1l2);
                        _eBulletl2.splice(i,1);
                        enemyBullet1l2 = null;
                        myTankHealth --;
                        if(myTankHealth ==0)
                            explodeTank(myTank.x ,myTank.y,myTank);
                            myTank.ismyTankDestroyed = true;
                            endGamel2("You Loose ");
                            Mouse.show();
            function endGamel2(Message:String)
                Mouse.show();
                gameOverScreen  = new GameOVer();
                gameOverScreen.gameover_txt.text = Message;
                gameOverScreen.playAgain_btn.addEventListener(MouseEvent.CLICK, restartGame);
                gameOverScreen.l2main_btn.addEventListener(MouseEvent.CLICK, l2MainMenu);
                gameOverScreen.l2score_btn.addEventListener(MouseEvent.CLICK, l2Score);
                addChild(gameOverScreen);
                gameOverScreen.x = stage.stageWidth/2;
                gameOverScreen.y = stage.stageHeight/2;
                removeChild(level2bg);
                stage.removeChild(numberDisplay);
                stage.removeChild(scoreDisplay);
                stage.removeChild(bombsLeftDisplay2);
                BombsNum.text ="" ;
                removeChild(mybtn);
                removeChild(mybtn2);
                bombsLeftDisplay2.text = "";
                removeChild(myCursor);
            function restartGame(event:MouseEvent):void
                init();
                removeChild(gameOverScreen);
                myTankHealth = 10;
            function l2MainMenu(event:MouseEvent):void
                removeChild(gameOverScreen);
                gotoAndPlay("GUI");
            function l2Score(event:MouseEvent):void
                removeChild(gameOverScreen);
                gotoAndPlay("Score2");
            function explodeTank(xPos:uint,yPos:uint,target:DisplayObject)
              var anExp:ExplosionClass = new ExplosionClass(xPos,yPos,"bombExplosion");
                addChild(anExp);
                removeChild(target);
                if (target == myTank)
                    stage.removeEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
                stage.removeEventListener(KeyboardEvent.KEY_UP,keyUpHandler);
                stage.removeEventListener(Event.ENTER_FRAME,frameListener);
                stage.removeEventListener(MouseEvent.CLICK,mouseDownHandler);
                mybtn.removeEventListener(MouseEvent.MOUSE_DOWN,onClickl2);
                mybtn2.removeEventListener(MouseEvent.MOUSE_DOWN,onClick2);
                stage.removeEventListener(Event.ENTER_FRAME,pauseListener);
                _l2Timer.removeEventListener(TimerEvent.TIMER, enemyTankShoot);
                //removeEventListener( Event:Timer,timerHandler);
            function updateCursor()
                myCursor.x = mouseX;
                myCursor.y = mouseY;
          function moveGroundUnits()
                for (var j:int = 0; j < _Gunit.length; j++)
                    if(!_Gunit[j].isDestroyed && !myTank.myTankisDestroyed)
                    _Gunit[j].moveBase(myTank.x,myTank.y);
            function moveEnemyTank(object:MovieClip)
                distanceX = myTank.x - object.x;
                distanceY = myTank.y - object.y;
                //get total distance as one number
                distanceTotal = Math.sqrt(distanceX * distanceX + distanceY * distanceY);
                //trace("dTotal"+ distanceTotal);
                //check if target is within agro range
                if (distanceTotal > agroRange  )
                    //calculate how much to move
                    moveDistanceX = turnRate * distanceX / distanceTotal;
                    moveDistanceY = turnRate * distanceY / distanceTotal;
                    //increase current speed
                    moveX +=  moveDistanceX;
                    moveY +=  moveDistanceY;
                    //get total move distance
                    totalmove = Math.sqrt(moveX * moveX + moveY * moveY);
                    //apply easing
                    moveX = speed * moveX / totalmove;
                    moveY = speed * moveY / totalmove;
                    object.x +=  moveX;
                    object.y +=  moveY;
                    object.rotation = Math.atan2(moveY,moveX) * radians;
                    object.enemyTurretMovieClip.rotation = 0;
                    object.enemyTankMovieClip.eTreads.play();
    _l2Timer.stop();
                else
                var eturretPoint:Point = new Point(object.enemyTurretMovieClip.x,object.enemyTurretMovieClip.y);
                var eturretPoint_X:Number = object.localToGlobal(eturretPoint).x;
                var eturretPoint_Y:Number = object.localToGlobal(eturretPoint).y;
                var angle2 = Math.atan2(eturretPoint_Y - myTank.y,eturretPoint_X - myTank.x) * 180 / Math.PI;
                object.enemyTurretMovieClip.rotation = angle2;
    _l2Timer.start();
                    object.enemyTankMovieClip.eTreads.stop();
            function keyDownHandler(event:KeyboardEvent):void
                //trace("keyDownHandler");
                switch (event.keyCode)
                    case Keyboard.LEFT :
                        myTank.rotationSpeed = -3;
                        break;
                    case Keyboard.RIGHT :
                        myTank.rotationSpeed = 3;
                        break;
                    case Keyboard.UP :
                        myTank.accelerate = true;
                        break;
                    case Keyboard.SPACE :
                        //fireMissiles();
    here is the full code at the frame that got loaded  from the button
    the listener im using is an enter frame
    hope it is clear now
    if u check the game play u might under stand what i mean
    Subject: Re: Time line Time line
        Re: Time line
        created by Ned Murphy in Action Script 3 - View the full discussion
    It is nearly impossible to read the code you posted.  While I can find that you have a MOUSE_DOWN event that triggers firing a bullet, I don't see where you added that listener, only where you remove it. What I would guess is that you are entering the frame with the MOUSE_DOWN still registering from having clicked to get to the frame, which triggers the bullet to fire. What kind of MouseEvent do you have triggering the startLevel2 function ?  It should be a CLICK event
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Re: Time line
    To unsubscribe from this thread, please visit the message page at Re: Time line. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Action Script 3 by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Multiclip synching via Time Line In Points?

    I have read the manual and still have a question.
    I have multiple camera angles on a single musical performance. I have no trouble synching up the clips the old-fashioned way using audio waveforms, but I'd like to be able to see all my angles at the same time for ease of cutting. That sounds cool.
    These angles do not have synched time code. I have to use an In Point for synching up.
    I took two angles, and clicked them from my browser into the viewer one at a time. I set rough in and out points and edited them to separate tracks on my timeline. I fine-tuned the synching in the time line. They are now synched clips, video and audio.
    If I am in the viewer or timeline, my multiclip functions are greyed out in the drop-down menus. I assume I can only access the multiclip function from the browser. Having synched up in points in the timeline, how do I get these clips back into the browser so I can create synched multiclip angles out of them?
    Thanks.
    Paul S.

    I just worked at it until I figured it out. Set the in points in the viewer based on your ear -- the same sound in both clips. It might not be exactly synched but it's close enough. Don't mess with timeline. Once clips have the synched in point, just create the multiclip.

  • Why isnt the time line showing up normal?

    Why isn't my tome line normal? I am unable to load my videos to the tie line in any way. It is a blank box and the best i can do some times is get the audio to show green, I have since gotten that over to the right of the box as normal but still no time line icons such as video or audio. I uninstalled Premier Pro and reinstalled it but still the same. I am also only getting a few options when I click on the file/edit/sequence command buttons at the top, the are all mainly unshaded. What the hell?

    Nobody can help you without proper system info and otehr details. That aside, such questions are best asked in the product forums, the Premiere Pro one in your case. Sounds like you need to update your graphics driver and configure it properly - assuming your hardware is actualyl supported....
    Mylenium

Maybe you are looking for

  • Can't get 8530 to let me setup email accounts.

    I just got a new 8530 Curve.  When I go to setup my hotmail, yahoo, gmail, email accounts it won't let me.  Is this Verizon's problem or with the phone?  I'd like to get it done.  Thanks.  

  • Can we Compare PDF Output with CSV format

    Team, Can we Compare PDF Output with CSV format. In Excel I need to two text boxes asking us to browse the files and compare the files PDF & CSV format. Please suggest me if we have solution for this. Thanks! Kiran

  • F1 help on Radiobutton

    Hi Guys, I have a requirement that there should be an F1 help on two radio buttons i  have. Is there any way i can achieve this?? Helpful answers will be rewarded suitably.

  • Why does Adobe take over?  Part 2

    Why does Adobe take over Part 2:  I attempted to use  http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html  and on download got a box that said, Quitting     Raise without Handler!     Oh, and I had to uninstall the whole thin

  • ATE does not display SAP Inventory Manager 4.0 screens properly

    We're implementing SAP Inventory Manager 4.0 running on SMP 3.0 SP3 PL3. Testing the application in Agentry Test Environment is not possible as screens do not get rendered properly regardless of the platform selected. We've tried with multiple versio