Professional Web Applications Themes

Assigning a mouse event/script to a 3D model with Lingo - Macromedia Director 3D

I have a button and an empty 3D world. When I press that button, I would like the following to happen: 1. Create a 3D cube. 2. Assign a mouse-up event for the cube. I know I can get that to work using the property inspector but HOW do I get that to work in Lingo? I am thinking that I should use RegisterForEvent or RegisterScript to get the above to work but I have no success with it so far. Appreciate any help on this. Thanks! Bobby...

  1. #1

    Default Assigning a mouse event/script to a 3D model with Lingo

    I have a button and an empty 3D world.
    When I press that button, I would like the following to happen:

    1. Create a 3D cube.
    2. Assign a mouse-up event for the cube.

    I know I can get that to work using the property inspector but HOW do I get
    that to work in Lingo?
    I am thinking that I should use RegisterForEvent or RegisterScript to get
    the above to work but I have no success with it so far.
    Appreciate any help on this.
    Thanks!

    Bobby


    Bobby Tan Guest

  2. #2

    Default Re:Assigning a mouse event/script to a 3D model with Lingo

    this should be a sprite behavior for your button, I haven't tried it but it might help get you started.
    BTW this stuff is taken right out of the lingo dictionary.

    global i
    on mousedown me
    mr=member("3dworld").newmodelresource("cube",#box)
    mr.length=10
    mr.height=10
    mr.width=10
    i=i+1
    member("3dworld").newModel("cube"&i, mr)
    member("3dworld").registerforevent(#mouseup,#check model, me)
    end mousedown

    on checkmodel me
    pt =the mouseLoc -point(sprite(1).left,sprite(1).top)
    m =sprite(5).camera.modelsUnderLoc(pt,1,#detailed)
    put m
    end checkmodel





    flashjedi webforumsuser@macromedia.com Guest

Similar Threads

  1. current selected text to highlighted text on mouse up event through java script
    By mandal.tanmay@gmail.com in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: February 8th, 12:09 PM
  2. model to follow mouse
    By yogeshhungama in forum Macromedia Director 3D
    Replies: 3
    Last Post: August 25th, 04:48 PM
  3. add the lod modifier to a lingo model
    By hondo3000 in forum Macromedia Director 3D
    Replies: 11
    Last Post: September 23rd, 09:28 PM
  4. Dynamically assigning stage script to MIAW sprite?
    By Dinko81 webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 2
    Last Post: November 6th, 08:02 PM
  5. Model faces mouse...
    By Medion webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: October 1st, 02:40 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