clicking from within w3d.

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

  1. #1

    Default clicking from within w3d.

    hi

    I want to know how will i click within a .w3d file. and make something
    happend. like opening a link or something. Just like the Magic.dcr. But more
    understanding. Magic has no tutorial or nothing, it really makes it hard to
    understand.

    So how will i do this ,... thank you.

    bsx06 Guest

  2. Similar Questions and Discussions

    1. Clicking on 3D annotations
      For a plug-in I am developing, I need to allow the user to select from the 3D annotations present on a page. I've created a tool that uses the...
    2. Clicking OK doesn't work
      I downloaded the Dreamweaver extension dwmx2004_extensions_for_cfmx7 for my dreamweaver 8. I did this so i would beable to connect to Access's...
    3. Double-clicking
      I hope this isn't too dumb a question - how can I create a "double-click" function for an object? I'm trying to create a scenario where the end user...
    4. clicking through the window problem!
      Hi, I hope someone can help me with this problem...it might be a newbie one. When a simple shockwavemovie is playing in a browser- window and...
    5. Annoying IE clicking
      Hi, I know this is slightly off topic, but I have a PHP script that displays the network status of various machines on my network, which...
  3. #2

    Default Re: clicking from within w3d.

    Hi,

    Modelsunderloc is the command you want to look at in the director help file.
    Here's the the example code show in that section:

    Example
    The first line in this handler translates the location of the cursor from a
    point on the Stage to a point within sprite 5. The second line uses the
    modelsUnderLoc command to obtain the first three models found under that
    point. The third line displays the returned detailed information about the
    models in the message window.

    -- Lingo syntax
    on mouseUp
    pt = the mouseLoc - point(sprite(5).left, sprite(5).top)
    m = sprite(5).camera.modelsUnderLoc(pt, 3, #detailed)
    put m
    end

    // JavaScript syntax
    function mouseUp() {
    pt = _mouse.mouseLoc - point(sprite(5).left, sprite(5).top);
    m = sprite(5).camera.modelsUnderLoc(pt, 3, #detailed);
    put(m);
    }
    Cheers,GP
    "bsx06" <webforumsuser@macromedia.com> wrote in message
    news:c4k92u$ian$1@forums.macromedia.com...> hi
    >
    > I want to know how will i click within a .w3d file. and make something
    > happend. like opening a link or something. Just like the Magic.dcr. But
    more
    > understanding. Magic has no tutorial or nothing, it really makes it hard
    to
    > understand.
    >
    > So how will i do this ,... thank you.
    >

    Gianpiero Colagiacomo Guest

  4. #3

    Default Re: clicking from within w3d.

    so like, if i wanted to click on a box called : my_box1, within the w3d. and it opens up a link. is this is the same script. or how will the script change?
    bsx06 Guest

  5. #4

    Default Re: clicking from within w3d.

    try this:

    on mouseUp

    pt = the mouseLoc - point(sprite(5).left, sprite(5).top)

    -- use modelunderloc to return only the first model under the mouse location

    m = sprite(5).camera.modelUnderLoc(pt)

    if not voidp(m) then

    -- if the model under the mouse location is called "my_box1"

    if (m.name = "my_box1") then

    -- open your web page

    gotoNetPage "http//www.yourserver.com/yourpage.html"

    end if

    end if

    end




    "bsx06" <webforumsuser@macromedia.com> wrote in message
    news:c4kqn5$cb9$1@forums.macromedia.com...
    > so like, if i wanted to click on a box called : my_box1, within the w3d.
    and it opens up a link. is this is the same script. or how will the script
    change?


    Gianpiero Colagiacomo Guest

  6. #5

    Default Re: clicking from within w3d.

    hi,

    how about click two boxes within one w3d?

    the script worked out great, but i don't know how to make it so that you can click on box1 or box2
    bsx06 Guest

  7. #6

    Default Re: clicking from within w3d.

    bsx06,

    You just need to change the 'if m.name = ' part of the script to handle more
    than one possible value - using a case statement for example:

    case (m.name) of

    "box1":
    -- do processing for box 1

    "box2":
    -- do processing for box 2

    end case

    Cheers,

    GP


    "bsx06" <webforumsuser@macromedia.com> wrote in message
    news:c56v8h$rqa$1@forums.macromedia.com...
    > hi,
    >
    > how about click two boxes within one w3d?
    >
    > the script worked out great, but i don't know how to make it so that you
    can click on box1 or box2


    Gianpiero Colagiacomo Guest

  8. #7

    Default Re: mouseLoc work it?

    i have the same problem with w3d objects. i'm working on my tesis project and i
    really need it.
    Please tell me if u can do that and what's the best way to made it.

    thanks a lot.
    Luis Andres.

    answer me please.

    luisandres 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