Converted CS3 project to CS5, and now I get a cannot find GraphicsPath compile error
I have converted my CS3 project to CS5, and when I compile, I receive the following errors
1046: Type was not found or was not a compile-time constant: GraphicsPath. 1046: Type was not found or was not a compile-time constant: IGraphicsData.
It doesn't point to any specific code anywhere, which made me think that it was a library entity that was causing the issue. However, when I copy over the entire library to a new FLA, it compiles fine (though wit开发者_JAVA技巧h not content obviously)
I have a couple locations in code where I do some bitmap data and sprite graphics drawing by code, which I thought may be the issue. I commented these sections out and made sure to comment out the relevant includes as well, however this had no effect on the issue.
The flash dev center doesn't have much information on what these entities are, other than base graphics classes used when doing things like fill and gradients. It also says nothing about their inter-compatibility between CS3 and CS5.
Has anyone had a similar issue?
Thanks for your time.
did you forget to import those classes?
import flash.display.GraphicsPath;
import flash.display.IGraphicsData;
The solution was to target Flash V10.1. When you let CS5 convert a project from CS3 to CS5, it must replace the movieclip entities in the library with CS3 instances which require CS5 base classed (like IGraphicsData). But the upconversion does not change the target Flash version., which causes the issue since Flash 9 does not have IGraphicsPath.
So the solution is to target 10.1 if you have upconverted your CS3 project to a CS5 project and are seeing the above error.
Thanks to TheDarkIn1978 for the answer.
精彩评论