Professional Web Applications Themes

rollover in 3D - Macromedia Director 3D

I would like to make a kind of a rollover in a 3d world. I use this script voor a mouseDown action: on mouseDown (me) -- update the mouse down property thisSprite = sprite(me.spriteNum) theLoc = the mouseLoc - point(sprite(thisSprite).left, sprite(thisSprite).top) theModel = sprite(thisSprite).camera.modelUnderLoc(theLoc) member("modelklik").text = string(theModel) if theModel.shaderList[1] = pMember.shader("tegelShader") then pMember.shader("tegelShader").specular = rgb( 238, 0, 0 ) pMember.shader("tegelShader").shininess = 1.0000 else pMember.shader("tegelShader").specular = rgb( 255, 255, 255 ) pMember.shader("tegelShader").shininess = 30.000 end if end mouseDown This script is working fine but I would like to convert it to a mouseEnter but i can't get it to work.... where ...

  1. #1

    Default rollover in 3D

    I would like to make a kind of a rollover in a 3d world.
    I use this script voor a mouseDown action:

    on mouseDown (me)
    -- update the mouse down property
    thisSprite = sprite(me.spriteNum)
    theLoc = the mouseLoc - point(sprite(thisSprite).left,
    sprite(thisSprite).top)
    theModel = sprite(thisSprite).camera.modelUnderLoc(theLoc)

    member("modelklik").text = string(theModel)
    if theModel.shaderList[1] = pMember.shader("tegelShader") then
    pMember.shader("tegelShader").specular = rgb( 238, 0, 0 )
    pMember.shader("tegelShader").shininess = 1.0000
    else
    pMember.shader("tegelShader").specular = rgb( 255, 255, 255 )
    pMember.shader("tegelShader").shininess = 30.000
    end if
    end mouseDown

    This script is working fine but I would like to convert it to a mouseEnter
    but i can't get it to work.... where can I find a tutorial for changing the
    specular settings on a rollover or something

    Thanx in advance!


    Folkert Jongbloed Guest

  2. #2

    Default Re: rollover in 3D

    It might be that mouseEnter doesn't work as it's only called one time - when
    the mouse first enters that sprite. How about trying mouseWithin instead...

    --


    Dave
    [url]http://www.blurredistinction.com/director[/url]


    Dave Mennenoh Guest

  3. #3

    Default Re: rollover in 3D

    Ok, the mouseWithin really does the job! Perfect! Thanx!


    Folkert Jongbloed Guest

  4. #4

    Default Re: rollover in 3D

    This feature has already been coded. Check the "Go To URL with Rollover"
    behavior in the Chrome Lib:
    [url]http://membres.lycos.fr/karlsigiscar/shockwave3d[/url]



    Karl Sigiscar Guest

  5. #5

    Default Re: rollover in 3D

    BTW, the emissive color shader property is the one used for a rollover as it
    makes the object look as if it were emitting some light while it's not a
    lightsource.



    Karl Sigiscar Guest

  6. #6

    Default Re: rollover in 3D

    WOW! I'ne never seen this, thanx!!!!

    "Karl Sigiscar" <karl.sigiscarlaposte.net> schreef in bericht
    news:bnjki6$drq$1forums.macromedia.com...
    > This feature has already been coded. Check the "Go To URL with Rollover"
    > behavior in the Chrome Lib:
    > [url]http://membres.lycos.fr/karlsigiscar/shockwave3d[/url]
    >
    >
    >

    Folkert Jongbloed Guest

  7. #7

    Default Re: rollover in 3D

    I have the same problem but I think the solution is different (although I haven't found it yet - that's why I'm asking here :D )...

    I want to do a rollover effect on an object in my 3D scene, but the problem is that this object isn't a separate cast member ! I mean, I only have one SW3D cast member, which is my (empty) scene ; then all textures and models are generated with Lingo, on the run, in the "on beginSprite me" loop... So I can refer to my various 3D objects with expressions such as member("scene").model[16] , but I have no distinct 3D cast members to apply behaviours to. :\

    I run all my animations and effects in an "on exitFrame" loop at the first frame, and tried to implement the rollover there, but so far it doesn't work. I've tried to use on mouseOver member("scene").model[18] for instance, but Director won't accept this (I thought it would)... What should I use instead as a reference to the object I want to highlight ?

    By the way, I don't need the highlighting function itself, as I know how I'll do it (just change update te texture, at least I got that working) ; all I need is a way to trigger the change when the mouse goes over my object...


    Pezito webforumsuser@macromedia.com Guest

Similar Threads

  1. help with rollover in DW 8
    By experience66 in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: October 17th, 02:07 PM
  2. Rollover
    By Andrew Kennedy in forum Macromedia Director Basics
    Replies: 12
    Last Post: December 31st, 12:56 AM
  3. trying to do a rollover - please help!!!
    By sussie.k webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 4
    Last Post: September 16th, 07:49 PM
  4. Rollover and making another rollover with links
    By 360liquid webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 26th, 12:26 AM
  5. Rollover ???
    By amanita webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: July 23rd, 06:07 AM

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