/ Published in: ActionScript 3
URL: http://blog.alptugan.com/?p=380
1067: Implicit coercion of a value of type AS3.vec:Vector.<com.Gallery:VOItem> to an unrelated type AS3.vec:Vector.
Expand |
Embed | Plain Text
public function getMainItems():Vector.<VOItem> { //Length of Main items MainItemLn = xml.item.length(); //Vector class of MainItems var MainVO:Vector = new Vector.<VOItem>(MainItemLn,true); for(var i:int = 0; i < MainItemLn; ++i) { MainVO[i] = new VOItem(); MainVO[i].id = i; MainVO[i].title = xml.item[i].@title; MainVO[i].img = xml.item[i].@img; } return MainVO } trace(getMainItems()[0].title); //or trace(getMainItems()[1].title); //and so on.. . . .
You need to login to post a comment.
