# Scripting 3D cube image

**URL:** <https://forum.kirupa.com/t/scripting-3d-cube-image/266697>\
**Category:** flash\
**Created:** [July 23, 2008, 3:43pm UTC](https://forum.kirupa.com/t/scripting-3d-cube-image/266697 "2008-07-23T15:43:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vansteelandt](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vansteelandt](https://forum.kirupa.com/u/vansteelandt)\
**Post date:** [July 23, 2008, 3:43pm UTC](https://forum.kirupa.com/t/scripting-3d-cube-image/266697/1 "2008-07-23T15:43:35Z")

</div>

Hi

I have a question regarding the tutorial about scripting 3D in flash, with the cube.  
Been trying put an image on each side of the cube, however with no succes.  
I use BitmapData to draw the image.  
Here’s my code:

```auto

drawFilledSquare = function(a,b,c,d){
	this.clear();
	this.lineStyle(0,0,0);
	if (isVisibleBetween(a,b,c)){
		var fill:BitmapData = BitmapData.loadBitmap("dardar");
		this.beginBitmapFill(fill);
		this.moveTo(a.x, a.y);
		this.lineTo(b.x, b.y);
		this.lineTo(c.x, c.y);
		this.lineTo(d.x, d.y);
		this.lineTo(a.x, a.y);
		this.endFill();
	}
};

```

I’m a newbie in Flash, but have some programming experience in java, .net, php,… but not actionscript.  
Maybe it just isn’t possible?  
Someone who wants to help me?

thx!
