Output current frame in a textbox on stage.

title says it, how do i acheive this?

assign an instance name to your textfield (eg, tf) and use:
tf.text=_currentframe;  // if tf is on the timeline of the movieclip whose frame number you want to display
whenever you want to update the tf's display.  if you need to update it repeatedly, use an onEnterFrame loop.

Similar Messages

  • Display current frame in applet.

    I am writing a Java applet that creates a media player. It plays a movie and I want to get the current frame. I have the code for this:
    FramePositioningControl fpc = ( FramePositioningControl)  player.getControl("javax.media.control.FramePositioningControl");
    int currentFrame = fpc.mapTimeToFrame(player.getMediaTime());I have created a text field and this is displayed on one of the panels of media player.
    My problem is that I can only get the frame number for the first frame to appear in the text field and it doesn't change for each frame.
    I have my code in the public synchronized void controllerUpdate(ControllerEvent evt) method as follows:
    tf3.setText(""+currentFrame);Any ideas as to how I can get each frame number to appear?
    I hope I have made myself clear enough.
    Thanks in advance,
    Wallace

    I have my code in the public synchronized void
    controllerUpdate(ControllerEvent evt) method as
    follows:controllerUpdate() is not called every time a new frame is encountered. It is called, for example, when the Processor or Player becomes "Realized", or is started or stopped.
    From your Processor or Player, you need to obtain the TrackControl that is an instance of VideoFormat.
    (note p is a Processor created and in the "Configured" state at this point in the code)
              TrackControl tc[] = null;
              // Obtain the track controls.
              tc = p.getTrackControls();
              // Search for the track control for the video track.
              TrackControl videoTrack = null;
              for( int i = 0; i < tc.length; i++ )
                   if( tc[ i ].getFormat() instanceof VideoFormat )
                        videoTrack = tc[ i ];
                        break;
              }You then need to create a custom Codec (or chain of Codecs) which you will insert into the data flow using p.setCodecChain( Codec[] codecs ) Override the process() method in your custom Codec to update your counter, as it will be called once for each frame.
    For example:
    public class PreAccessCodec implements Codec
         public final int process( Buffer in, Buffer out )
    //UPDATE YOUR COUNTER HERE!
             // Swap the data between the input & output.
             Object data = in.getData();
             in.setData(out.getData());
             out.setData(data);
             // Copy the input attributes to the output
             out.setFormat(in.getFormat());
             out.setLength(in.getLength());
             out.setOffset(in.getOffset());
             return BUFFER_PROCESSED_OK;
    }You will have to do a little searching through java.sun.com to find out about implementing a custom Codec, but I guarantee this will help you out... it is fundamental to the success of my application. I wish you luck!

  • External Video: Show Current Frame

    This isn't hugely important but since starting with FCP I have wanted to be able to show external video whenever I'm parked on a frame - i.e. not moving video. I often want "All Frames" off because it can choke on the full resolution/framerate I'm trying to assess.
    For the longest time I thought External Video / Show Current Frame was supposed to do this but just wasn't working. It eventually occurred to me that you have to shift-f12 every time you want the output updated.
    Is there a way to tell FCP to "show current frame" whenever I pause playback or step through frames?

    Another strategy is to turn off 'mirror on desktop'. That reduces the processor overhead significantly which is very useful on low power machines yet you get all your images sent to the external monitor.
    The check box can be found in: Menu Bar>Final Cut Pro>Audio/Video Settings> A/V Devices>
    Scrubbing in the Canvas works and the current frame will show up in Canvas when you stop messing around. Canvas is only bypassed when you play the timeline.
    good luck.
    x

  • Unable to allocate enough memory to render the current frame

    I am a bit of a novice at AE, just starting to learn. I have googled this, searched these forums and tried all I can think of. No luck. SO I will ask here. 
    I bought this AE file  http://videohive.net/item/-earth-zoom-customize/6451983 
    Here is the error message I get when trying to render
    After Effects error: Unable to allocate enough memory to render the current frame (18172 x 18172 @ 8 bpc). Either decrease the memory requirements for the rendering of this frame, or install more RAM. (12805). For more information, see adobe.com/learn_ae_mem (7 :: 66)
    I even tried to render the project without making any changes. No luck
    My info:
    Macbook pro 15” Mid 2012
    OSX 10.9.2
    Processor 2.6 ghz intel core i7
    Memory: 8 GB 1600 MHz DDR3
    Graphics  NVIDIA GeForce GT 650M 1024 MB
    Running AE CC 12.2.1.5
    First thought, Is my laptop inadequate for this type of work? 
    When it says - (18172 x 18172 @ 8 bpc) is that the resolution it's trying to output? The project is 6 seconds long and 1920x1080 resolution.
    I can render it at half resolution, but not at the 1080 res.
    Thanks for your help.

    Purged cache, set it to purge every 5 frames ... no luck. Purge every frame ... no luck.
    I tried disabling different parts of the clip to render. No luck until I disabled the inner shadow of the globe, and it seems to work.
    What should your purge setting be normally for this ap? I think it was set to "0". SHould I move it back to 0?
    Thanks for your help.

  • How search text in current frame of external swf?

    Hello Everyone
    I am loading an external swf using loader.
    How do search and highlight the text in the current frame only?
    Is there a frame class which I could use?
    Thanks

    This is not likely to be possible in the general case, depending on what you mean by "searching text"
    For instance, a Word doc might have the text "Hello, world!" when viewed in Word, but that doesn't mean that the sequence of characters 'H', 'e', 'l', 'l', 'o', etc., exists in the file. There might be one letter, then some binary data indicating that the next letter is some other font or color, then one more letter, then more binary data, etc.
    Conversely, there could be textual metadata in a "binary" file that a person reading the file in the appropriate viewer would never see. Unless you know the details of the format you're reading, you won't be able to distinguish that from "real text".
    And what do you mean "strings" is not efficient? Have you tried it? Does it do what you want? Did you measure and determine that it does not meet your well-defined performance requirements? It's unlikely you'll be able to write code that does the same thing as "strings" but more "efficiently."
    The first step is to put more realistic boundaries on your requirements and define them more precisely. "Extract text from any binary file," is not a valid, meaningful, or reasonable requirement.
    EDIT: I may have misunderstood your requirements. I thought you wanted to "extract all text" from binary files. If that's not what you meant, and you're looking more to replicate grep, then follow Joachim's advice.
    Edited by: jverd on Mar 29, 2010 1:33 PM

  • Uix frameset - how to get the current frame name?

    I have a frameset with 3 different frames in it. a top, center and bottom.
    There is a menu in the top frame that changes the contents of the center or bottom frame.
    How can I get the value of the frame name for the current frame into a bound value like a httpsession or page?
    for example if I change the center frame to "listadmin.uix" how can I load a bound value with the frames new source?
    Is there a way to pass javascript to a boundvalue? I could get the frames new properties from javascript

    In Jdev 9.0.3 you could do something like this:<frameBorderLayout>
    <start>
       <frame name="sideFrame">
        <boundAttribute name="source">
         <ctrl:pageURL name="sideFramePage">
          <ctrl:properties>
           <ctrl:property key="currentFrame"
                          value="sideFrame"/>
          </
         </
        </
       </
    </
    </then in startFramePage.uix you can access the current frame name by doing:<styledText data:text="currentFrame@ctrl:page"/>

  • How to get the footage's current frame number in expression?

    There are 2 layers.One is text layer,one is sequence layer.
    Footage has begun from the 20th frame.
    Therefore, the number of composition's current frame number and footage's frame number has shifted.
    I want to show footage's frame number in text layer . not composition's frame number.
    How to get the footage's current frame number in expression?
    Tatsuya

    >Footage has begun from the 20th frame.
    Do you mean that the footage layer has been trimmed (so that the start of the footage lines up with the start of the comp, but the first 19 frames are not visible), or moved to the left (so that frame 20 lines up with the comp's frame 0), or that the sequence actually begins with the 20th frame (at frame 0 of the comp), or something else?
    Are the frame rates of the comp and the footage the same?
    Dan

  • Will only give print option of "current frame" for a six page PDF document opened from link in Safari.

    I'm new to Mac having just moved from a PC.  The TD Ameritrade site provides statements as PDF documents which are opened by clicking on a link.  The document is displayed in a pop-up window and there is no problem viewing all pages by scrolling.  But there is no PDF toolbar and Safari will only allow me the option of printing the "current frame", not the entire document or several pages.  What am I missing?  Does the Mac not actually bring it up as a PDF? 

    Hold down the OPTION key and click on the link. That will cause the document to download to wherever you set DLs to go. Then, open it in Preview and print everything.
    Since you're a newcomer to the Mac, see these:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    Mac 101: Mac Essentials,
    Mac OS X keyboard shortcuts,
    Anatomy of a Mac,
    MacTips,
    Switching to Mac Superguide, and
    Switching to the Mac: The Missing Manual,
    Snow Leopard Edition.&
    Additionally, *Texas Mac Man* recommends:
    Quick Assist,
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • About current frame property

    Hello I am trying to make as3 take action when a certain frame is reached. As far as I understand I need to use current frame property. But it does not work for some reason. It is about as. file so my object is referred to as "this". 
    if (this.hitTestObject(_root.mcBall)){
        _root.ballYSpeed *= -1
        if(!hit){      
            hit = true
            this.gotoAndStop(2)
        } else {      
            this.gotoAndStop(3)
      removeEventListener(Event.ENTER_FRAME, enterFrameEvents);
    _root.brickAmt --;
    I have animation playing inside frame 3 at the end of which goes to (parent) frame 4. How can I tell it if the current frame is 4 to do  _root.brickAmt --;  At this point? Is there another command I can use?
    Thanks!

    Yes I am sorry.... tried that 1 week ago..... Its the most logical solution and it would not work......Can I put "if" statement after "if" "else??...... This is the whole code. and the _root.brickAmt--; at the end is not responding....If I don't have   if (this.currentFrame == 4)... It works. May I ask why?
    public class Sinote extends MovieClip {
      private var _root:MovieClip;
      public function Sinote(){
      addEventListener(Event.ADDED, beginClass);
      addEventListener(Event.ENTER_FRAME, enterFrameEvents);
      private function beginClass(event:Event):void{
      _root = MovieClip(root);
      _root.brickAmt ++;
      private function enterFrameEvents(event:Event):void{
      if (this.hitTestObject(_root.mcBall)){ 
                  _root.ballYSpeed *= -1 
                 if (this.currentFrame == 1){   
            this.gotoAndStop(2)
            } else {                     
            this.gotoAndStop(3)
      if (this.currentFrame == 4){
      removeEventListener(Event.ENTER_FRAME, enterFrameEvents);
      _root.brickAmt --;

  • Hold on current frame lingo

    So basically I have my main menu which takes you onto the loading screen and finally the game.
    How do I stop my movie from skipping to the loading screen?  I know I can use the 'hold on current frame' from the behaviours but I want to use the lingo.  Any help appreciated. 

    I currently have it so that the movie holds at the main menu but im using the hold on current frame behaviour from the behaviour library.  I want to replace these with lingo.  

  • CP4 - View Current Frame of Captured Animation?

    Hello all, I'm a new CP4 user, so bear with me on this question.
    When editing, I was wondering how I can view the current frame under the playhead for a captured animation WITHOUT scrubbing?
    I have a bunch of captions to align to elements in the captured animation, but in edit mode I can only see the first frame of the animation, and I have to scrub (drag playhead) in the timeline to see what is visible in the animation at that time frame in which I am working.
    Thanks!
    Rob

    Hi there
    If you want to see the animation in a paused state, scrub the timeline using the mouse until you see the part where you wish to add a caption. Then, without releasing the mouse, press Alt + Tab to switch to a full screened application. You may now release the mouse. Press Alt+Tab to return to Captivate and you should still see the image as if you were still scrubbing. You could then screen capture it or use some other method to aid in correctly placing the caption or element you are adding.
    I'd like to add that this is but one of several reasons recording using Full Motion is generally a bad idea.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Why can i only print current frame in an email?

    Why can I only print the current frame of an email?

    Sophie Hubble which Adobe software or service is your inquiry in reference too?

  • When exporting a slideshow, what does "current frame rate" mean?

    I'm exporting a slideshow from iPhoto '11 and I'm using custom settings
    I am wondering when you click the custom settings button
    what does "current frame rate" mean?
    does it mean use the current frame rate that it uses to let me preview the slideshow?

    Welcome to the Apple Discussions. What happens to the slideshow other than giving you this error. Don't know what it means. However, several users have reported iPhoto crashing when trying to export a slideshow. You might search this forum for that to see if you're experiencing something similar. As far as I know there was no fix found.
    Be sure to report it to Apple via via http://www.apple.com/feedback/iphoto.html.
    OT

  • Saving current frame in flash

    Hi everyone,
    Any help would be really appreciated. I'm a web developer,
    normally in php, and I'm making a flash based app that allows
    people to upload a photo of themself, print, email and save it. I
    can do print with no issues, but saving files is really being a
    sticking point. I want them to be able to save the current frame as
    a jpeg or bmp.
    Does anyone know anything about this? If it's even possible?
    Thanks a lot in advance
    Paul

    Thanks.
    Essentially, what I'm trying to do is record which object the user clicks, where he drops it (within the grid), how long it takes, etc. Currently, I'm just using the "trace" command alongwith the flash debugger to write it to a text file. However, using the debugger is not really conducive in the long run. Ideally, I'd just like to write the data to a text file in the form of name variable pairs that could be read by statistical packages like Excel or SPSS.
    I've created the interactive grid but am stuck on the data part. I don't really need the application to re-read the data once the user finishes, so using "shared objects" may not be ideal.
    Any suggestions?

  • Reading the current frame of an Event Structure

    Is there a way to read the current frame (or state?) of an Event Structure?
    Richard

    johnsold wrote:
    Normally a program would not stay in an event case for long enough for the phrase "current frame" to have much meaning.  What are you trying to do?
    Lynn
    Like tst assumed, it's for edit time use. Some events take a few seconds, and the progress would be nice to watch on the FP like you'd typically do with a state machine, and with dynamic events (as opposed to just user events), it would be nice to see where the structure is going.
    I have tried something with scripting as shown, but it's not much help. There's no property "Current Frame" or similar. Visible Frame (as shown) doesn't do it.
    Richard

Maybe you are looking for

  • New Macbook Pro and TechTool help

    So I jus got a new mac book pro and did a SMART scan in Tech Tool Pro - here were my results and I am concerned about the spin up retry - can someone explain what I should do or if this is normal?

  • How can i view track changes in an emailed document?

    ihave been trying all means that i know of in my meagre knowledge of ssoftwares to try and view a document having changes made to it that was emailed to me,but have failed miserably.will someone be kind enough to shed some light on this issue,and whe

  • Unable to deploy ADF application on weblogic 10.3

    Hi, The steps followed for creating Fusion web application (ADF) in jdev and deployment are as follows: 1. Create a new application in jdev using the template for Fusion web application (ADF) app. 2. Created couple of .jspx's (JSF's) and navigational

  • ORA-12203 while calling a form from external procedure

    Hi I am using oracle 10g 10.2.0.3.0 database with forms 6i. We have created a database procedure , which makes a call to external procedure(C program). Now this external procedure creates a process and process is creating a call to form. We have chec

  • Timecode error while importing

    Hey guys, I'm fairly new to Final Cut Pro, so please take it easy on me. I'm getting a "waiting for timecode" error when trying to import video. Here's what I'm using and trying to do. Final Cut Pro 7.0.1 Sony Handycam DCR-HC30 Video Source DVR/VCR O