PDA

View Full Version : scrollpane 2 images


jagguy
09-11-2006, 07:58 AM
//where are the scrollbars?

import flash.display.BitmapData;
import mx.containers.ScrollPane;


var bmp1:BitmapData = BitmapData.loadBitmap("cave1");
var bmp2:BitmapData = BitmapData.loadBitmap("rock1");
var bmp2:BitmapData = BitmapData.loadBitmap("image1");
var my_sp:mx.containers.ScrollPane;

this.createClassObject(mx.containers.ScrollPane, "sp", this.getNextHighestDepth());
sp.setSize(300, 100);

sp.createEmptyMovieClip("mc7", sp.getNextHighestDepth());
sp.mc7.createEmptyMovieClip("mc77", sp.mc7.getNextHighestDepth());
sp.mc7.mc77.attachBitmap(bmp1, sp.mc7.mc77.getNextHighestDepth());
sp.mc7.mc77._x=400;
//mc7.mc77._y=250;

sp.createEmptyMovieClip("mc8", sp.getNextHighestDepth());
sp.mc8.createEmptyMovieClip("mc88", sp.mc8.getNextHighestDepth());
sp.mc8.mc88.attachBitmap(bmp1, sp.mc8.mc88.getNextHighestDepth());
sp.mc8.mc88._x=0;


sp.vScrollPolicy = "on";

sleekdigital
09-12-2006, 12:47 AM
You are not using the scrollpane correctly to begin with. Although components are based on MovieClip, you should not treat them as such. Instead use the API that is documented for the V2 Component architecture and for the specific component.

For your specific purposes you will want to understand the contentPath and content properties. Also, this might be helpful to you...

http://www.sleekdigital.com/News/11.aspx