A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: MovieClip to JPG

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    15

    MovieClip to JPG

    Hi everybody,
    i created in ActonScript 2.0 this file .fla without file .as :

    Code:
    
    createEmptyMovieClip("Line",1);
    Line.lineStyle(1,0x000000,100); 
    onMouseDown = function ()
    {
    Line.moveTo(_xmouse, _ymouse);
    onMouseMove = function ()
    { Line.lineTo(_xmouse, _ymouse);}
    }
    
    onMouseUp=function()
    {
    onMouseMove=null;
    }
    
    // clear the drawing 
    erase_mc.onRelease = function() 
    {
    	createEmptyMovieClip("Line", 1);
    	Line.lineStyle(1, 0x000000, 100);
    	Line.beginFill(0x000000, 100);
    	Line.moveTo(0, 0);
    	Line.moveTo(0, 180);
    	Line.moveTo(350, 180);
    	Line.moveTo(350, 0);
    	Line.moveTo(0, 0);
    	Line.endFill();
    	
    };
    I want to decode my draw on MovieClip in a file jpg.

    Is it possible ?

    I looked for something in internet, but I found only codes for AS3

    Thanks !

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    15
    Hi gparis, i used your link, it's very good for my Application .

    But now i have a problem.

    When i press on save button, my application opens the file php with my drawing in a new page of the browser.

    Is possible to save this drawing in a file .jpg on my server (in a folder) without open new tab in browser ?

    i used the code of the section "4. Generate the image in PHP" of your link , in the second page, to generate my php file.

    Thanks.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    You'll need to modify the php file so that it does not display the image.
    gparis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center