Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7765979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:17:59+00:00 2026-06-01T15:17:59+00:00

I created a rotating cube using the below code and add bitmaps as sides

  • 0

I created a rotating cube using the below code and add bitmaps as sides of the cube.
I was wondering if it’s possibly to assign movie clips as sides of the cube so I can have some interaction with them.

    import flash.events.Event;
    import flash.display.Bitmap;
    import flash.display.BitmapData;

    import org.papervision3d.cameras.CameraType;
    import org.papervision3d.materials.BitmapMaterial;
    import org.papervision3d.materials.ColorMaterial;
    import org.papervision3d.materials.WireframeMaterial;
    import org.papervision3d.materials.utils.MaterialsList;
    import org.papervision3d.objects.primitives.Cube;
    import org.papervision3d.view.BasicView;

            var cube : Cube;                    
            var basicview : BasicView = new BasicView(640, 480, true, false, CameraType.FREE); 
            addChild(basicview);
            var logo : Logo = new Logo( 0,0); //Bitmapdata (jpeg) exported as class Logo from library   
            var matFront : BitmapMaterial = new BitmapMaterial(logo);
            var matBack : BitmapMaterial = new BitmapMaterial(logo); 

            var ml : MaterialsList = new MaterialsList(); 

            ml.addMaterial(matFront, "front"); 
            ml.addMaterial(matBack, "back"); 
            ml.addMaterial(new ColorMaterial(0x551F92),"right"); 
            ml.addMaterial(new ColorMaterial(0x431872),"bottom"); 
            ml.addMaterial(new ColorMaterial(0x341359),"top"); 
            ml.addMaterial(new ColorMaterial(0x7429C7),"left"); 

            cube = new Cube(ml,200,200,200,5,5,5); 

            basicview.scene.addChild(cube); 
            basicview.camera.fov = 20;          

            addEventListener(Event.ENTER_FRAME, enterFrame);                
            function enterFrame(e:Event) : void
            {
                cube.yaw((320-mouseX)*0.01); 
                cube.pitch((240-mouseY)*0.01); 
            }
            basicview.singleRender(); 
        }

UPDATE

I add this

var matFront : MovieMaterial = new MovieMaterial(new MV(),false,true);
matFront.interactive = true ;

MV is just a square with this code

package Scripts {

    import flash.display.MovieClip;
    import flash.events.*;

    public class MV extends MovieClip
    {
        public function MV( ) 
        {
            buttonMode = true;
            addEventListener(MouseEvent.CLICK,traceFunction);
        }
        private function traceFunction(ev:MouseEvent) {
            trace("clicked");
        }
    }
}

Why I have not any interaction when I click the side with the movie clip?

UPDATE 2

Ok I find it
I had to add this line

basicview.viewport.interactive = true;

But why I have interaction even when the side of the movieclip isn’t visible.

How can I avoid it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:18:00+00:00Added an answer on June 1, 2026 at 3:18 pm

    Yes it is possible, you have to create Materials from the MovieClips you want to use, to do just that take a look at the classes MovieMaterial and MovieAssetMaterial inside the papervision3d materials Package.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a rotating CUBE with the help of OPENGL in Android now
I created this page for better understanding the question. As you can see using
I've created a scene with a rotating cube in Java/lwjgl. If I enable lighting,
I have created a collision class to detect collisions using pixels. In my class
I created a simple rotating banner for a website I created http://sandbox.worldwatchlist.us . Everything
I'm using Dark GDK and C++ to create a simple 2d game. I'm rotating
I have created a rotating banner script for a new site I'm developing View
I have been trying to create rotating object using jQuery and without any other
Background: I am trying to animate a rotating 3D scatter plot using R's lattice::cloud()
I've created a configuration profile using the iPhone Configuration Utility which I've placed on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.