Professional Web Applications Themes

lists to control rotation help??? - Macromedia Director 3D

Hi I am trying to get lists which were created with flashamp to control rotation and position in director so that I can have audio linked to objects. My script below shows my problem where: alist = [etc] on rotatescript alist = [1,12,3,24,3,54,3,23,5,6,43,2,34,] scene.model[1].rotate(alist,1,0) end I dont want to control a pre animated object or bonesplayer as i want to move the whole object on keypress that already includes animation. Any help would be very appreciated. thanks remainz...

  1. #1

    Default lists to control rotation help???

    Hi I am trying to get lists which were created with flashamp to control
    rotation and position in director so that I can have audio linked to
    objects. My script below shows my problem where:

    alist = [etc]


    on rotatescript
    alist = [1,12,3,24,3,54,3,23,5,6,43,2,34,]
    scene.model[1].rotate(alist,1,0)
    end

    I dont want to control a pre animated object or bonesplayer as i want to
    move the whole object on keypress that already includes animation.

    Any help would be very appreciated.

    thanks remainz


    remainz Guest

  2. #2

    Default Re: lists to control rotation help???

    remainz wrote:
    > Hi I am trying to get lists which were created with flashamp to control
    > rotation and position in director so that I can have audio linked to
    > objects. My script below shows my problem where:
    >
    > alist = [etc]
    >
    >
    > on rotatescript
    > alist = [1,12,3,24,3,54,3,23,5,6,43,2,34,]
    > scene.model[1].rotate(alist,1,0)
    > end
    You can´t pass an entire list as parameter for rotate() but an integer.
    You might have to do something like this:


    on rotatescript whichPos
    alist = [1,12,3,24,3,54,3,23,5,6,43,2,34,]
    scene.model[1].rotate(alist[whichPos],1,0)
    end

    --And then

    rotatescript 2

    --which would be the same as doing

    scene.model[1].rotate(12,1,0)

    HTH,
    --
    Agustín María Rodríguez | [email]agustinOnWine.com.ar[/email] | [url]www.OnWine.com.ar[/url]

    Agustín María Rodríguez Guest

  3. #3

    Default Re: lists to control rotation help???

    Hi and thanks for your help
    I have made great leaps in my small code but a major problem still haunts me.
    Can you help once more?

    Below is more code which works fine but the problem is that I need the list (array in the enterframe handler) to be executed over a spaced time period and not all at once. The point of my project is to get the node movement to be controlled by an Audio file array produced by Flashamp and synced with the movement of the node.
    So the sound and 3D node when triggered will happen similtaneously over the length of the array and audio.

    This is probably confusing but I basically need to get a time control element into the code as the timeMS bares no relation to and does not control the repeat loop speed.

    thanks again remainz

    on initialize
    clearworld(scene)
    scene.camera[1].colorbuffer.clearvalue = rgb(5,140,60)
    mybox = createbox("box01", 50,50,50,rgb(10,200,100))
    mybox.registerscript(#timeMS, #rotatescript, 0, 0, 41, 0)
    end


    on enterframe
    if keypressed ("y") then
    x = 0
    repeat while x < 14
    put x
    x = x + 1
    alist = [1,-120,3,-240,3,-540,3,-230,5,6,430,2,340,4]
    glist = alist.getat (x)
    member("3dworld").model[1].rotate(glist ,1,0)
    put glist
    end repeat
    end if
    endText


    remainz webforumsuser@macromedia.com Guest

Similar Threads

  1. Rotation between two transform.rotation vectors.
    By SuperTank in forum Macromedia Director 3D
    Replies: 3
    Last Post: September 27th, 05:07 PM
  2. rotation
    By Martin Voegeli, vom in forum Macromedia Flash
    Replies: 3
    Last Post: February 18th, 07:10 PM
  3. Need a way to control de rotation (angle) of sprites through Lingo
    By Hausser webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 2
    Last Post: December 2nd, 11:32 AM
  4. Replies: 2
    Last Post: July 2nd, 08:05 AM
  5. lists, attaching behaviour dynamiclly, update lists
    By crazy big fun in forum Macromedia Director Basics
    Replies: 0
    Last Post: June 28th, 06:20 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