Professional Web Applications Themes

Can I let camera move while w3d file is loading? - Macromedia Director 3D

Models in my program need to be loaded and unloaded dynamically. I found camera can not move while loadfile() is being called. Does anyone have some idea to let camera move at that time?...

  1. #1

    Default Can I let camera move while w3d file is loading?

    Models in my program need to be loaded and unloaded dynamically. I found camera can not move while loadfile() is being called. Does anyone have some idea to let camera move at that time?
    WrongAgain Guest

  2. #2

    Default Re: Can I let camera move while w3d file is loading?

    You can but not using load file. You have to stream the W3D file in order to
    do that. 1. Publish your W3D file to a web server using a FTP client 2. In
    Director, select Insert > Media Element > Shockwave 3D 3. While the W3D Cast
    Member window is open, type the full URL to the W3D file in the Filename field
    of the cast member tab in the Property Inspector 4. Director now downloads the
    W3D file completely (note that it will be streamed in browser once you publish
    the DCR for the web) 5. Create two subsequent W3D sprites from the same linked
    3D cast member in the score 6. On the first W3D sprite, assign this code:
    property spriteNum property pMember property pCamera on beginSprite me
    pMember = sprite(spriteNum).member pCamera = sprite(spriteNum).camera end
    on exitFrame me -- Hold the score playhead until the W3D file has fully
    streamed if pMember.state < 4 then -- Insert your camera code here
    go to the frame end if end 7. On the second W3D sprite, add the code for
    your project Cheers, Karl. [url]http://www.chromelib.com[/url]

    Newt99 Guest

  3. #3

    Default Re: Can I let camera move while w3d file is loading?

    Wonderful message! Thank you. But I am still a little puzzled with your code:
    1. Do you mean that the two sprites display and stream by turns(sprite1
    displays and sprite2 streams, and when sprite2 has fully streamed, let sprite2
    display and sprite1 stream)? 2. What does mean about the two codes: pMember =
    sprite(spriteNum).member pCamera = sprite(spriteNum).camera I still not
    understand their use. Is ?spriteNum? the number of the other sprite? 3. Does
    this way consume double memory or graphic memory? Thanks ^_^

    WrongAgain Guest

  4. #4

    Default Re: Can I let camera move while w3d file is loading?

    No, it doesn't mean that. In the score, sprite 2 follows sprite 1 on the same
    channel. As they are both instances of the same W3D cast member, the
    transition between the two is seamless when the playhead reaches the second.
    That's all. It's the W3D cast members that streams, not the sprites. It's just
    a way of organizing code using the score. It doesn't change anything visually.

    Newt99 Guest

  5. #5

    Default Re: Can I let camera move while w3d file is loading?

    I am a bit clearer than just now. But now I am puzzled about why two subsequent sprites must be used? What?s the difference between the two in display?
    Thanks!

    WrongAgain Guest

  6. #6

    Default Re: Can I let camera move while w3d file is loading?

    As I told you in the previous message, there is absolutely no difference
    visually between the two sprites. As behaviors are assigned to sprites, this
    method allows you to assign a set of behaviors to the first sprite and a
    different one to the second. This allows to control streaming in the first and
    interactivity in the second (and you could have e.g cloneModelFromCastMember()
    instructions in between on a third).

    Newt99 Guest

Similar Threads

  1. Question Need help with making the camera move with the mouse (FPS style)
    By hyper in forum Macromedia Director 3D
    Replies: 0
    Last Post: January 9th, 09:11 PM
  2. xyz axis change with camera move
    By mnkongull in forum Macromedia Director 3D
    Replies: 0
    Last Post: March 26th, 09:12 PM
  3. Replies: 0
    Last Post: October 31st, 02:02 AM
  4. #25977 [NEW]: fopen('file', 'r'); doesn't move to the end of the file
    By nightstorm at tlen dot pl in forum PHP Development
    Replies: 0
    Last Post: October 24th, 04:53 PM
  5. both mouse buttons down to move model/camera
    By Karl Sigiscar in forum Macromedia Director 3D
    Replies: 0
    Last Post: August 21st, 08:32 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