Flash Player 10.1 for Flash Professional CS4 playerglobal.swc

actionscript-3flash

Adobe released projector, debugger and plugin for Flash 10.1 yesterday. on my Mac i've installed the standalone player and debugger in Adobe Flash CS4/Players/ and Adobe Flash CS4/Players/Debug respectively.

however, i think i need to download the globalplayer.swc for 10.1 so that Flash CS4 IDE is directed to use the new players.

i've searched but i could only find the globalplayer.swc that was released during the 10.1 betas, and i'm not sure if that's the .swc i should use for the final 10.1 release.

Adobe's site doesn't mention anything about replacing the .swc to use 10.1 in CS4, so i'm not sure if it's necessary.

i've tried creating actionscripts to include flash.ui.Multitouch and flashx.textLayout and neither can be found. i have no idea how to make Flash Professional CS4 use the new APIs available in Flash Player 10.1

suggestions?


FRAME SCRIPT:

import flash.ui.Multitouch;

var myTextField:TextField = new TextField();
myTextField.width = 200;

addEventListener(Event.ENTER_FRAME, enterhandler);

function enterhandler(e:Event):void
    {
    var support:Boolean = Multitouch.supportsTouchEvents;
    switch  (support)
            { 
            case true:  myTextField.text = "Touch events supported"; 
                        break; 

            case false: myTextField.text = "Touch events not supported"; 
                        break; 

            default:    myTextField.text = "unknown"; 
            }

    addChild(myTextField);
    }

ERROR: (continuous enter frame event error)

ReferenceError: Error #1065: Variable flash.ui::Multitouch is not defined.
    at multitouchtest_fla::MainTimeline/enterhandler()
ReferenceError: Error #1065: Variable flash.ui::Multitouch is not defined.
    at multitouchtest_fla::MainTimeline/enterhandler()
ReferenceError: Error #1065: Variable flash.ui::Multitouch is not defined.
    at multitouchtest_fla::MainTimeline/enterhandler()

Best Answer

You can get the official playerglobal.swc for Flash Player 10.1 from the Flex 4.1 SDK:
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

It's in the frameworks/libs/player/10.1 directory.

Also you can check if the device supports gestures and touch using these statics:
Multitouch.supportsGestureEvents
Multitouch.supportsTouchEvents

Related Topic