Professional Web Applications Themes

"back" and return to previous place script? - Macromedia Director Basics

Hi Bob, The simplest way to do this is to store the current frame number in a global variable. Then jump to the whiteboard frame. The return button will take you back to the frame number that's stored in the global variable. For instance, your jump to whiteboard button behavior probably looks like this: on mouseUp me go to frame X end where X is the frame number for the whiteboard. You would need to change that to something like this: global lastLocation on mouseUp me lastLocation = the frame go to frame X end You declare a global variable ...

  1. #1

    Default Re: "back" and return to previous place script?

    Hi Bob,

    The simplest way to do this is to store the current frame number in a
    global variable. Then jump to the whiteboard frame. The return button
    will take you back to the frame number that's stored in the global
    variable.

    For instance, your jump to whiteboard button behavior probably looks
    like this:

    on mouseUp me
    go to frame X
    end

    where X is the frame number for the whiteboard.

    You would need to change that to something like this:

    global lastLocation

    on mouseUp me
    lastLocation = the frame
    go to frame X
    end

    You declare a global variable and then place the current frame number
    into it.

    At the whiteboard frame you have a return button. It would need a
    function like this:

    global lastLocation

    on mouseUp me
    go to frame lastLocation
    end

    Since you placed the frame number into the global variable, this
    function will take that value and use it.

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

  2. #2

    Default Re: "back" and return to previous place script?

    Thanks Rob,

    You were a huge help. That's exactly what I needed. Do you happen to know of
    a quick way to "back up" thru a movie using those frames I've designated as
    "wait for mouse click"?.

    Thanks again,

    Bob McInnis

    in article 050920031226206883%robddg-designs.com, Rob Dillon at
    [email]robddg-designs.com[/email] wrote on 9/5/03 12:26 PM:
    > Hi Bob,
    >
    > The simplest way to do this is to store the current frame number in a
    > global variable. Then jump to the whiteboard frame. The return button
    > will take you back to the frame number that's stored in the global
    > variable.
    >
    > For instance, your jump to whiteboard button behavior probably looks
    > like this:
    >
    > on mouseUp me
    > go to frame X
    > end
    >
    > where X is the frame number for the whiteboard.
    >
    > You would need to change that to something like this:
    >
    > global lastLocation
    >
    > on mouseUp me
    > lastLocation = the frame
    > go to frame X
    > end
    >
    > You declare a global variable and then place the current frame number
    > into it.
    >
    > At the whiteboard frame you have a return button. It would need a
    > function like this:
    >
    > global lastLocation
    >
    > on mouseUp me
    > go to frame lastLocation
    > end
    >
    > Since you placed the frame number into the global variable, this
    > function will take that value and use it.
    Robert McInnis Guest

  3. #3

    Default Re: "back" and return to previous place script?

    I'm not sure that I understand what you want to do? How do you want to
    move and under what cirstances? Do you always want to move the
    previous wait frame, or do you want to be able to move to a particular
    wait frame?

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

  4. #4

    Default Re: "back" and return to previous place script?

    Rob,

    I'd like to always move to the previous wait frame, just like a Powerpoint
    presentation's back button would.

    Thanks again,

    Bob McInnis


    in article 050920031331468515%robddg-designs.com, Rob Dillon at
    [email]robddg-designs.com[/email] wrote on 9/5/03 1:31 PM:
    > I'm not sure that I understand what you want to do? How do you want to
    > move and under what cirstances? Do you always want to move the
    > previous wait frame, or do you want to be able to move to a particular
    > wait frame?
    Robert McInnis Guest

  5. #5

    Default Re: "back" and return to previous place script?

    If you had markers at each of these frames then you could just use:

    on mouseUp me
    go previous
    end

    and that would be it.

    Since you don't have markers, you can use the same scenario as the
    whiteboard:

    In each forward button:

    global lastFrame
    -- be sure to use a different global variable than the other control

    on mouseUp me
    lastFrame = the frame
    go to X -- where ever the next point is
    end

    and in each back button:

    global lastFrame

    on mouseUp me
    go to frame lastFrame
    end

    alternately, if each of these slide frames is equidistant from each
    other, you can just use that distance:

    on mouseUp me
    go to the frame - 4
    end

    that will jump the playback head back 4 frames.

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

  6. #6

    Default Re: "back" and return to previous place script?

    Thanks Rob,

    That's a huge help. You've saved me hours away from my family!

    Bob McInnis


    in article 050920031412309316%robddg-designs.com, Rob Dillon at
    [email]robddg-designs.com[/email] wrote on 9/5/03 2:12 PM:
    > If you had markers at each of these frames then you could just use:
    >
    > on mouseUp me
    > go previous
    > end
    >
    > and that would be it.
    >
    > Since you don't have markers, you can use the same scenario as the
    > whiteboard:
    >
    > In each forward button:
    >
    > global lastFrame
    > -- be sure to use a different global variable than the other control
    >
    > on mouseUp me
    > lastFrame = the frame
    > go to X -- where ever the next point is
    > end
    >
    > and in each back button:
    >
    > global lastFrame
    >
    > on mouseUp me
    > go to frame lastFrame
    > end
    >
    > alternately, if each of these slide frames is equidistant from each
    > other, you can just use that distance:
    >
    > on mouseUp me
    > go to the frame - 4
    > end
    >
    > that will jump the playback head back 4 frames.
    Robert McInnis Guest

Similar Threads

  1. Replies: 0
    Last Post: October 19th, 07:36 AM
  2. #39195 [NEW]: if (0=="any sting") echo "it's return true";
    By waynewn at citiz dot net in forum PHP Bugs
    Replies: 0
    Last Post: October 19th, 07:33 AM
  3. Replies: 2
    Last Post: December 8th, 02:15 AM
  4. How do you simulate "." or "source" in a perl script ?
    By John Strauss in forum Perl / CGI
    Replies: 4
    Last Post: August 11th, 10:46 AM
  5. Replies: 1
    Last Post: August 1st, 04:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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