Jump to content
Search Community

Positioning problem w/external swf using Papervision3D

Nellisoft test
Moderator Tag

Recommended Posts

Yes, it's me again... still working on my banner ad gallery thing.

My latest problem deals with the combination of SWFLoader and external SWFs that use Papervision3D, and since I'm getting no love over at the PV3D forums, I'm throwing it out here:

 

This is how things are being loaded:

Interface <- PV3D Gallery <- PV3D Banner Ad

 

I have an example banner ad that uses Papervision in the beginning to spin some planes around, nothing fancy.

When I use SWFLoader to pull it into my gallery, the positioning on the PV3D stuff is way off, but it's only the y-coordinates.

It looks like it's adding about half of the gallery's overall stage height, which is much larger than the banner ad, thereby moving it down and completely out of the loader's cropping area.

 

I was able to work around the same problem when loading the gallery into the interface by setting the gallery loader's y-coordinate to 0 (instead of height/2 which would normally center it) and moving the gallery's 2D elements down by height/2 to compensate for the shift.

Doing it like that was okay for the gallery because it has only a few 2D elements; but the banner ad has like 10 times as many, and the positioning of it inside the gallery is a lot more complicated.

 

Any thoughts?

Link to comment
Share on other sites

SWFLoader won't change your object's y coordinate. This definitely sounds like a PV3D question and I'm not a PV3D user - sorry. I'd recommend creating a very simple example FLA that you can post in the PV3D forums or something that makes it very easy for folks to open, publish, and see exactly what you're talking about. Most people don't want to troubleshoot generic questions with no sample code or files or anything. But again, I can't be of much assistance since I'm not a PV3D guy.

Link to comment
Share on other sites

Alright, figured it out... it was a PV3D problem:

It had to do with the viewport auto-scaling to fit the stage, and since the stage in the gallery was much bigger than the banner ad's, the 3D stuff was being scaled into the wrong spot.

 

I was about to do up an example file when I suddenly realized it must be related to the camera or viewport.

The way things have been going, I hit a problem in the middle of working on something else, bang my head against the wall for a couple hours trying to fix it myself, and then only have time to post a description of what's happening before leaving for the night :?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...