Using AS3 in PHP maybe? something, anything?

I've posted about this earlier but still haven't figured out the best way to do this and i really need to figure it out now
My users create stuff on a stage. i save the changes they make on the server. what i need is a script that automatically creates a jpeg using the changes submitted by the user (this way the user doesnt have to send large image files to the server, just the small list of changes). i will then display the image of the stage to the user.
what would be perfect is being able to use php to call in a movieclip, add the changed paramaters, create the image - all on the server. Can some one point me in the right direction? does AMFPHP allow this sort of stuff? some sort of AIR application that monitors when users submit data?
Thank you so much, this has me a bit stumped and i want to make the process as efficient as possible!

About ten years ago I did something similar to this using Director. I was building a series of coloring pages on the web that were turned into web cards. At the time, Director couldn't export a bitmap graphic from the web. Director could, however, edit a text file that was sitting on a server. So I took all of the data and wrote it to the text file, one line per card. I then had another copy of Director running on a computer that would download the text file, erase the content, and then use the downloaded text to recreate the user's web cards, give them unique names, upload them to a server, and write an email to each card recipient.
You should be able to do the same thing in Flash, using a php file to write out the data, and use that data to recreate the user's work. The potential points of failure are much higher using a php script than you would have by simply uploading the graphic that the user creates.

Similar Messages

  • Highscore list using Flash and PHP

    Hi,
    I want to make a highscorelist using AS3 and PHP(MySQL).
    I cant find a good tutorial on internet how to make something like that but I got this so far:
    import fl.controls.TextInput;
    import fl.controls.TextArea;
    var variables:URLVariables = new URLVariables();
    variables.name = "Wil";
    variables.final = 2000;
    var request:URLRequest = new URLRequest();
    ////insert in the location of the php script ////////////////
    request.url = "http://www.justenter.nl/script.php";
    request.data = variables;
    var loader:URLLoader = new URLLoader();
    loader.load(request); //sends the request
    //when the request is done loading, it goes to the completeWriting function
    loader.addEventListener(Event.COMPLETE, completeWriting);
    function completeWriting(event:Event):void {
        var writingCompleted:TextField = new TextField;
        writingCompleted.autoSize = "center";
        writingCompleted.x =200;
        writingCompleted.y= 200;
        writingCompleted.text = event.target.data;
        addChild(writingCompleted);
    He is sending the score and name to the database but he is doing that when i press ctrl-enter. He is sending the data I have given in:
    variables.name = "Wil";
    variables.final = 2000;
    I want a input textfield and a button. And When I fill in my name in the input textfield he send it to the database when I press the button.
    Is there someone that can help me out?
    Tnx

    import fl.controls.TextInput;
    import fl.controls.TextArea;
    var variables:URLVariables = new URLVariables();
    //variables.name = "Wil";
    //variables.final = 2000;
    var request:URLRequest = new URLRequest();
    ////insert in the location of the php script ////////////////
    request.url = "http://www.justenter.nl/script.php";
    request.data = variables;
    var loader:URLLoader = new URLLoader();
    submitBtn.addEventListener(MouseEvent.CLICK,submitF);  // where submitBtn is your button
    function submitF(e:Event){
    variables.name=nameTF.text; // where nameTF is your input texfield
    variables.final = score;  // where score is the variable you use to tally user score
    loader.load(request); //sends the request
    //when the request is done loading, it goes to the completeWriting function
    loader.addEventListener(Event.COMPLETE, completeWriting);
    function completeWriting(event:Event):void {
        var writingCompleted:TextField = new TextField;
        writingCompleted.autoSize = "center";
        writingCompleted.x =200;
        writingCompleted.y= 200;
        writingCompleted.text = event.target.data;
        addChild(writingCompleted);

  • Not sure if anyone can help but I have a copy of Photoshop CS5.1. Ever since it was installed, every now and again when I try do something simple like save a file or scale something using the Transform tool, in fact anything at all it comes up with "Could

    Not sure if anyone can help but I have a copy of Photoshop CS5.1. Ever since it was installed, every now and again when I try do something simple like save a file or scale something using the Transform tool, in fact anything at all it comes up with "Could not complete your request because of a program error". Have thought about re-installing  it but I have lost my serial number.  I'm living in Ireland and trying to get to talk to someone in tech support is a complete joke. Any ideas what to do ? Thanks

    Ianp69549740 have you tried reinstalling Photoshop CS5.1?  If so do you receive any specific errors?  What operating system are you using?

  • How to Access Custom Event using AS3?

    Hi All,
    Maybe it's that its Monday morning and my brain is still foggy, but I can't seem to figure out how to set custom events using AS3.
    I have a custom GridRow itemRenderer, and have declared the event using the appropriate metatags.
    Then I create the GR item dynamically using AS3 instantiation, but the event is not available for selection in the intellisense drop-down.
    Let's take the following as an example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Grid
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:renderers="com.brassworks.renderers.*"
         creationComplete="componentInit();"
    >
         <mx:Script>
              <![CDATA[
                   private function componentInit():void
                        newRow     :MyRow     = new MyRow();
                        //newRow.myEvent is not an available option to set
              ]]>
         </mx:Script>
    </mx:Grid>
    Then the itemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <GridRow
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:classes="com.brassworks.components.classes.*"
         creationComplete="componentInit();"
    >
         <mx:Metadata>
              [Event(name="myEvent", type="flash.events.Event")]
         </mx:Metadata>
         <mx:Script>
              <![CDATA[
                   private function itemChanged(event:Event):void
                   Alert.show("test");
                   this.dispatchEvent(new Event("myEvent"));
              ]]>
         </mx:Script>
         <mx:GridItem>
              <mx:TextInput
                   change="itemChanged"
              />
         </mx:GridItem>
    </GridRow>
    How do I go about setting the handler method for custom events on instantiated items? Do I need to do this via the AddEventListener() method? Does this mean that events aren't exposed in ActionScript like they are in MXML? (In MXML all I have to do is <MyRow myEvent="handler(event)" />.)
    Thanks!
    -Mike

    Yes, I you need to do this via the addEventListener() method.
    myRow.addEventListener( "myEvent", myHandler );
    I hope that helps.
    Ben Edwards

  • Save data to mysql using AS3 + Flash Builder(flex) OR AS3+AMFPHP? or AS3

    Hi,
    i just want to confirm with you guys about saving data to mysql using Action script 3.
    I am now developing RPG game that user can save data again and again to the MySQL.
    I searched on the net and found few solutions:
    AS3 alone using URL Loader
    AS3 + Flex +Php to save data to mysql
    AS3 + AMFPHP to save data to mysql
    This make me confused as there are too many options but i do not know which one is better for me
    or what are their limitations...
    Could you guys help me on this?

    For developing you can use the server (install like any other software), but the Zend framework is nothing more than php files, so all you need to do is upload the framework to you hosting server and all should be well.. You may have to configure a few things, but you should be able to do that yourself.
    There's plenty of documentation on installing and configuring Zend on their website.
    So, only get the server edition if you don't already have a dev server (on you computer) installed, like Apache. Otherwise, just grab the framework:
    http://framework.zend.com/download/latest
    Select "minimal package" on the page above to only get the framework (no install). Or grab both and see what each one does but the minimal package is what you need to upload to your hosting server.
    As for where Flex/Flash Builder comes in.. FB is the tool you use to create a Flash/Flex application.
    Zend, AMFPHP, etc.. is used to communicate with your backend from your application, using RemoteObject
    RemoteObject API
    http://livedocs.adobe.com/flex/3/langref/mx/rpc/remoting/RemoteObject.html
    Using RemoteObject components
    http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_4.html

  • How can i use C/Javascript/php/Java in flex?

    can i embed these language into my flex project?
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    please help~

    saipanBETTY0509 wrote:
    Subject: How can i use C/Javascript/php/Java in flex?
    can i embed these language into my flex project?
    You can't.  Why do you want to do this?
    saipanBETTY0509 wrote:
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    I think what this means is "I want to check to see how much hard disk space is available.  Also, I need to check the pixel dimensions of an image."
    Is that right?
    There is no way in the Flash Player (as far as I know) that you can determine the amount of free disk space.  However, in AIR you can use air.File.applicationStorageDirectory.spaceAvailable to determine the storage space available in the application storage directory.
    As far as determining the dimensions of an image, there are plenty of good resources out there on that.  Maybe this one will be helpful to you?
    http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-pr ocessing-local-images/
      -Josh

  • Creating a water Effect using AS3

    Hi There
    I have created a water effect in Adobe Flash using AS2,
    however I now wish to create a flash application with the same
    effect but using AS3.
    Please see the attached code I have used to create the water
    effect using AS2.
    I am looking for somebody to help me change this to work in
    Action Script 3. Any help would be greatly appreciated.
    Thanks
    Tremayne

    You are maybe talking about the cursor tooltips? The
    one when you pause over a link a little box pops up
    with the link or name of the link? Maybe?
    If so, iweb can't do this. It make the default
    tooltips the name of the link. You can edit it to
    whatever you want by changing the "alt" tag in the
    html.
    ???

  • Is airdrop is avaiable on iphone4g n how to use airplay ... n something playing game like sufers subways its get stuck middle .. y is it so .. help me out..

    is airdrop is avaiable on iphone4g n how to use airplay ... n something playing game like sufers subways its get stuck middle .. y is it so .. help me out..
    n which is best app to saver battery life... n how to make ma phone run smootly..
    pls help me >>>
    <Email Edited by Host>

    Hi ChrisBell,
    my Pixi shows me the missed calls in a list of its own? I don't have many, so maybe I'm missing something. But I agree with your half-ranting to some degree. As a long-time Palm-user (my last phone was a Treo 680, terrible form factor, good UI), I am really disappointed with the standard software on this phone. Memos and Tasks, which AFAIK were there and useful even on the first Newton's, have regressed beyond the point of usefulness now (solution: Toodledo and Done!, at least for now).
    But ChrisBell: if you feel up for it, you could start tinkering. Many people love these phones so much they have started developing patches to solve the obvious problems skimmed over by developers. Try looking up "webosquickinstall" and "preware", and you will find over 300 patches and a lot of free software to help you out. I am not a computer wizard myself, but I am not scared of them either, and I have been able to make good use of all these extras made available by the community.
    just a thought, might help you out on a few of your half-rants

  • External variable issue using AS3 in FlashCS3

    I am trying to pass database values into Flash (using AS3)
    through a simple PHP script output! The trouble is ... I have not
    been able to get Flash/AS3 to acknowledge that it has received the
    supposedly externally loaded data, let alone prove that it is ready
    to work with the values passed into it in some way. So, OK...
    ...here is my PHP code (phpCode.php):

    I tested your code and it works just fine on my local WAMP
    installation?
    My output panel traces:
    lname is theLastName
    fname is theFirstName
    Have you stepped through your code line by line with the
    debugger to see where flash is messing up?
    Cheers,
    Flashtastic

  • Passing variables from AS3 to PHP

    Hi there
    I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php].
    I've stuck with this for two days.. Here's what I have done. Please help!!!
    header.fla [Actionscript in the timeline]
    stop();
    import flash.events.Event;
    import flash.display.Sprite;
    import flash.net.*;
    var url:String = "http://localhost/0000/try.php";
    var req:URLRequest = new URLRequest(url);
    var loader:URLLoader = new URLLoader();
    var variables:URLVariables = new URLVariables();
    send_btn.addEventListener(MouseEvent.CLICK, sendForm);
    function sendForm(evt:MouseEvent):void
        // add the variables to our URLVariables
        variables.asd = "value";
        // send data via post
        req.method = URLRequestMethod.POST;
        req.data = variables;
        loader.dataFormat = URLLoaderDataFormat.TEXT;
        // add listener
        loader.addEventListener(Event.COMPLETE, onLoaded);
        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
        //send data
        loader.load(req);
    function onLoaded(evt:Event):void
        var result_data:String = String(loader.data);
        if (result_data)
            trace(result_data);
        else if (!result_data)
            trace("error");
    function ioErrorHandler(event:IOErrorEvent):void
        trace("ioErrorHandler: " + event);
    try.php
    <body>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="563" height="280">
      <param name="movie" value="header.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="../Scripts/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="header.swf" width="563" height="280">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <param name="expressinstall" value="../Scripts/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <?php
    if($_POST['asd'])
    echo "value of var1 is <b>".$_POST['asd']."</b>";
    else
    echo "bad luck";
    ?>
    </body>
    BIG THANKS!!

    the problem is nothing your showed.   did you see a security warning that you ignored?
    to test, if that's the problem go here and adjust your security settings:  http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    if that fails, upload your files to a server and confirm everything works.  then start working on your local configuration.

  • Add wav file in flash using as3

    i want to add wav file to flash using as3 externally or
    internally..............

    If you look thru the Flash help files for adding sounds you
    will find the options you have and don't have.
    If you have already tried something and it is not working,
    then provide details of your situation.

  • How to read a local file using as3 in a flash object in HTML? [urgent]

    My web site contains a flash object.
    I want to use as3 to read some local .txt file
    by getting the user directory of the file.
    i know AIR can support this by sth like:
    File.desktopDirectory.resolvePath
    but when i open a AIR file for this, it seems
    the action cant be run when i embed it in html.
    And i tried to use the above function in a normal
    flash file in the action script.
    But it cant recognize the File. class..
    How can it be done ?
    It's reli urgent,
    please help...
    Thanks !

    a web based flash app can't detect user directories.  you can use the filereference class'es browse method to let the user locate a file in any directory the user wants.  flash can then retrieve the file's name and type.  but, as mentioned before,  flash can't determine the file's directory.

  • How do I create a play button for movie clip using AS3

    Hello.
    Bit new to this and have been searching the adobe forums and google. I am trying to create a button that will play an imported MovieClip.
    I have a movie clip that I've imported into it's own layer (Layer1) Frame 1.  I've given the MovieClip an instance name of foundationMovie.
    I've created a button and have that on its own layer(Layer2) above layer1, it is also in Frame 1.
    I've added a
    stop (); action to layer2
    The video is not set to autoplay.
    I want the video to start playing when the viewer clicks the button.  I know I've got to put some kind of event listener using AS3 in my timeline somewhere.
    I've found some code and I've been trying to work with it.  I'm sure I've mutilated it beyond usability but this is what I've got.
    stop ();
    player.addEventListener(MouseEvent.CLICK,play);
    function play(event:MouseEvent)
    gotoAndPlay("foundationMovie");
    If someone could point me the right direction or help me with my code I would really appreciate it.  Thanks.

    First, you need to clear up what you are working with... a movieclip and a video are usually entirely different things.
    Next, your code may get you started on your way with some changes.   You shouldn't use "play" as a function name due to there already being a play() method/function in Flash.
    If the movieclip is a movieclip and has an instance name of "foundationMovie", and your button has an instance name of "player" then the following adjusted code would normally work...
    stop ();
    player.addEventListener(MouseEvent.CLICK,playMovie);
    function playMovie(event:MouseEvent)
         foundationMovie.play();

  • Does anybody know if Windows 8 is causing a problem with iTunes?   Many songs on my old iPod are now missing in my iTunes library and I can't find them anywhere.  Also, I have a new iPod and am afraid of using it for fear of something else going wrong.

    Does anybody know if Windows 8 is causing a problem with iTunes?  Many songs on my old iPod are now missing in my iTunes library and I can't find them anywhere.  .  Also, I have a new iPod and am afraid of using it for fear of something else going wrong.

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • Dynamic Photo Gallery in Flash using AS3.0 and XML, but it doesn't work and missed up my app.

    Hi,
    I am creating an iPad app using AS3. The app contains three sections.
    One of those sections (chocolate sources)contains Dynamic Photo Gallery using XML. The photos, thumbnails, and text in this section are loaded from XML.
    I faced may issue when I tried to run this app:
    The gallery photos didn't show up
    The thumbnails (buttons to navigate the photo gallery) didn't show up at all. (The thumbnails should show up under the photo gallery box.)
    The text doesn't show up (the text should be in every photo as describtion)
    I want to include Swipe in the photo gallery, how can I do that?
    When I click on "Chocolate Sources" button, the photo gallery appears in every section, here are print screens describe what I mean:
    The photo gallery covers the home screen too.
    Here is my XML:
    <?xml version="1.0" encoding="utf-8"?>
    <sources>
              <section>
                        <details>
                                            Cocoa tree exists in the tropics area, such as Central and South America.
                                  </details>
                                            <image>
                                                      <url>coca1.jpg</url>
                                                      </image>
                                                      </section>
              <section>
                        <details>
                        Cocoa is supplied in many countries such as Indonesia, Ghana, Brazil, Ecuador and Cameroon.
                        </details>
                                  <image>
                                  <url>coca2.jpg</url>
                                  </image>
                                            </section>
              <section>
                                  <details>
                                  Dark chocolate helps to relax and reduce the stress and blood pressure because it has antioxidants elements, which helps in vasodilatory process.
                                  </details>
                                            <image>
                                            <url>coca3.jpg</url>
                                                      </image>
                                                                </section>
              <section>
                        <details>
                        Chocolate provides energy and hyperactive sometimes because it contains high level of caffeine and sugar.
                        </details>
                                  <image>
                                  <url>coca4.jpg</url>
                                            </image>
                                                      </section>
              <section>
                        <details>
                        Chocolate could be mixed with many different flavors, such as mint, strawberry, orange, banana, vanilla, hazelnut, almond, coconut, and etc.
                        </details>
                                  <image>
                                  <url>coca5.jpg</url>
                                  </image>
                                            </section>
              <section>
                        <details>
                                  Chocolate is expressing of well hospitality and good time due to its lovely taste.
                                  </details>
                                            <image>
                                            <url>coca6.jpg</url>
                                                      </image>
                                                                </section>
    </sources>
    And here is my Action Script for "Chocolate Sources" section:
    stop();
    function Choco1(evt:MouseEvent): void {
              gotoAndStop('16');
    choco_btn.addEventListener(MouseEvent.CLICK,Choco1);
    function Souc1 (evt:MouseEvent): void {
              gotoAndStop ('31');
    souc_btn.addEventListener(MouseEvent.CLICK,Souc1);
    function ShopIn1 (evt:MouseEvent):void {
              gotoAndStop('46');
    shops_btn.addEventListener(MouseEvent.CLICK,ShopIn1);
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.display.Loader;
    import fl.motion.MotionEvent;
    import flash.events.MouseEvent;
    import flash.sampler.NewObjectSample;
    import flash.text.TextFormat;
    var xmlLoader: URLLoader = new URLLoader (new URLRequest("sources.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, finishedXmlLoader);
    var xmlFile:XML;
    var xextend:int = 10;
    var gal:galary = new galary ();
              gal.x = 85;
              gal.y = 165;
              addChild(gal);
    var txfe: TextField = new TextField ();
    txfe.x = 25;
    txfe.y = 45;
    var tformat:TextFormat = new TextFormat ();
    tformat.bold = true;
    tformat.color = 0xFFFFFF;
    tformat.size = "18";
    tformat.font = "Arial";
    txfe.defaultTextFormat = tformat;
    addChild(txfe);
    function finishedXmlLoader (e:Event): void{
              xmlFile = new XML (xmlLoader.data);
              var leng:int = xmlFile.image.length();
              txfe.text = xmlFile.image.details[0];
              for (var i:int = 0;i<leng;i++){
                        var b:thumbs = new thumbs ();
                        b.x = xextend;
                        b.y = 480;
                        b.buttonMode = true;
                        b.details = (i+1).toString();
                        addChild(b);
                        b.addEventListener(MouseEvent.MOUSE_OVER, theMosover);
                        b.addEventListener(MouseEvent.MOUSE_OUT, theMosout);
                        b.addEventListener(MouseEvent.CLICK, onMosClick);
                        var bloader:Loader = new Loader();
                        bloader.load(new URLRequest("thumbs/" + (i+1) + ".jpg"));
                        b.addChild(bloader);
                        xextend += b.width + 50;
    var loader:Loader = new Loader ();
    loader.load(new URLRequest ("pictures/coca1.jpg"));
    gal.addChild(loader);
    function theMosover(m:MotionEvent):void{
              m.currentTarget.alpha = 0.5;
    function theMosout (m:MouseEvent):void{
              m.currentTarget.alpha = 1.0;
    function onMosClick(m:MouseEvent):void{
              var loader:Loader = new Loader();
              loader.load(new URLRequest("pictures/" + m.currentTarget.details + ".jpg"));
              gal.addChild(loader);
              txfe.text = xmlFile.image.details[int(m.currentTarget.details) -1];
    I need an urgent help to fix the errors and make this section work well.
    thanks.

    try:
    txfe.text = xmlFile.section[int(m.currentTarget.details) -1].details;
    instead of
    txfe.text = xmlFile.image.[int(m.currentTarget.details) -1];
    and add your thumbs to gal, not the stage.  when you're done with the gallery, remove gal.

Maybe you are looking for

  • How do I use the VFX effect in/out times?

    In iMovie HD 6 -- I have tried to set the effect in and out times on a single clip, but for some reason the effect either lasts the entire clip, or not at all.  Also, wondering if there is a way to get an effect to last across two clips. Thanks!

  • Can't figure out how to get my I tunes from one Computer to another.

    When I downloaded I tunes and quick time to my new Laptop and logged into I tunes, I authorized this computer, but can't get my existing library from my PC to my laptop. How do I do that? Can someone tell me please. Thanx! Stashpuppy

  • New Thunderbolt to FireWire

    Does anyone know when apple is going to release the Thunderbolt to FireWire adapter and what kind of FireWire it will be? I have an old video camera with a 4-pin FireWire 400 and I have the new MacBook Pro Retnia Display which doesn't have FireWire.

  • How to get rid of trojan horses

    whats the best way to get rid of trojan.download. this is my first mac. i just want the best product for my computer(love my mac).

  • Buying a new MacBook pro - what specs should I get

    Hi, I'm about to buy a new 17-inch MacBook Pro. I will use it for making videos and DVDs. I use Photoshop, After Effects, Final Cut Pro, Compressor and DVD Studio Pro, often simultaneously. I am wondering which specs to choose for the computer... 2.8