A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: fast forward button

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    8

    Trying to make video controls for flash mc.

    They control the timeline of an mc on a higher level using - goto and play current frame +8.

    They work fine except rather than stopping at the end of the mc timeline it skips back to the beginning of the sequence. Have tried various ways of rectifying this (ie setting variable for _totalframes of target level and trying to make fast forward not excede this number), none of which work.

    any ideas? shouldn't be that difficult but I just can't make it work.

    thanks in advance

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Posts
    475
    hm... try this

    if ((MC._currentframe + 8) < MC._totalframes)
    MC.gotoAndPlay (MC._currentframe + 8);
    else
    MC.gotoAndStop (MC._totalframes);

    but i think you already did that... try increasing 8 to 9 - it could be that flash continues playing while the check is done...

    Yours
    HTD

  3. #3
    Junior Member
    Join Date
    Dec 2000
    Posts
    8

    still no joy

    howie old boy,

    this is just the kind of thing I've been trying. Should have mentioned I'm using flash 4 (wrong forum I know).

    currently using:

    Set Variable: "/:current" = GetProperty ("_level2", _currentframe )
    Set Variable: "/:end" = GetProperty ("_level2", _totalframes )
    If ((/:current+9)</:end)
    Begin Tell Target ("_level2")
    Go to and Play (_currentframe+8)
    End Tell Target
    Else
    Begin Tell Target ("_level2")
    Go to and Stop ("end")
    End Tell Target
    End If

    global variables not necessary I know just out of desperation. have tried many variations on this(getproperty etc.).

    annoying thing is this - if I replace /:end with a numeric value it works fine but I want this to be a generic piece of script to work with mc's of different lengths. currently not picking up _totalframes?

    any more ideas

    catto

  4. #4
    Senior Member
    Join Date
    Feb 2001
    Posts
    475
    Well i started as a C++ programmer and when it came to flash 4 i totally refused to program anything for it... I mean you see the difference don't you

    okay your problem could be that _level2 has actually got more totalframes than your MC.... use the MCs instance name instead. Does the trace () command work for flash 4?? if so try to figure out what values the /:end and /:current really have... like:

    trace (/:end);

    If you have Flash 5 just do my thing and export as Flash 4...
    Yours
    HTD

  5. #5
    Junior Member
    Join Date
    Dec 2000
    Posts
    8

    hoooorahh

    thank you so much for your help, you got to the root of the problem.

    someone working on the project before me had inserted extra scene without assets that were adding to the _totalframes, hence the problem.

    trace function helped me locate this discrepancy.

    thanks again,

    catto

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center