|
From: Raymond I. <xw...@ya...> - 2003-07-30 15:38:38
|
Hi Jesse,
Here's a layout for the progress bar:
function ProgressBar(x,y,w,h,value,max){
this.DynLayer = DynLayer;
this.DynLayer(null,x,y,w,h,this.backCol);
this._min = 0;
this._max = max||100;
this._value = value||0;
this.addChild(new DynLayer(),'lyrBar');
this.lyrBar.setBgColor(this.barCol);
this.lyrBar.setAnchor({left:1,top:1,bottom:1});
};
var p = dynapi.setPrototype('ProgressBar','DynLayer');
// Design Settings
p.backCol = '#000000';
p.barCol = '#0000FF';
// Functions & Poperties
p.setValue = function(n){
var p = (this._value/this._max)*100;
var w=(this.getWidth()-2) * (p/100);
this.lyrBar.setWidth(w);
};
p.setMax = function(n){
this._max = n||100;
};
You can add this layout as you see it fit.
--
Raymond Irving
--- Jesse Vitrone <je...@6t...> wrote:
> I hate to be a pain, but I'm going to ask again.
> When you say "create the progress bar as a standard
> widget"
>
> What does that mean?
>
> Just "creates an object that has a layer and has
> some functions that
> change it"
> or does it mean that you have to inherit from a
> certain class and
> initialize certain things and do things a certain
> way?
>
> Thanks,
> Jesse
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|