Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default QT time tracking

    Hi all,
    I'm trying to execute various commands based on the time of a QT movie. The
    owner wants to stay away from cuepoints and I wanted to stay away from a
    massive "if then" mess. The following works, but I see potential problems,
    especially if other processor intensive items are being executed at the same
    time. I don't like the fact it gets called so often. Any thoughts, insights,
    suggestions appreciated.
    Thanks,
    Sean

    --on QT sprite
    property my, pTimeList

    on beginSprite me
    my=sprite(me.spriteNum)
    pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
    timeOut("timer").new(1, #getTime, me)
    end

    on getTime me
    if my.movieRate=1 then
    ct = my.movieTime
    t = getaProp(pTimeList, ct)
    if t<> void then
    do t
    end if
    end if
    end

    on endSprite me
    timeout("timer").forget()
    end


    sean Guest

  2. Similar Questions and Discussions

    1. Ad Tracking
      This is my first time working with Ad Tracking in Flash and I want to make sure I'm going about it correctly.. I can't test it on my side, so I want...
    2. InDesign tracking vs. Quark tracking?
      Hi Anne Marie, I would describe letter, word, and glyph scaling parameters as things the paragraph composer can fuzzy-logic work with. Fuzzy logic...
    3. Tracking create and change time
      Hi, in the MySQL documentation up to version 5.1 the page "Data Types -> .... -> TIMESTAMP Properties as of MySQL 4.1" states: "It is not...
    4. Module for time tracking and billing?
      I'm looking for a Perl module/application that can help me track the amount of time I spend on various projects and then generate some reporting off...
  3. #2

    Default Re: QT time tracking

    The biggest problem is expecting an exact movietime match while
    monitoring a value incrementing 1000 times a second, odds are the exact
    times in pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
    will be missed. Actually only movitimes a multiple of 1000/ the
    movierate will be encountered.

    IF the movie is guranteed to play in a linear fashion only the next
    value in a sorted list must be watched for.

    You can also do the periodic movietime chacks at the director score
    frame rate ( a reasonable interval) with a score or sprite script.



    -- try this untested modified script's approach


    --on QT sprite
    property my, pTimeList, nextTimeEntry -- added

    on beginSprite me
    my=sprite(me.spriteNum)
    pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
    nextTimeEntry = 1 -- added look for first list entry
    end

    on prepareFrame -- of director score



    on getTime me
    if my.movieRate=1 and nextTimeEntry then
    ct = my.movieTime
    if ct >= getPropAt(pTimeList, nextTimeEntry) then -- at time
    do getProp(pTimeList, getPropAt(pTimeList, nextTimeEntry))
    -- increment time pointer
    if nextTimeEntry < count(pTimeList) then
    nextTimeEntry = nextTimeEntry + 1
    else
    nextTimeEntry = 0 -- turn it off
    end if
    end if
    end if
    end
    JB Guest

  4. #3

    Default Re: QT time tracking

    Brilliant. Thanks JB.
    Much cleaner.

    "JB" <lingoguy@sbcglobal.net> wrote in message
    news:lingoguy-7E5741.20420701122003@forums.macromedia.com...
    > The biggest problem is expecting an exact movietime match while
    > monitoring a value incrementing 1000 times a second, odds are the exact
    > times in pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
    > will be missed. Actually only movitimes a multiple of 1000/ the
    > movierate will be encountered.
    >
    > IF the movie is guranteed to play in a linear fashion only the next
    > value in a sorted list must be watched for.
    >
    > You can also do the periodic movietime chacks at the director score
    > frame rate ( a reasonable interval) with a score or sprite script.
    >
    >
    >
    > -- try this untested modified script's approach
    >
    >
    > --on QT sprite
    > property my, pTimeList, nextTimeEntry -- added
    >
    > on beginSprite me
    > my=sprite(me.spriteNum)
    > pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
    > nextTimeEntry = 1 -- added look for first list entry
    > end
    >
    > on prepareFrame -- of director score
    >
    >
    >
    > on getTime me
    > if my.movieRate=1 and nextTimeEntry then
    > ct = my.movieTime
    > if ct >= getPropAt(pTimeList, nextTimeEntry) then -- at time
    > do getProp(pTimeList, getPropAt(pTimeList, nextTimeEntry))
    > -- increment time pointer
    > if nextTimeEntry < count(pTimeList) then
    > nextTimeEntry = nextTimeEntry + 1
    > else
    > nextTimeEntry = 0 -- turn it off
    > end if
    > end if
    > end if
    > end

    sean Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139