Make your sites multitouch enabled with TouchGateway!

I mentioned to the guys over at the nuigroup.com forums that I would release my AS3 binary TUIO socket class this weekend…

Download TouchGateway Wrapper Beta 1

… and here it is, included is everything you need to get started, 2 flex builder projects (pure as3) one is the source to the Debug Grid I posted a while ago, and the other one is a wrapper which handles the java applet loading and manages placeholders, which generally makes things much easier to use.

Essentialy all you need to do is put the TouchGatewayWrapper on your page, and set a couple of properties that point to your multitouch application swf file.

<param name=”movie” value=”TouchGatewayWrapper.swf?placeholder=DebugGrid.png&movie=DebugGrid.swf” />

<param name=”allowScriptAccess” value=”sameDomain” />

<param name=”allowFullScreen” value=”True” />

<param name=”menu” value=”true” />

as you can see here I am setting placeholder to a png file that is in the same folder as the touchgatewaywrapper and the movie to the DebugGrid using a simple query string format. Also make sure you have allowScriptAccess, allowFullscreen and menu all enabled too :)

I would have liked to get some better examples included with this, but I had to work over the weekend on short notice and I hate to disappoint, so I have released it as it is for the moment. More examples will come soon.

13 Responses to “Make your sites multitouch enabled with TouchGateway!”

  1. Awesome awesome awesome. Thanks man.

  2. Pleh says:

    Your welcome :) let me know how you get on.

  3. Chris Yanc says:

    Fantastic work! I was playing around with the files, but I don’t have Flex, only Flash. But I think I got it working with a few of the experiments I’ve been doing. Check these out:

    http://www.cyancdesign.com/TouchGateWay/CatsCradle.html

    http://www.cyancdesign.com/TouchGateWay/TouchGatewayWrapper.html

    I still need to put proper holding images on them. And it can be a little finicky at times, but it’s a start. Can seem to get it to stretch when switching to fulscreen mode.
    (^_^)//

  4. Pleh says:

    Hi Chris,

    Nice work, thanks for posting your experiments :)

    To get it to resize correctly you need to add a stage.resize handler unfortunately you don’t have access to the stage in the constructor of your application because it is being loaded into another swf, to get arround this you can add an event listener in the constructor for the ADDED_TO_STAGE event
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/Event.html#ADDED_TO_STAGE
    and then in that event handler, add another event handler for the stage’s RESIZE event and in that handler you can do your resize code.

    Alternatively, you can add an event listener to the current movieclip’s RESIZE event which I am raising from the TouchGatewayWrapper to make things easier. But this means that this event wont fire if you are running the app localy (not within the wrapper). So to get around this, do something similar to the DebugGrid example, like this…

    In the Constructor…
    if(stage){
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.addEventListener(Event.RESIZE, onResize);
    } else {
    this.addEventListener(Event.RESIZE, onResize);
    }

    Then have an onResize method…
    public function onResize(e:Event=null):void {
    if(stage){
    //Resize code goes here(stage.stageWidth,stage.stageHeight);
    } else {
    /Resize code goes here(this.width,this.height);
    }
    }

    Hope that helps :)

  5. Eightlines says:

    I can’t seem to get this working. Attempting to use the application through the website and on a localhost server to no avail. It just says Waiting for TouchGateway and stalls. Mac OS X 10.5 FF3.5. Any ideas? Anything else I need to install?

  6. Pleh says:

    What TUIO provider are you using? If its the latest version of CCV (tbeta) then you need to make sure you have ticked send TUIO and not Send to Flash. Also you need to make sure you have Java installed.

  7. Kylie Batt says:

    Идея отличная, согласен с Вами….

    специалист … and here it is, included is everything you need to get started, 2 flex builder projects (pure as3) one is the source to the Debug Grid I posted a […….

  8. Kylie Batt says:

    Ни в коем случае…

    Переводчик I mentioned to the guys over at the nuigroup…..

  9. Elektromaster-628…

    Замечательный сайт на PHP по технике http://white-tech.ru/ на уровне профи…

  10. Kylie Batt1 says:

    Ох уж эти славянки!…

    http://rel” rel=”nofollow”> специалист по СМИ … and here it is, included is everything you need to get started, 2 flex builder projects (pure as3) one is the source to the Debug Grid I posted a […….

  11. ARTURO says:


    Pillspot.org. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. Low price pills. Order drugs online

    Buy:Super Active ED Pack.Viagra Super Active+.Cialis.Cialis Professional.Zithromax.Cialis Super Active+.Tramadol.Cialis Soft Tabs.Viagra Soft Tabs.Maxaman.VPXL.Viagra.Propecia.Levitra.Viagra Super Force.Viagra Professional.Soma….

  12. KARL says:


    PillSpot.org. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. High quality pills. Buy pills online

    Buy:Amoxicillin.Wellbutrin SR.Zetia.Seroquel.Lasix.Advair.SleepWell.Lipothin.Female Pink Viagra.Cozaar.Buspar.Aricept.Ventolin.Lipitor.Zocor.Acomplia.Benicar.Nymphomax.Prozac.Female Cialis….

  13. KEITH says:


    Medicamentspot.com. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. Low price drugs. Order drugs online

    Buy:Viagra Super Force.Viagra.Propecia.Maxaman.Cialis.Tramadol.Levitra.Cialis Super Active+.Super Active ED Pack.Viagra Super Active+.Cialis Professional.Viagra Soft Tabs.Zithromax.VPXL.Soma.Cialis Soft Tabs.Viagra Professional….

Leave a Reply