OK, I researched this a bit, which leads me to a feature request. The problem: If I want to use an SVG as a library asset for SWF9, I have to create classes not just for the asset, but for each of it's descendants. For example, if the SVG consists of a group Foo that contains another group Bar, which itself contains a group Baz, I have to declare classes for each of them. Not just that, class Bar must have a property Baz, and Foo must have a property Bar. Plus, if it's haXe, all the group names must be capitalized (because haXe rightfully enforces capitalized class names).
My idea to deal with this by rather inelegantly applying 'grep -v id' on my SVG file (and manually naming the main group) unfortunately made it invisible. The MovieClip hierarchy seems to be intact, though -- I can cast children of the main group to MovieClip and traverse deeper down the tree. It's just not visible. I guess that can be partially dealt with by writing a tool that creates the necessary class files with the child clips as properties, but it would be cool if Swfmill could, at least optionally, take care of the capitalization of the group IDs. Also, it would remove clutter in the code if it could turn generic paths (i.e., "path2345") into shapes instead of symbols (so that they don't require a class). A huge load of sugar on the top would be if it could (optionally) calculate the bounding rectangles and position the symbols, even if the group is positioned at 0,0 with the visible part being somewhere else (or does it even do that already? I didn't manage to display anything yet, so I don't know). Maybe I'm just doing something wrong, I don't know. Mark On 7/7/07, Mark Winterhalder <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to use an SVG file as a library item for a haXe generated > v9 SWF, as described at <http://haxe.org/tutos/flash9>. However, when > I place the asset on the stage, the Flashplayer gives me a > "ReferenceError: Error #1065: Variable foo is not defined", where foo > is every single sub-clip of the asset. I have defined all of them as > of type MovieClip in the class, but no luck. > > Does anybody have an idea how to use SWFs with child clips for FP9? > > Thanks, > Mark > _______________________________________________ swfmill mailing list [email protected] http://osflash.org/mailman/listinfo/swfmill_osflash.org
