Im creating a button in Folder Level Script, first im importing an icon into the document, no errors are thrown
so i assume the icon is imported i even printed the icons object out and saw that that icon was imported successfully!
heres a snippet of my code!
var edtBtn = aNewDoc.addField("edtBtn" + i, "button", 0, [20, 20, 600, 20]);
console.println("Icon imported: " + timgQ5); // timgQ5 = desination to my png
var q5img = util.iconStreamFromIcon(aNewDoc.getIcon("Q5img"));
console.println("Icon added to button!");
Don't forget to set the buttonPosition propery (BEFORE setting the icon).
Another thing: you're trying to set an IconStream object, but you need to use an Icon object instead.