I'm working on an extension for Flash and I'm looking for a way to test whether or not the toolbar stroke is filled with something (whether a solid colour or a gradient). All my attempts have led to several JS errors when I test them. I got the following code to successfully test for the fill colour:
But as I said, stroke eludes me. The error occurs when calling for the shapeFill property when the toolbar stroke has nothing set (represented by white with a red line diagonally through it. I don't know the technical name for that...), which, as far as I know, is the only way to find this sort of thing out. Even:Code:var nullOrNot:String = MMExecute("fl.getDocumentDOM().getCustomFill(\"toolbar\").color == null") if (nullOrNot == "true") { // actions }
Throws an error and doesn't trace out anything. Shouldn't it at least return null (which would be good because I could test for that, but noooo...)?Code:MMExecute("fl.trace(fl.getDocumentDOM().getCustomStroke(\"toolbar\").shapeFill.t oString())")
Thanks in advance.




Reply With Quote
