PaperVision: Difference between revisions
Jump to navigation
Jump to search
(Created page with "'''PaperVision3D''' is a toolkit for creating 3D objects and animations in flash. It is available [http://code.google.com/p/papervision3d/ here]. Unfortunately, PaperVision,...") |
Whirled vox (talk | contribs) m (Text replacement - ">" to ">") |
||
| (One intermediate revision by the same user not shown) | |||
| Line 7: | Line 7: | ||
In Viewport3D, find the place where it's adding a listener to the stage: | In Viewport3D, find the place where it's adding a listener to the stage: | ||
<code> | |||
protected function onAddedToStage(event:Event):void | protected function onAddedToStage(event:Event):void | ||
{ | { | ||
| Line 13: | Line 13: | ||
onStageResize(); | onStageResize(); | ||
} | } | ||
</code> | |||
And change this to: | And change this to: | ||
<code> | |||
protected function onAddedToStage(event:Event):void | protected function onAddedToStage(event:Event):void | ||
{ | { | ||
| Line 25: | Line 25: | ||
onStageResize(); | onStageResize(); | ||
} | } | ||
</code> | |||
This means that you can't make use of the autoScaleToStage feature. | This means that you can't make use of the autoScaleToStage feature. | ||
Latest revision as of 22:54, 4 September 2018
PaperVision3D is a toolkit for creating 3D objects and animations in flash. It is available here.
Unfortunately, PaperVision, like many flash libraries, assumes that it can install listeners on the stage. In Whirled, nothing can do that because every piece of media is loaded into a security boundary.
Luckily, it's easy to patch PaperVision.
In Viewport3D, find the place where it's adding a listener to the stage:
protected function onAddedToStage(event:Event):void
{
stage.addEventListener(Event.RESIZE, onStageResize);
onStageResize();
}
And change this to:
protected function onAddedToStage(event:Event):void
{
try {
stage.addEventListener(Event.RESIZE, onStageResize);
} catch (err :Error) {
}
onStageResize();
}
This means that you can't make use of the autoScaleToStage feature.
See Also
- QuakeMix 3D - a remixable avatar framework using PaperVision