Do sa versions of flash runtime not have all the classes of the normal runtime?

I have an swf published to flash 15 that I want to run using “flashplayer_15_sa_debug.exe”, NOT the default player on my machine, but when I drag the swf over flashplayer_15_sa_debug.exe to run it, I get this error

ReferenceError: Error #1069: Property readGraphicsData not found on flash.display.Graphics and there is no default value.

readGraphicsData has been around since flash 11, so I am at a loss. I thought sa projector runtimes were supposed to have all the classes that the normal runtimes do…so is it really missing from that runtime or am I missing some other vital piece of information?

I’m pretty sure that the standalone player should have that method, although @senocular might have a more authoritative answer.

One thing that’ll influence API visibility is the SWF version. So a SWF published with API level 10 won’t be able to see newer stuff. I’d double check the version of Flash you’re publishing for.

l’m a little confused because if I was using readGraphicsData and trying to publish to swf version 10 or earlier, there is no way it would even compile, right? It is a pure actionscript compiled with flex sdk 4.6 via command line, and if I do -target-player=10 or earlier, compile fails “possibly undefined method readGraphicsData”, but to later versions it compiles fine. I have tried targeting 11.9,12,and 15. Each time it compiles, but then can’t find readGraphicsData when I try to run with the flashplayer_15_sa_debug.exe. Does it sound like I am missing something that I need to do here?

It sounds like it should work. There are some features that may or may not exist depending on the player, but readGraphicsData is a core API that, as far as I know, should be everywhere (and you can thank me for pushing that API through :wink: ). My first guess was that maybe the file name for your debug exe is misleading that that’s not actually flash 15? A long shot, but you can try internally checking the player version (might as well throw the swf version in there too) programmatically with ActionScript.

I did a big tut on Flash/AS versions, but I don’t think it adds anything new to what we’ve already talked about here. Its a little older too, but I don’t think much has changed.

So, I made this simple test class,

import flash.display.;
import flash.text.
import flash.system.Capabilities;
public class main extends Sprite

    public function main()
       var t:TextField = new TextField();
       t.autoSize = TextFieldAutoSize.LEFT;  
       t.appendText("flash version:" + String(Capabilities.version));
      // t.appendText(" A flash 12 function:"+String(stage.stage3Ds[0].requestContext3DMatchingProfiles))
       var s :Shape = new Shape();, 0x000000);, 0, 50);
       var gd:Vector.<IGraphicsData> =;
       t.appendText(" IGraphicsData:" + String(gd));


and compiled with flex_sdk_4.6\bin\mxmlc.exe using options

-compiler.verbose-stacktraces -compiler.strict=true -debug=true -output=“main.swf” -target-player=15.1 -static-link-runtime-shared-libraries=true

and dragged the resuling swf over flashplayer_15_sa_debug.exe, which opens a flash window that says “Adobe Flash Player 15” at the top, gives the same old error message, and the textfield has the text “flash version:WIN 15,0,0,189”

Notice in the class I posted there is also some commented out code t.appendText(" A flash 12 function:"+String(stage.stage3Ds[0].requestContext3DMatchingProfiles)). If I uncomment that line then I get an error saying

ReferenceError: Error #1069: Property requestContext3DMatchingProfiles not found on flash.display.Stage3D and there is no default value.

I did that just to check if the problem was specific to readGraphicsData or not.

Still at a loss as to what could be wrong, but think it has something to do with my compiling. It is not urgent luckily though, as this is just for a personal project I’m playing with. I’ll try compiling with the flash IDE on a work computer when I get home (currently on the road with only a personal laptop, which only has cs4 and flex) to see if that resolves the problem.

Just letting everyone know that the problem was that flex simply does not work with anything above flash 11. From the flex release notes at Support options for free and discontinued Adobe products

We strongly suggest you DO NOT overlay different AIR, AIR SDK or Flash Player versions into Flex 4.6 SDK or Flash Builder 4.6. Development, debugging and deployment workflows are only certified with the AIR and Flash Player versions packaged within the products.

I was compiling against newer versions of flashplayer global, which at the time seemed to be working fine when I was just using classes available to flash 11, but as it turns out, was not actually making newer classes and functions available. Oh well!

1 Like

I suspect that’s because Flex 4.6 didn’t know what to do with your -target-player=15.1 argument. As excellently described by @senocular’s Flash versions tutorial, there are a bunch of different version numbers when it comes to Flash. Features are gated by SWF version, and there’s no way that Flex 4.6, created before Flash 15.1, would know how to map the SWF version that Flash Player 15.1 uses onto the SWF version that it needs to output.

I didn’t link to it in my earlier suggestion, but you can determine a SWF’s SWF version using a tool like this one. My guess is that if you use a Flash Player version that Flex doesn’t know about, it defaults to something like Flash 9. Maybe not, but I think that the SWF version is the only thing used to gate core Flash Player features.

Anyway, thanks for updating us on the situation.