Goto and play frame problem

I have a basic flash application with about 500 frames in
this scene. I want to go play this frame when the user selects a
button. I have the following code but it seems to go back to the
first frame each time whereas I want it to go to frame 460. The
statement above works by continuing the movie though.
if (finalresult <8) {
Play();
} else if (finalresult >= 8) {
gotoAndPlay(460);
Any ideas?

add this to the statement as below, the current value of the
variable will be shown in the output panel when the condition
fires:
actually try it in a few places to see what;s getting
through:
if (finalresult <8) {
trace(testA:'+finalresult);
play();
} else if (finalresult >= 8) {
trace(testB:'+finalresult);
gotoAndPlay("Shopping - Level 1", 460);
if the there is no value shown in the output panel then the
statement is not working at all, if so place the trace() just
before the condition and see what the result is.

Similar Messages

  • Help using multiple if else statements & manual dynamic xml data input to trigger a goto and play.

    Below is code that has a timer countdown that reads off of the computer. Below in bold is code to read "if it reaches the date, go to and play frame (2).
    timer.removeEventListener(TimerEvent.TIMER, updateTime);
      timer.stop();
      gotoAndPlay(2);
    Below is code that is manual input-   I had set up a dynamic txt field in flash named it : raffle_tix_remain When loaded on to the host I can manulally update the xml code and the change will take effect.
    raffle_tix_remain.text = root.loaderInfo.parameters.raffle_tix_remain;
    My question:  Since the raffle_tix_remain is a manual input from a user to xml  Is there a way to tell flash once it refreshes and "raffle_ tix_ remain"  goes to (0) zero gotoAndPlay(2); and let it play like a "sold out" sign
    i guess that would be a  if else statement. 
    Code Below-----------------
    stop();
    var year:Number = 2011;
    var month:Number = 12;
    var day:Number = 30;
    var finalDate:Date = new Date(year,month-1,day);
    var timer:Timer = new Timer(100);
    timer.addEventListener(TimerEvent.TIMER, updateTime);
    timer.start();
    function updateTime(e:TimerEvent):void{
              var now:Date = new Date();
              var remainTime:Number = finalDate.getTime() - now.getTime();
              if (remainTime >0) {
                        var secs:Number = Math.floor(remainTime/1000);
                        var mins:Number = Math.floor(secs/60);
                        var hours:Number = Math.floor(mins/60);
                        var days:Number = Math.floor(hours/24);
                        var secsText:String = (secs%60).toString();
                        var minsText:String = (mins%60).toString();
                        var hoursText:String = (hours%24).toString();
                        var daysText:String = days.toString();
                        if (secsText.length < 2) {secsText = "0" + secsText;}
                        if (minsText.length < 2) {minsText = "0" + minsText;}
                        if (hoursText.length < 2) {hoursText = "0" + hoursText;}
                        if (daysText.length < 2) {daysText = "0" + daysText;}
                        day_txt.text = daysText;
                        hour_txt.text = hoursText;
                        min_txt.text = minsText;
                        sec_txt.text = secsText;
              else {
                        timer.removeEventListener(TimerEvent.TIMER, updateTime);
                        timer.stop();
                        gotoAndPlay(2);

    stop();
    var year:Number = 2011;
    var month:Number = 12;
    var day:Number = 30;
    var finalDate:Date = new Date(year,month-1,day);
      var now:Date = new Date();
    var timer:Timer = new Timer(1000);
    timer.addEventListener(TimerEvent.TIMER, updateTime);
    timer.start();
    function updateTime(e:TimerEvent):void{
             var remainTime:Number = finalDate.getTime() - now.getTime()-e.currentCount;
              if (remainTime >0 || raffle_tix_remain==0) {
                        var secs:Number = Math.floor(remainTime/1000);
                        var mins:Number = Math.floor(secs/60);
                        var hours:Number = Math.floor(mins/60);
                        var days:Number = Math.floor(hours/24);
                        var secsText:String = (secs%60).toString();
                        var minsText:String = (mins%60).toString();
                        var hoursText:String = (hours%24).toString();
                        var daysText:String = days.toString();
                        if (secsText.length < 2) {secsText = "0" + secsText;}
                        if (minsText.length < 2) {minsText = "0" + minsText;}
                        if (hoursText.length < 2) {hoursText = "0" + hoursText;}
                        if (daysText.length < 2) {daysText = "0" + daysText;}
                        day_txt.text = daysText;
                        hour_txt.text = hoursText;
                        min_txt.text = minsText;
                        sec_txt.text = secsText;
              else {
                        timer.removeEventListener(TimerEvent.TIMER, updateTime);
                        timer.stop();
                        gotoAndPlay(2);

  • AS3 to goto and play first frame again?

    I have 3 frames on my timeline. When the playhead reaches the
    last
    frame, I want it to go back to the first frame and start
    playing again.
    What is the AS for this?
    Thanks!

    Mike,
    > I have 3 frames on my timeline. When the playhead
    reaches
    > the last frame, I want it to go back to the first frame
    and start
    > playing again.
    You'll be psyched to hear that the ActionScript 3.0 for this
    is no
    different from pre-AS3 approaches. :)
    > What is the AS for this?
    gotoAndPlay(1);
    David Stiller
    Co-author, Foundation Flash CS3 for Designers
    http://tinyurl.com/2k29mj
    "Luck is the residue of good design."

  • Imovie11 splitting clips and freeze frame problems

    I am having a problem with imovie11 splitting cips and using the freeze frame function.  When I highlight the clip I want split, it splits a different clip either on the line below it or somewhere else in my project!  Also, my freeze frame function freezes the frame where my playhead is BUT doesn't split the clip...so what I'm left with is the entire clip- then the freeze frame - then the continuation after the freeze frame.  Is there a fix for this??

    Remove any in or out points you have on the timeline. Place the playhead at the frame on the timeline you want to freeze, and then select Modify > Make Freeze Frame, the freeze should appear instantly in the viewer. You can then click the Overwrite button, and the freeze should now be placed on the timeline in the correct place.
    Is this not happening?
    MtD

  • Cross dissolve and still frame problem

    Sorry for reposting this issue but I am still have problems.  In fact, it is extremely frustrating and I don't know why.
    I am using FCP X 10.0.8 and when I try to add cross dissolves to some still frames it will not allow me. 
    I get the following error msg.
    The Japanese error msg says that there is insufficient media length outside the clip edge to make a transition.  And it asks whether I want to make a ripple trim to the media in order to make the transition.  It says that if I decide to do so then the overall project duration will be shortened.  However, even if I decide to do the later it will not let me make the cross dessolve.
    As you can see there should be enough length outside the clip edge to allow this.  Or am I misleading myself in this view?
    According to me - and I know that I am a sheer novice at this, there should be enough media length to allow the transition.  This is happening in not only cross dissolves but any other dissolve which I attempt to add.  The problem seems to be intermittent or varies.  If I replace the still frame then sometimes it will allow the transition but effects subsequent frames.  Either putting in "flash" or bogus frames - even just a black frame.  These I can only detect when I expand the timeline to the very limit.  And on some occassions there is nothing whatsoever that seems to be blocking the adding of the cross dissolve.  This will be the 3rd time which I have had to restart the project and it is getting rather annoying, not to say that I am approaching the time limit which is adding even more pressure.
    Can you suggest what the problem is and how I should go about rectifying it please?  Is anybody else having the same issue?
    Thanking you,
    Mitaka27
    Tokyo

    This is what I see but it doesn't quite make sense to me.  One, I don't know why there should be two AUDIO01 files showing.  The still frame which I am trying to add the crossover to is FRTOTSUKA.  It will allow me to add to the end but not to the start.  The same is happening with a couple of other frames.  If I add one to the start it won't allow me to add it to the end. 
    Hope I am making sense.
    Thanking you,
    Mitaka27

  • I have a problem with my iPod touch 5th gen. When connected to my computer my music playlist will show and play no problem. When I disconnect my iPod from my computer go into my music, my music playlist disappears. Do anyone have a solution. Thank U!

    I have a problem with my iPod touch 5th gen 64GB. When I connect my iPod to my Mac Book Pro laptop my music that I've transferred to my iPod and music playlist will appear in my iTunes my music will play with no problem. Now, when I disconnect my iPod from my computer go into my music, my music playlist and music I've downloaded into my iPod disappears. I reconnect my iPod to my computer, everything shows. Do anyone have a solution I really do appreciate it. Thank You!

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync/delete all music and resync
    To delete all music go to Settings>General>Usage>Storage>Manage Storage>Music>Tap edit in upper right and then tap the minus sign by All Music
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes      
    - Restore to factory settings/new iOS device.                       
    However, there seems to be a bug in iOS 8 or iTunes 12.1.1 that cause this problem and I have not seen a solution

  • "Reveal in project" greyed out and match frame problems (Premiere Pro CC 7.0)

    I'm trying to reveal a clip in project window by right clicking a clip in timeline and choosing "Reveal in project", but the function is greyed out. Is it because the clips are merged? The clips have one track of video and 1-3 audio tracks depending on clip. When option+right click either only video or audio, i get the "Reveal in project" available, but when clicked, nothing happens.
    I also have problems with match frame. When i put a new (merged) clip on the timeline, it works, until i try the match frame again on different time. So it kind of works only on the clip that was previously edited to the timeline, and only once. Works fine with regular clips.
    Clips were merged using in or out point as the sync point, and "Remove audio from AV clip" checked. Audio and video sources don't have matching timecodes.
    I'm using CC 7.0 on Mac OS 10.7.5.

    Is it because the clips are merged?
    Yes.  Match Frame does seem to have issues with Merged Clips as well.

  • FCP 7.2 : colors in canvas change between paused frames and playing frames

    To all the FCP-Experts...
    Just before this project I switched from FCP 6 to 7 (clean install) and started using ProRes 422 HQ instead of Blackmagic Uncompressed 10bit.
    To my surprise, the preview-picture in the canvas is never the same when playback is paused compared to a running playback. On an external monitor, this effect does not occur. Briefly, the colors when paused are much more saturated.
    There are some other minor differences concerning filters when playing back or pausing the image, which I can live with, but the color-difference is most annoying.
    Any help greatly appreciated.

    I don't think trimming back does anything.  I've tried it once and also it's not in the media itself.  It is strange though that it appears this way in QT player and then like a strange bump or hit in the video when played in another app like MPEG streamclip.  Very weird!  I'm beginning to think there is just some bugginess with FCP 7.0.3 and Lion 10.7.3.  I should add that I get pretty consistent problems with crashing on my system also.  It's periodic but definitely not the most stable.  Would be great if Apple was still developing this version of FCP but I know that's just not the reality anymore.  Thanks for all your time in looking at the issue with me.
    Best,
    JD

  • Playback of clips only plays between 4 and 12 frames

    Hi all,
    I am fairly new to Premiere, have used After Effects CS4 to produce some clips, but need something that handles editing better, and I thought I would give Premiere CS4 a try.
    Unfortunately, I can't get Source or Sequence preview working.  I click the play button and the video plays for about 1/2 to 1/4 or a second (between 4 and 16 frames) and then stops, returning to the place where I hit play.  Almost like I had selected an in and out of 14 frames and hit "play in to out".
    The duration of the playback is random, but never more than a full second.
    The computer I am on is:
      Model Name: MacBook Pro
      OS: Snow Leopard 10.6.2
      Processor Name: Intel Core 2 Duo
      Processor Speed: 2.4 GHz
      L2 Cache: 3 MB
      Memory: 4 GB
      Bus Speed: 800 MHz
      Chipset Model: GeForce 8600M GT   
      Bus: PCIe
      VRAM (Total): 256 MB
      Vendor: NVIDIA (0x10de)
      RAM Size: 4 GB
      Type: DDR2 SDRAM 667 MHz
      HDD: 500Gb 7200RPM (50% empty)
    Apple system updater says I am up to date.
    I have Adobe Premiere CS4 installed (trial) 4.2.1 (003 (MC: 166418))
    Adobe Updater says I am up to date.
    I have done the following to try and resolve:
    * Tried different source files (mp4, mov)
    * Tried rendering a video in After Effects CS4 as MOV H264 and importing
    * Tried putting still frames on the time line and playing those (no effects, no transitions)
    * Tried playing no video, just music
    * Ensure that "clear all markers" is done on the source and preview monitors
    * Ensure loop is not playing
    * Force in and out markers to a 5 second clip and press play
    * Full deinstall and reinstall of all adobe products (I had some CS3 left overs that I cleaned out)
    * Deleted all adobe application preferences folders before reinstall
    * Deleted plugin cache
    * Created new projects and tried all the above.
    I have tried shutting down every other program before running Premiere, it is definitely not a resources problem, there is 3Gb of RAM free and CPUs sitting at 5% when I try this.
    I am looking at buying Premiere, but if I can't get playback to work it's a bit of a waste
    Anyway, any help or pointers would be appreciated!
    Mikel

    Thanks everyone for the long thread and lots of comments, unfortunately I have tried them all.
    I even purchased a full copy of Premiere Pro (as part of a Masters collection set) and this still has not fixed the problem.
    The screen recording of my problem is exactly the same as the one linked to here: Screen Recording 2 720p.mov, and I am also going to open a support ticket with Adobe.
    Another point is that it even does not work on a tiny video that I used (320 x 240px)  Still same problems.
    This is very frustrating.
    It should be noted that After Effects and Encore both play videos fine in a similar situation, it is just Premiere that is bombing out.
    See the first post for my configuration, it is still the same, except now I own a full copy of Premiere Pro as part of CS4 Masters collection.
    Any further ideas?
    Mikel

  • Problems working with non drop and drop frame DVCPRO HD material in project

    I am having playback problems with my non drop frame HDV material. It stutters.
    All of our projects up to this point have been shot in drop frame. During our last shoot however the Bcam was recorded in non drop. I loaded both the non drop bcam tapes as non drop and the drop frame Acam tapes as drop. All of the drop frame Acam material plays back fine in the source viewer and the timeline. The non drop Bcam material seems to randomly stutter in the source viewer, or causes the system to serve a "dropped frames warning" in the timeline.
    Is there a bug with fcp 5.1.2 about mixing non drop and drop frame material in a project. Or is this not possible? They are the same frame rate.
    I have exported the non drop clips in a drop frame timeline and re-imported them as drop frame clips - thus correcting the problem. Is this the best solution?
    All of the material was loaded thru a kona card as 1080i60 DVCPROHD 29.97
    I had no problems capturing the material as long as I used the corrrect firewire setting (ndf vs df).
    Anyone have a problem like this? I would greatly appreciate a response.
    Thanks,
    Mark

    http://bssc.sel.sony.com/BroadcastandBusiness/DisplayModel?m=10014&p=2&sp=141&id =78439
    The camera can record 60i, and 30F:
    "HDV 1080, 50i/60i/30F/25F Recording and Playback capable"
    Look at the clips...look at their frame rates. What do they say? Is one 59.94? Is the other 29.97?
    You would never need to render if you mixed NDF and DF footage. The footage runs at the same speed, on the TC numbers are different. But, you would need to render if your footage had different frame rates. LOOK AT THE CLIPS.
    Shane

  • Dropped Frames and Render/Playback problems in Final Cut Express HD

    I use FCE HD and edit HD video off my Sony camcorder. Recently I've got rid of my old Imac G5 and have a newer 2GHz PowerPC G5 with more RAM (2GB) off a friend because my old mac wasn't fast enough and was incapable of playing back some of my edits.
    At first when i got my new mac things looked faster and it was playing transitions without dropped frames etc. However now i've started editing again and imported new projects, i've got a big problem with dropped frames during playback and rendering. I get dropped frames during unedited clips let alone at transitions and for some reason, fce will no longer render video. Unedited clips from my latest project need rendering, which i've never had before, but when i try to render them the 'writing video...' pop up flashes, but nothing happens and the video is not rendered!
    Now i can't watch and edit some of my projects without dropped frames stopping playback every other clip and i can't do anything with my new ones because the video need rendering but can't be rendered!
    Can anyone help me out on either topic?

    Hi Ross,
    Well, most people, myself included, would say you should consider yourself lucky if doing video via USB ever worked at all for you. Overall, USB is not up to the demands of video, and that is most likely why you are getting your dropped frames problem.
    The solutions would be either use your internal HD or get a good external FW drive. I know this is frustrating, as it has been for many people who look at the raw specs where USB 2.0 appears faster than FW400 but in real life, for video especially, it is not.

  • Problem loading and playing samsung videos in elements

    Samsung videos will not play in elements

    hibernian
    No enough information to help you. Answers will be in the details.
    1. What version of Premiere Elements are you using and on what computer operating system is it running?
    2. What Samsung device is recording your videos that you want to edit in Premiere Elements?
    3. What are the properties of those videos, including video and audio compression, frame size, frame rate, variable frame rate, interlaced or progressive, file extension, and pixel aspect ratio?
    4. What are you or the program setting as the project preset to match the properties of your source media?
    5. Are you getting any error messages associated with "problem loading and playing samsung videos in elements"?
    6. Is there a problem loading and playing both video and audio or just video or just audio?
    Let us start here and then we can plan troubleshooting strategy.
    Thank you.
    ATR

  • Problems capturing - no sound and dropped frames

    I have just begun a new project on FCP 5 on a G4 Powermac with OS X 10.4.10. This is the first project on this particular machine, but am reasonably au fait with FCP.
    I am attempting to capture from a Canon XM1 via Firewire, and although I am able to control the deck and play video from it, there is no sound (other sounds are audible from the Mac speakers and there is audio on the tape in question). The capture setting is for DV Pal 48hz. In Audio/video settings, the options in Audio playback, apart from 'built in audio' are greyed out. The sound levels in FCP indicate that the audio is being recognised.
    Also, any attempts to capture, whether via Capture Now or as a clip result in dropped frames.
    I can give more information if required, but would anyone have any pointers for this? I would be very grateful as time is against me!
    Thank you

    My mistake, I am actually using FCP 4.5.(for some reason I have the manual for FCP5 ???) The problem was that Speaker was set to off in Capture presets. Thanks for your help, now I have to sort out these dropped frames.
    Ally

  • Premiere Elements 7 - When play my work frame problems occur. codec issues?

    Hello,
    I use Premiere Elements 7 to edit my videos; however, recently I have found that most of the videos I add to my work shows a frame problem every time I play. I am not so familiar with the terms but I will try my best to explain how it happens.
    1. I open a new project
    2. Add a video (usually avi format)
    3. I play the video whitout editing.
    4. I see that after every 5 frames there is a frozen frame (like a dublicate of the 5th frame)
    It results me to cut my video in every 5 frames to get rid of the frozen frame and it takes a lot of time.
    What would be causing that? When I play the video with my media players it shows perfectly but when I add it to Premiere Elements 7 to edit, this is what happens.
    I also see that there are multiple fddshow icons on the right bottom of my screen.
    I assume there is something wrong with the codecs. In that case, what would be the best codec to have in order to edit my videos on PE7?
    What do you suggest I do?
    Thank you in advance.

    Dear Bill,
    I have formated my computer and reinstalled my operating system Vista Home 32 bit. Then I switched from PRE7 to PRE8.
    This is my computer info below;
    CPU Türü QuadCore Intel Core 2 Quad Q9300, 2500 MHz
    4GB RAM
    ATI Radeon HD 3600 Series 512 MB
    I have AVC Core 2.0.0 codec, NVIDIA PureVideo codec for MPEG, K-lite MEga codecs installed as they are-without any configuration.
    Gspot still shows Xvid codec XviD ISO MPEG-4.
    File Length Correct
    Multipart OpenDML AVI (2 parts)
    (69639 frames in first part, 2663 frames follow)
    Interleave: 1 vid frame (40 ms), preload=504
    Audio frames: Split across interleaves
    [JUNK] VirtualDub
    [JUNK] MPEG2 build 24586/release
    [ISFT] VirtualDubMod 1.5.4.1 (build 2178/release)
    [USER] XviD0050
    So I assume Xvid was used for this file. Considering that what would you reccomend me to do in order to view this file and be able to edit on PRE8?

  • I have an ipad mini 1st gen 64 gb (wifi only) and i have problem with some of my apps. These apps have lags when you play with them for a few seconds the apps are having lags are call of duty strike team, gta San Andreas and nfs most wanted.pleas help me

    I have an ipad mini 1st gen 64 gb (wifi only) and i have problem with some of my apps. These apps have lags when you play with them for a few seconds the apps are having lags are call of duty strike team, gta San Andreas and nfs most wanted.pleas help me

    I'm going to guess videos buffer for a while also...
    Two possibilities, one is you should close apps on the iPad, the other is your internet speed is not able to handle the demands of a high speed device.
    To close apps:   Double click home button, swipe up to close the apps.
    To solve internet problem, contact your provider.   Basic internet is not enough for video games and movies.   Your router may be old and slow.

Maybe you are looking for

  • Problems with the location on facebook blackberry z10

    hi , my blackberry z10 facebook application doesn't show my location when i update a status or a check-in i will be pleased if you could help me to solve this issue

  • MDI in CVI applications?

    Hi, I'm trying to make an application using MDI in CVI.  I've run across a few old threads from people attempting to do the same thing.  It seems that the general way of doing it is to: 1.  Load the 'child' panel as a top level panel. 2.  Use the Set

  • Sudden black screen and goes dead

    I had a similar version of this problem 2 days ago but after lots of button pushing, etc. it started working again but the problem has returned. My PowerBook suddenly, without warning, flicks to a black screen and the motor shuts down immediately. Th

  • Routers and modems

    Hi! This is not a question - but more some thoughts and ideas. I have for some days now been using iChat very much. I am using it in a TV-program where I stream my TV-signal out to families in Norway with help of iChat. My experience is that when the

  • To extract apostriph + s

    Hi, i want to write an sql query, which might extract only the data with ('s) as given below:      ADDRESS_FORM      116 NORTH 'C' STREET      MCWILLIAM'S ROAD      MCWILLIAM'S ROAD      FISHERMAN'S WHARF      22 ANDERSON'S LANE      NED'S BEACH ROAD