I'm writing an universal graphics engine that will work on FP11 using molehill advantage and also works in FP10 using old software blitting.
So, I'm woundering what is the best way to achive this?
First I thought that if I will compile swf for FP11 and will not use new classes if the version of player is not 11, everything will work fine. But I was wrong. To my surprise I'm getting "VerifyError: Error #1014. Couln't find class flash.display3D::Context3D" error if I run code with imported FP11 libraries even if they are not called.
I thought FP will throw this message only when I will try to access an absent class, but that is not right. It throws error just when I'm trying to run .swf
So, is there any way to do it? I thought of loading different SWFs depending on the version using preloader, but maintaining and compiling 2 different SWFs is quite confusing.
Are there any other ways?
flash apis are not forward compatible. if you want a flash 11 api, you need to make a flash 11+ swf. the reason for this is that a swf 10 could happily create it's own Stage3D class. if it suddenly would conflict with the built in class in swf 11 this would break backwards compatibility. so you can have only one, backward or forward compatibility.