Variable to track position in timeline

Hi guys, I am trying to create a variable in Actionscript 2 that will record the position in the timeline, so Flash knows the user's last position on the timeline.
The first line in the mc is:
var portfoliostate;
On frame 20 of the timeline, I have the following actionscript:
portfoliostate = "1_portfolio";
When a button is clicked, I want Flash to recognise if the user has been on frame 20 or not. The code on the button is:
this.onRelease = function() {
if (portfoliostate="1_portfolio") {
_root.gotoAndStop(90);
else {
_root.gotoAndStop(80);
However it does not seem to be working. I am implementing this correctly?
Many thanks

You need to use == when comparing, = when assigning
if (portfoliostate=="1_portfolio") {

Similar Messages

  • Stretching tracks on the timeline using keyboard.

    How can I stretch audio & video tracks on the timeline without scrolling at the scrollbars?
    With other words is there a shortcut on the keyboard?
    Thanks,
    Tim

    Hi Tim,
    If you mean, stretch or squeeze the timeline, then Stretch is APPLE , and Squeeze is APPLE . It stretches or squeezes the timeline around the position line. much easier for me.
    hope that helps,
    steve

  • Switching on a some track in the timeline

    Hi, all.
    Does somebody know how to activate specific track in the timeline (for editing etc), that playhedad didn't have changes on that timeline.
    normally, that would enable a track, you must necessary click it with mouse on it but as you do it, playhead position was changed to position where you press mouse button.
    how to overcome that moment.
    Can't find it in help.
    Thanks.

    Rightly I should have selected the option in the original post 'I have this question too'. But, I did not do it because I did not understand the question in the first place. After reading your reply and the glee with which it was acknowledged, I realized that I too had this 'problem'.
    Thanks Tom.

  • Quiz Variable Not Tracking Text Box Responses

    Hello Everyone,
         I am having a problem getting the Captivate Quiz variable to track correct responses from a text box. I am using Captivate 5 and trying to make a quiz where someone will enter in data that will be validated and branch off of their responses. I have set up several text boxes, turned on validating, checked the "Include in Quiz" box and the add to total and report answers boxes. See the pic below:
    I am trying to branch using an advanced action that checks the cpQuizInfoPointsscored variable and branches them based off their score. But the variable always shows 0! (I set up a text caption to display the variable as I went through to check.) Here is the weird part, I have the quiz results slide in the presentation, and IT accurately shows the results from the test boxes. But for some reason the Quiz Variable isn't tracking them! Any help??

    Hello and welcome to the forum,
    From your question I know that you are using CP5.0, correct? This 'bug' has been fixed in Captivate 5.5. Was one of the users who had insisted (by bug report) to have all Quizzing System variables updated after each question, and not only when the quiz was done, on the score slide; now you are bumping into this issue: the score in cpQuizInfoPointsscored will be tracked and will have the scores attached to the Text Entry Boxes or for any other scoreable object (all show up in the Advanced Interaction view - F9) but only at the score slide.
    I had a workaround in CP5 (have described it somewhere in an article or a blog post), using the Quizzing variable that IS updated after each question: cpQuizInfoLastSlidePointScored.
    If you want to have the functionality of CP5.5 you'll have to track the total score in a user variable by advanced actions. It is not really that hard, since you are already using advanced actions, step-by-step
    create a user variable v_currentscore
    on entering each question slide have this statement executed (if you do not have already an advanced action for this Enter event, and this is the only statement, better add Continue as second statement)
    Expression v_currentscore = v_currentscore + cpQuizInfoLastSlidePointScored
    now you can use this user variable for your check instead of cpQuizInfoPointsscored, you understand that it is only updated on the slide after the slide where the question is answered? Let me know if this is a problem
    Lilybiri

  • Dragging multiple media clips into vertically stacked tracks in the timeline? Is it possible?

    Hoping that some Adobe Premiere Guru might be able to lend some insight into what seemingly should be a fairly simple thing to accomplish... but despite scouring the web, I can't seem to find a peep of a solution for it.
    My neighbor (whom, incidentally, I convinced to go with Premiere CS5.5 as his NLE of choice in the wake of the FCPX uncertainty) is working on a "reality-style" project where they have a massive amount of cameras running simultaniouisly for hour upon hours on end. Think Big Brother House style.
    Essentially for each hour of the footage, he is creating a project in which all the multiple camera footage (MOV) from that hour is listed/linked over in the project panel. For example, for HOUR ONE he has the footage from all 20 cameras (or whatever) for hour one listed there.
    BASICALLY what he wants to be able to do is grab ALL the footage from those various cameras AT ONCE, DRAG them over to the timeline and when he drops them there, the video (and, inversely, the audio) clips STACK vertically, one on top of the other, each one taking its own track in the timeline.
    Currently, of course, when he does this the footage arranges itself in the timeline end to end. In the case of my HOUR ONE, 20 CAMERA example, this basically creates a 20 hour long clip, as oppossed to a one hour clip with 20 tracks, stacked one on top of the other.
    As near as we can tell, there's no keyboard shortcut to make this happen. I VAGUELY recall being able to do this in FCP (maybe?) so I'll be stunned and more than just a little bit disappointed to if there isn't SOME way to pull this off in Premeire.
    Does anybody have any idea if this mode of automatically dropping clips into the timeline as stacked tracks is possible? It will, quite literally, save him hours and hours of work if he can figure out the secret. And I won't feel quite so guilty for having turned him onto Premiere for this specific project!
    And if anyone knows for a fact this is NOT possible, that would be great to know as well. At least we can put the notion to bed one way or another.
    Thanks in advance.
    Regards, Michael

    You can do this with the make multi-camera source sequence command in Premiere Pro CS6 (note that this was posted before CS6 was launched):
    Mark the clips
    Select the clips
    Choose Clip > Create Multi-Camera Source Sequence
    Choose the style of synchronization and click OK
    Right click on Multi-Camera source sequence and choose > Open in Timeline.
    Clips are now stacked up inside of a sequence
    More here: http://helpx.adobe.com/content/help/en/premiere-pro/using/editing-multi-camera-sequences1. html#source_sequence_for_multi_camera_editing

  • Adding an extra video track to FCP timeline?

    Hi there
    I'm trying to add an extra video track to the timeline to add some extra titles; the first two video spaces (V1 and V2) are being used. I'd like to add a V3. Suggestions?

    You should be able to do it with the normal menu command under the Sequence menu ... or simply drag a clip to the area above your existing tracks and a new one will be created.
    -DH

  • Is it possible so zoom vertically the track in the timeline? Or only horizontally?

    Hi people!
    Is it possible, in garageband '11, to zoom vertically the tracks in the timeline? Or only horizontally?
    Cause in logic pro I know that I zoom either in and out regions in the timeline... But in garageband I'm able only to make an horizontal zoom... Enlarge vertically the tracks could help me a lot when work with the automation curves.
    Thanks lot,
    Peace

    FranzFromFar wrote:
    Is it possible, in garageband '11, to zoom vertically the tracks in the timeline? Or only horizontally?
    only horizontally, though the editor can be stretched vertically:
    http://www.bulletsandbones.com/GB/Tutorials.html#bsqstretchingeditorpane
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Replace audio tracks in a timeline

    Hi all.
    This is actually kind of embarrasing, but here it goes:
    I've made a rough cut of some source material with 4 audio channels, channels 1-2 with environment audio and track 3-4 with interview audio.
    Me being stupid, I did not enable the second audio track on the timeline onto which the clips where going, hence I've got a timeline with only the environment audio, but no voice.
    Is there an automated way to replace the tracks? Edit done in cs6.
    Best regards, Norway.

    I found the solution my self.
    Mark all the clips with wrong audio channels. Hit "Clip" on the upper menu bar, Modify>Audio Channels and do the replacement in the dialog that pops up.

  • Drag select audio tracks to the timeline

    I have several clips I will be adding to the timeline that have 4 audio tracks. I only want the first audio track to go to the timeline. How do I do this?

    Disconnect the connectors for the other tracks on the timeline...on the left side.  You will need to load the clip into the Viewer first.

  • Audio track missing on timeline when I insert clip from source monitor

    I have the following problem with PP CS6: my media contains two alternate mono tracks (one with the signal boosted as an insurance) and I have PP set up to treat them as two mono tracks, rather than one stereo track. Everything works fine when I drag media directly to the timeline from the project panel. But when I use the source monitor to select in and out points, and then insert the chosen clip into the timeline, only one of the two audio tracks appears on the timeline. Can anyone please explain how to make sure I get both tracks on the timeline via this route?
    Thanks
    DM

    Hi Jim,
    Thanks for replying. Unfortunately this doesn't apply to my case. I've set PP's default behaviour to import as dual mono in Edit\Preferences\Audio. This allows me to drag media from the project panel to the timeline and get two sediscrete mono channels. My problem is that when I go the source monitor route, any clip that I insert does not display two audio tracks on the timeline, just one. I have discovered I can switch the source channel from left to right, which to all intents and purposes fixes my problem, but I would like to maintain the option of getting both channels displayed separately on the timeline if possible.
    Thanks
    DM
    Sent from my iPhone

  • Laying audio tracks neatly on timeline?

    Hi there,
    I've been finding it difficult to position my audio exactly where I want it..normally I have voices in track one and then underlying effects or music on tracks two and three and so on.
    Whenever I drop audio into timeline, say a music track on A3 and A4 I can't hear it..and have to phsyically drag it down to A7 and A8. I now have a situation where I need to have music under that track and when I drag audio to A9 and A10 I can't hear it at all.
    I hope this is something simple and I'm almost certain that it will be.
    Hope you can help me.
    Carol Ann

    I am officially a nugget.
    I just deleted the other empty tracks to bring it up and it works fine.
    Gosh hope no-one is replying to this.
    Carol Ann

  • Clips shift position on timeline when using time stretch

    Premiere Elements 10, Win 7 x64,
    I put together a timeline that had four video tracks. When I added a fifth track I started having problems. Specifically, when I put a still image or video clip onto the fifth track and then used time stretch on that newly added clip, the existing clips on the third and fourth tracks shifted their position on the timeline in response to the time stretch applied to the clip on the track above. Why does this happen? I would expect the clips on the lower video tracks to NOT move position in response to a time stretch change to a clip on a track above. How I can I get them to stay put while manipulating the duration of clips on the tracks above them?
    Thank you for any insights.
    I have attached three images to make what I am experiencing more clear than perhaps my words describe above.
    (top) Image 001: timeline before any change
    (middle) Image 002: timeline after adding video track 5 and adding a still image to that track
    (bottom) Image 003: timeline after applying time stretch to the still image clip on track 5, showing shift of clips on tracks 3 & 4

    When Adobe was designing the operations on the PrE Timeline, it was determined that the majority of users WOULD want the Ripple. That does seem to be the case. The addition of the Ctrl/Cmd modifier key accommodates those users, or those instances, where the Ripple is not desired.
    Interestingly, PrPro, PrE's "big-brother" does things in the opposite order. The user holds down the Ctrl/Cmd key to GET the Ripple. The designers figured that the users of PrPro would have different desires, than those of PrE. As I use both programs, I have to keep reminding myself which program I am using at that time - to get the Ctrl/Cmd modifier key working, as I wish, in each program - just the opposite of each other.
    Good luck,
    Hunt

  • Session variable and Tracking in Header file

    Is there a way for me to keep track of the session and use a variable in my Header to pass around for this?
    I have a login.jsp, validate_login.jsp and other jsp's that have the same header file. Instead of me using the same code in all of the jsp's I thought it would be easier to put it in the header Please look at the example code below:
    // validate_login.jsp is passed username and password from the login.jsp.
    // validate_login then calls the logIn method in my Session class.
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="uom.edu.rd.session.Session"%>
    <html>
    <head><title>Validate Login</title></head>
    <body>
    <jsp:include page="header.jsp" />
    <%
        String username = request.getParameter("username");
        String password = request.getParameter("password");
        this_session.logIn(username, password);   
        boolean b = this_session.getLoggedIn();
    %>
    ==================================================================
    // The logIn method in Session class
    public void logIn(String userName, String password) {
             Connection con = null;
             Statement stmt = null;
             ResultSet rs = null;
             try{
                con = db.getConnection();
                 stmt = con.createStatement();
                 String sql = "SELECT * FROM RD_USER WHERE USER_NAME = '" + userName +"' AND USER_PASSWORD = '" + password + "'";
                  rs = stmt.executeQuery(sql);
                  if(rs.next()){
                       loggedIn=true;
                  }else{
                       loggedIn=false;
             catch(Exception e){
                  // If something goes wrong, make sure
                  // the user is not logged in.
                  loggedIn=false;
              }finally{
                  try{
                       rs.close();
                       stmt.close();
                       con.close();
              }catch(Exception e){
         * Log the user out.
        public void logOut() {
             loggedIn = false;
         * Get the login status.
         * @return boolean
        public boolean getLoggedIn() {
             return loggedIn;
    ==================================================================
    // and this is part of my header.jsp
    <%@page import="uom.edu.rd.session.Session"%>
    <%
      Session this_session = Session.findSession(request);
      if ( this_session==null ) {
          /* Now, instead of redirecting, create a new Session
           * object and initialize it.
          this_session = new Session();
          this_session.makeSession(request);
          this_session.createQueryBuilder(config);     
    %>
    // This is the part I would like to pass around
    <!-- Session logged_in = new Session(); -->
    <%   
        boolean loggedIn = this_session.getLoggedIn();    
            if (loggedIn == false)
            { %>
                <A STYLE="color:#FFFFFF;text-decoration:none;" HREF="./login.jsp"><FONT COLOR="#FFFFFF">LOG IN</font></a>  <FONT COLOR="#FFFFFF"></font>
        <%  } else { %>
                <A STYLE="color:#FFFFFF;text-decoration:none;" HREF="./logout.jsp"><FONT COLOR="#FFFFFF">LOG OUT</font></a>  <FONT COLOR="#FFFFFF"></font>
         <% }
    %>
    // so if you are logged in  then you are able to view certain things on the jsp's if you are not logged in
    // then of course you cannot. I want to pass around this loggedIn variable to all the jsp's
    // after it checks  loggIn Status for each page I have tried running this but I keep getting an error: cannot resolve symbol this_session

    Use <%@ include file="header.jsp" %> instead

  • How to make audio track respond to timeline

    I'm starting a project and need the ability to control the speed of an audio file playback using the timeline.
    There are specific events that happen at certain times in the song, and i need the ability to scrub forward and backward on the timeline, including the audio. is this possible?
    I have a mechanism to scrub through the timeline of a symbol, but i can't get it to recognize the audio track.
    I use this code on the stage in a "composition ready"
    var symDur = sym.getSymbol("timelinePlay").getDuration(); // Get the timeline length of timelinePlay. We'll reference this later in the code. var mySymbol = sym.getSymbol("timelinePlay"); // Get the symbol timelinePlay. We'll reference this later in the code. var scrubber = sym.$("scrubber"); // Touch this to scrub the timeline of timelinePlay var bar = sym.$("bar"); // Bar the scrubber follows sym.$("mobileHit").hide(); // Added an extra invisible div to increase the hit region for mobile (hard to grab otherwise) var dragme = false; // Set the initial dragme function to false // Detect if mobile device, and if so swap out mouse events for touch events. This is pretty much duplicated code with touch events swapped. if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {     sym.$("mobileHit").show(); // Show the extra invisible div to increase the hit region for mobile (hard to grab otherwise)     $(function () {         scrubber.bind("touchstart", function (e) { // Enable the scrubber on touchstart             e.preventDefault(); // Cancels the default action of the mobile device - used to ensure our touch events are fired             dragme = true;         });         scrubber.bind("touchend", function () { // Disable the scrubber on touchend             e.preventDefault();             dragme = false;         });         scrubber.bind("touchmove", function (e) { // Make the magic happen on touchmove             if (dragme) {                 var touch = e.originalEvent.touches[0];                 var possibleX = touch.pageX;                 var leftX = bar.offset().left;                 var rightX = (leftX + bar.width()) - scrubber.width();                 var scrubWidth = rightX - leftX;   // Confine the scrubber to the width of the bar                 if (possibleX < leftX) {                     possibleX = leftX;                 }                 if (possibleX > rightX) {                     possibleX = rightX;                 }                 scrubber.offset({                     left: possibleX                 });                 var relativeX = possibleX - leftX;                 var stopTimeline = Math.ceil((relativeX / scrubWidth) * symDur); // Make the scrubber scrub the timeline length of timelinePlay                 mySymbol.stop(stopTimeline); // Stop the timeline of timelinePlay when the scrubber is released             }         });     }) } else $(function () {     scrubber.mousedown(function () { // Enable the scrubber on mousedown         dragme = true     })     $(document).mouseup(function () { // Disable the scrubber on mouseup         dragme = false     })     $(document).mousemove(function (e) { // Make the magic happen on mousemove         if (dragme) {             var possibleX = e.pageX;             var leftX = bar.offset().left;             var rightX = (leftX + bar.width()) - scrubber.width();             var scrubWidth = rightX - leftX;             // Confine the scrubber to the width of the bar             if (possibleX < leftX) {                 possibleX = leftX;             }             if (possibleX > rightX) {                 possibleX = rightX;             }             scrubber.offset({                 left: possibleX             });             var relativeX = possibleX - leftX;             var stopTimeline = Math.ceil((relativeX / scrubWidth) * symDur); // Make the scrubber scrub the timeline length of timelinePlay             mySymbol.stop(stopTimeline); // Stop the timeline of timelinePlay when the scrubber is released         }     }) }) 
    and have an group called 'scrubber' that contains a div called 'dot' and a box called 'mobileHit.' There's a horizontal bar that's not included in the 'scrubber' div (representation of a timeline) called 'bar' on top of which the 'scrubber' sits.
    the whole contraption controls a symbol called "timelinePlay"
    If there's any way to get the audio included in the timeline and give me the ability to scrub through the timeline /and/ audio, (imagine manually fast forwarding and rewinding a VHS tape) that would be wonderful!!!

    anybody?

  • How to track position of motor using LabVIEW?

    I have created a VI in LabVIEW that will allow me to control a motor to turn a certain number of degrees and then the motor will provide me with feedback on its final position. For example, I ask it to turn 180 degrees and it will output 180 degrees on the screen when it reaches its destination.
    Is there a way to track the motion of the motor as it turns second by second? For example, at 1 second it is at 30 degrees and 2 seconds 75 degrees, etc. I would like to display this information in a chart/graph or table.
    Any help would be greatly appreciated.

    You can try use chart and wire its input with the output of the motor and put the whole in a loop.

Maybe you are looking for