changing cast members

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

  1. #1

    Default changing cast members

    I hope you guys can understand what i'm about to write here: I created a button(I called it BUTTON A) and a display box(i called it DISPLAYBOX);i also created another button(i called it BUTTON B) and another display box with text inside the display box(i called it TEXT),i had created some behaviours where when i move within BUTTON A,BUTTON A will change to BUTTON B by changing the cast member to BUTTON B, this is the script(set the member of sprite the currentSpriteNum to member "book2aa"),i also wanna change the DISPLAYBOX to TEXT when i move my mouse within BUTTON A,so is there any LINGO script that i can use to perform this action, thanks...


    Lifehouse webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. cast members moved in cast - neet to get htem back!!!
      Hello I inadvertedly pasted a cast member into my cast and it bumped the rest of the members one number forward, screwing up my lingo all over the...
    2. changing the cast number of a cast at authoring time?
      is it possible to change the cast number of a cast at authoring time?
    3. changing different types of cast members ?
      Hello every one. I have been trying to swap out different types of members. Mainly images for text fields and having some difficulty. example:...
    4. run one of cast members ?!!
      hi all, I want to run an *.exe file that has been placed in my cast member. for example I added "mario.exe" in my cast member, now I want to...
    5. changing cast members...
      I hope you guys can understand what i'm about to write here: I created a button(I called it BUTTON A) and a display box(i called it DISPLAYBOX);i...
  3. #2

    Default Re: changing cast members

    one way to achive this is as follows

    Add the following script to the display box

    on ChangeMyMember me, i
    case i of
    1: sprite( the currentspriteNum).member = "TEXT"
    2: sprite( the currentspriteNum).member = "Display"
    end case
    end changeMyMember

    then in your button script you can use the following to call the custom
    handler

    sendallSprites(#ChangeMyMember, <value>)

    where value is either 1 or 2

    This is not the ideal method as it will cost in perfomance when you have a
    large amount of sprites but it will work. Alternatively you have to send the
    message to the correct sprite Channel. If you do this then you should set up
    a global variable to hold the spriteChannel number. Set up its value in the
    StartMovie handler in a movie script and then use the variable throughout.
    This means that if you move the sprite you only have to alter the value in
    one place to get the movie working again.

    to send the message explicitly use

    sendsprite( <whichsprite> ,#ChangeMyMember, <value>)
    or
    sprite(<whichsprite> ).ChangeMyMember( <value> )


    hope this helps

    --
    Stephen Whipp
    Eastmond Publishing Ltd. (UK)
    -----------------------------------------------
    Visit our website at:
    [url]www.autograph-maths.com[/url]
    ----------------------------------------------

    Lifehouse <webforumsuser@macromedia.com> wrote in message
    news:bicj22$p04$1@forums.macromedia.com...
    > I hope you guys can understand what i'm about to write here: I created a
    button(I called it BUTTON A) and a display box(i called it DISPLAYBOX);i
    also created another button(i called it BUTTON B) and another display box
    with text inside the display box(i called it TEXT),i had created some
    behaviours where when i move within BUTTON A,BUTTON A will change to BUTTON
    B by changing the cast member to BUTTON B, this is the script(set the member
    of sprite the currentSpriteNum to member "book2aa"),i also wanna change the
    DISPLAYBOX to TEXT when i move my mouse within BUTTON A,so is there any
    LINGO script that i can use to perform this action, thanks...
    >
    >

    Stephen Whipp 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