sahnemuh
Threadersteller
Dabei seit: 19.06.2003
Ort: /dev/null
Alter: 42
Geschlecht:
|
Verfasst Mi 18.02.2009 16:34
Titel [solved] Papervision3D - Klassen werden nicht geladen |
|
|
€: Hat sich erledigt.
Ich hab mir nun einfach FlashDevelop und das Flex SDK gesaugt und machs ohne Die Flash IDE nach diesem Tutorial...
Aloha.
Ich mal wieder mit einem Flash Problem...
Ich würde ganz gerne mit Papervision3D eine Matrix erstellen, auf der ich verschiedene Punkte im Raum positionieren kann.
Ich habe dazu einige Beispiele gefunden, mir den neusten Stand von PV3D aus dem Google Code Subversion Repository geholt, wie beschrieben in Voreinstellungen / Actionscript / Actionscript 3 Einstellungen den Pfad zur AS3 Source ange- und eine Dokumentenklasse vergeben. Alles nach dieser Anleitung:
Zitat: | 1. Download and install a SVN client. On this case, tortoise for windows ( http://tortoisesvn.tigris.org/ ) . Then create an empty folder, right click on it and choose "SVN checkout"
2. Paste this address on the URL box and press OK
3. http://papervision3d.googlecode.com/svn/trunk/
4. Finish download. Now it's time to set up Papervision3D.
5. Open Flash CS3 and click Edit>Preferences>Actionscript and click the button "Actionscript 3.0 settings"
6. On the box named "class path", click the plus sign and then the (sniper like) target icon
7. Navigate to the folder you downloaded Papervision3D files and then to as3/trunk/src
8. Click OK and open a new or existing Flash file. Be sure there is nothing selected and click the property panel
9. In this example we will be building a simple plane rotating, but feel free to choose other examples from the examples page. On the box named "document class" write "ExampleTransformationRotate" (no quotes, no ".as" extension)
10. Save the document somewhere you can find, but outside any of the Papervision3D folders.
11. reate a new file, choose "Actionscript file" instead of "Flash file". Name it ExampleTransformationRotate.as (note the extension .as ) and save it on the same folder as your Flash file.
12. Go back to the Flash file. Now clicking on the pencil, on the property panel beside "document class" should take you to the new .as file you just created.
13. Paste this code on the Actionscript file, save it, and test the movie.
14. It should be working! If not refer to the forums, if it does, try other examples and good luck. |
So weit so gut. Das Problem ist: Die PV3D Klassen werden allem Anschein nach trotzdem nicht geladen (Siehe Screenshot).
Ich habe auch bereits versucht den Klassenpfad nur für den Film anzugeben - allerdings führte das auch zu nichts.
Hatte jemand mal ein ähnliches Problem (und wenn ja: wie habt ihr es lösen können)?
Danke schonmal im Vorraus!
€: Ach ja: ich verwende folgendes Beispielscript (gabs auch bei PV3D bei Google Code):
Code: | /*
* Copyright 2007 (c) Andre Stubbe, http://www.andrestubbe.com
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package
{
import flash.display.Sprite;
import flash.events.Event;
import org.papervision3d.cameras.Camera3D;
import org.papervision3d.objects.Plane;
import org.papervision3d.materials.ColorMaterial;
import org.papervision3d.scenes.MovieScene3D;
[SWF(width='400',height='400',backgroundColor='0x000000',frameRate='30')]
public class ExampleTransformationRotate extends Sprite
{
private var container: Sprite;
private var scene: MovieScene3D;
private var camera: Camera3D;
private var plane:Plane;
public function ExampleTransformationRotate()
{
container = new Sprite;
container.x = 200;
container.y = 200;
addChild( container );
scene = new MovieScene3D( container );
camera = new Camera3D();
camera.z = -500;
camera.zoom = 5;
// create red material
var material:ColorMaterial = new ColorMaterial();
material.doubleSided = true;
material.fillColor = 0xFF0000;
material.fillAlpha = 1.0;
// create a plane
plane = new Plane( material, 128, 128, 1, 1 );
// register plane
scene.addChild( plane );
stage.addEventListener( Event.ENTER_FRAME, onEnterFrame );
}
private function onEnterFrame( event: Event ): void
{
// rotate the plane
plane.rotationX += 4.35;
plane.rotationY += 6.55;
plane.rotationZ += 0.55;
// render the scene
scene.renderCamera( camera );
}
}
}
|
Zuletzt bearbeitet von sahnemuh am Mi 18.02.2009 18:21, insgesamt 5-mal bearbeitet
|
|