# Storing/retrieving color data.. php

**URL:** https://forum.kirupa.com/t/storing-retrieving-color-data-php/170053
**Category:** Uncategorized
**Created:** [November 22, 2005, 12:40pm UTC](https://forum.kirupa.com/t/storing-retrieving-color-data-php/170053 "2005-11-22T12:40:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![english\_bob](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@english\_bob](https://forum.kirupa.com/u/english_bob)
#### Post date: [November 22, 2005, 12:40pm UTC](https://forum.kirupa.com/t/storing-retrieving-color-data-php/170053/1 "2005-11-22T12:40:21Z")

</div>

okay, so i have a basic drawing app based on [http://jerryscript.hostrocket.com/flash/draw/SWFDrawing2JPEG.html](http://jerryscript.hostrocket.com/flash/draw/SWFDrawing2JPEG.html) which looks something like this:

> 

drawing = false;  
data = ‘’;  
\_global.linethickness = “2”;  
\_global.linergb = “0xFF0023”;  
\_global.linealpha = “80”;

with(\_root){

onMouseDown=function(){  
if(\_root.board.hitTest(\_root.\_xmouse,\_root.\_ymouse)){  
drawing=true;  
xposition=\_xmouse;  
yposition=\_ymouse;  
moveTo(xposition,yposition);  
}  
};

onMouseUp=function(){  
drawing=false;  
};

onMouseMove=function(){  
if(drawing==true){  
lineStyle(linethickness,linergb,linealpha);  
lineTo(\_xmouse,\_ymouse);

if(drawing==true){  
lineStyle(linethickness,linergb,linealpha);  
lineTo(\_xmouse,_ymouse);  
 root.data+=xposition+'‘+yposition+’_‘+_xmouse+'_’+\_ymouse+‘-’;  
xposition=\_xmouse;  
yposition=\_ymouse;  
}  
updateAfterEvent();  
};

}}  
send.onRelease = function ()  
{  
getURL(‘create-swf.php’, ‘\_blank’, ‘POST’);  
};

when ‘send’ is pressed, it loads a php script which retrieves the line data and redraws it thanks to MING like:

> 

$data=$HTTP\_POST\_VARS[“data”];

$movie=new SWFMovie();  
$movie-\>setDimension(500,300);  
$movie-\>setBackground(255,255,255);

$s=new SWFShape();  
$s-\>setLine(1,0,0,0,255);

$lines=explode(“-”,$data);

for($l=0;$l\<count($lines)-1;$l++){

$lineData=explode(“\_”,$lines[$l]);  
$s-\>movePenTo($lineData[0],$lineData[1]);  
$s-\>drawLineTo($lineData[2],$lineData[3]);

}

works fine.  
problem is, i can change the colour and tha alpha and the linethickness in the flash bit (changing the ‘line…’ variables) but i cant figure out how to store the different info and then bring it back in the php file…

anyone help?  
stuck. :huh:
