0
votes

So how I do that - couldn't find any info on adobe's site.. Thanks

Update: Here is what I've done:

  • downloaded playerglobal11_2.swc from Adobe
  • created folder Adobe/Adobe Flash CS5.5/Common/Configuration/Players/FP11.2, renamed the downloaded swc to playerglobal.swc and put it inside that folder
  • inside Adobe/Adobe Flash CS5.5/Common/Configuration/Players duplicated FlashPlayer10_2.xml, called it FlashPlayer11_2.xml and edited following lines

    <player id="FlashPlayer11.2" version="13" asversion="3">
    <name>Flash Player 11.2</name>
    <playerDefinitionPath as2="$(UserConfig)/Classes/FP10;$(UserConfig)/Classes/FP9;$(UserConfig)/Classes/FP8;$(UserConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/FP11.2/playerglobal.swc" />
    

Now when I start flash I can choose to publish to Flash Player 11.2 from drop down menu, when I publish it (ctrl+F12) in browser with this code on first keyframe:

import flash.display.Stage3D;

var stage3d = new Stage3D();   

var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFF0000;
my_fmt.size = 32;
my_fmt.bold = true;
my_fmt.font  = "Arial";

var textF: TextField = new TextField;
textF.defaultTextFormat = my_fmt;
textF.autoSize = TextFieldAutoSize.LEFT;
textF.text = "Hello Flash Player: " + Capabilities.version + "\n" + stage3d;

addChild(textF);

I get this error in debugger:

ArgumentError: Error #2012: Stage3D$ class cannot be instantiated.

Obviously I missed something or done wrong, because I can't access FP11 API.

4
hey when you work it out i want to know iv been at this for a week also tried other 3d engines, Away3d-4.0 / Alternativa 8 and i cant either one started, i did all the above steps as what is written all over the net but no results.joshua

4 Answers

2
votes

I've just ran into the same problem. I realize that the error #2012 is a runtime error, so it means compilation was ok and therefore your setup should be working. The problem lies in the player side of things. Here's how I solved it:

  1. Make sure you update your flash players from here. If your web browsers already have the updated version, test in your web browser using Ctrl+F12. Otherwise, you need to update your flash debug player: http://www.adobe.com/support/flashplayer/downloads.html

  2. The code given is no longer valid. The Stage3D reference must be retrieved from the stage.

    var stage3d = stage.stage3Ds[0];
    
  3. For debugging purposes, you can try this code instead, which will print the version and error message if there are problems.

    import flash.display.Stage3D;
    
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.color = 0xFF0000;
    my_fmt.size = 32;
    my_fmt.bold = true;
    my_fmt.font  = "Arial";
    
    var textF: TextField = new TextField;
    textF.defaultTextFormat = my_fmt;
    textF.autoSize = TextFieldAutoSize.LEFT;  
    textF.width = this.stage.stageWidth;
    textF.wordWrap = true;
    textF.multiline = true;
    addChild(textF);
    
    
    try
    {
        var stage3d:Stage3D = stage.stage3Ds[0];
        textF.text = "Hello Flash Player: " + Capabilities.version + "\n" + stage3d;
    }
    catch(e:Error)
    {
        textF.text = "Hello Flash Player: " + Capabilities.version + "\n" + e.toString();
    }
    
1
votes

Once you install the .mxp located there, you'll be able to publish as FP11:

enter image description here

And finally be able to make use of impressive libraries like Starling.

1
votes

You might need to set version="15" (as opposed to version="13") in the FlashPlayer11_2.xml file.

<player id="FlashPlayer11.2" version="15" asversion="3">