Alright, so I'm branching off a bit from Lee Brimlow's tutorial on Creating Custom Flash Panels, and I'm trying to have it set the default stroke and fill colours as well. Here is the code I was trying to use:
var jsfl:String = "var doc:document = fl.getDocumentDOM();var fill:fill = doc.getCustomFill('toolbar');fill.style = 'solid';fill.color = 0x" + colour.toString(16) + ";doc.setCustomFill(fill);";
MMExecute(jsfl)
But I keep getting the following error:
The following JavaScript error(s) occurred:
SyntaxError: missing ; before statement
I then decided to see if it was the fault of my colour (which is a uint, holding the hex value of the colour) variable, so I set it to this:
var jsfl:String = "var doc:document = fl.getDocumentDOM();var fill:fill = doc.getCustomFill('toolbar');fill.style = 'solid';fill.color = 0x000000;doc.setCustomFill(fill);";
MMExecute(jsfl)
And still got the same error! What am I doing wrong?




Reply With Quote