I'm trying to get the first object from the list without using the for...eachin loop but I'm having trouble because it can't convert from object to type Image.
Image is an object so it should work.
Local current:TLink = ImageList.FirstLink() Local myImage:Image = Image(current._value)
Image is an object so it should work.
Global ImageList:TList = New TList Type Image Global ImageListCount:Int =0 Field xpos,ypos:Int Field _image:TImage Field AlphaLevel:Float Field Scale:Float 'instantiate and each object to List Function Create:Image(strPath:String,startXpos:Int,startYpos:Int,imgAlpha:Float,imgScale:Float) Local img:Image = New Image img._image = LoadImage(strPath) ImageListCount:+1 img.xpos = startXpos img.ypos = startYpos img.AlphaLevel = imgAlpha img.Scale = imgScale ListAddLast ImageList, img End Function Method Render() Local current:TLink = ImageList.FirstLink() Local myImage:Image = Image(current._value) MidHandleImage myImage._image SetScale Scale,Scale SetAlpha AlphaLevel DrawImage myImage._image, (myImage.xpos), myImage.ypos Update(myImage) End Method End Type