5

I'm working with a few designers, each of whom have created 3D animations (using fp 10 capabilities) for use in the same flash application. Each 3D animation is a unique movieclip that will ultimately be part of the same .fla file.

The problem I'm having is that each of the movieclips was created in a separate .fla, and each .fla had different settings for the vanishing point for the stage. This means that after importing the various moveiclips into my library, none of the visual assets are aligned as they were in their source .flas.

The good news is that only one of these movieclips is displayed at a time, so I don't need to be able to have multiple vanishing points; all I need to do is change the global vanishing point programmatically at various points during runtime.

What should I do? I've tried accessing root.transform.perspectiveProjection.projectionCenter and dynamically assigning it new Point(x, y) values, but they don't seem to be having any effect on the 3D movieclips.

Thanks!

justinbach
  • 1,945
  • 26
  • 44

2 Answers2

2

Each clip can have it's own vanishing point, try checking what the instances of their movieclips has for that value (transform.perspectiveProjection.projectionCenter)

grapefrukt
  • 27,016
  • 6
  • 49
  • 73
  • If I try to set the vanishing point for an mc other than the main stage I get this error: Error #1009: Cannot access a property or method of a null object reference. my code: movieclip_mc.transform.perspectiveProjection.projectionCenter = new Point(100,100); – Kokodoko Oct 09 '14 at 16:45
  • 1
    I think you need to ensure that there is in fact a perspectiveProjection first before changing it. – grapefrukt Oct 12 '14 at 12:17
  • Yep that was it. I assumed that would be automatic, because the main stage's projectionpoint CAN be set without creating a new point first. – Kokodoko Oct 14 '14 at 12:59
0

How about using localToGlobal to calculate the new point for each of the various movieclips?

Robert
  • 1