# Converting rotatation value from flash into svg

**URL:** <https://forum.kirupa.com/t/converting-rotatation-value-from-flash-into-svg/264357>\
**Category:** Uncategorized\
**Created:** [June 25, 2008, 11:24am UTC](https://forum.kirupa.com/t/converting-rotatation-value-from-flash-into-svg/264357 "2008-06-25T11:24:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdene2000](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@rdene2000](https://forum.kirupa.com/u/rdene2000)\
**Post date:** [June 25, 2008, 11:24am UTC](https://forum.kirupa.com/t/converting-rotatation-value-from-flash-into-svg/264357/1 "2008-06-25T11:24:41Z")

</div>

hi,

Advance thankx for helping me

Here i am taking the rotation value from flash and transfering into svg by the forumalue and getting **fdeg** then also it is not coming in the seen position of flash in svg file

if doesnt affect rotation scale alone changing means it comes in right position

function svgsave() {  
sendXML = new XML("\<?xml version=“1.0” standalone=“no”?\>");  
sendXML.ignoreWhite = true;  
sendXML.contentType = “text/xml”;  
root = sendXML.createElement(“svg”);  
[//root.attributes.width](https://root.attributes.width) = 400;  
[//root.attributes.height](https://root.attributes.height) = 300;  
root.attributes.xmlns = “[http://www.w3.org/2000/svg](http://www.w3.org/2000/svg)”;  
root.attributes[“xmlns:xlink”] = “[http://www.w3.org/1999/xlink](http://www.w3.org/1999/xlink)”;  
root.attributes[“xmlns:html”] = “[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)”;  
sendXML.appendChild(root);  
for (i=0; i\<=globalArray.length-1; i++) {  
imagName = globalArray\*._name.split("_")[0];  
imageNo = globalArray\*._name.split("_")[1];  
startx = globalArray\*.\_x;  
starty = globalArray\*.\_y;  
/////////////keeper  
if (imagName == “keeper”) {  
keepercolor = globalArray\*.CoLor;  
trace(“keepercolor”+keepercolor);  
trace(“startx::”+startx);  
trace(“startx::”+starty);

/////////////  
main\_img = sendXML.createElement(“image”);  
bgimagePath = “asset/playground/”+globalArray\*.CoLor+"/svg"+swfFileName;  
main\_img.attributes.width = 599;  
main\_img.attributes.height = 433;  
main\_img.attributes.x = 138;  
main\_img.attributes.y = 140;  
main\_img.attributes[“xlink:href”] = “asset/playground/green/svg/11.svg”;  
root.appendChild(main\_img);  
///////////////////////  
swfFileName = coach\_array[parseInt(imageNo)].split("/")[2];  
svgname = swfFileName.split(".")[0];  
svgpath = svgname+".svg";  
imagePath = “asset/keeper/”+globalArray\*.CoLor+"/"+swfFileName;  
isvgPath = “asset/keeper/”+globalArray\*.CoLor+"/svg/"+svgpath;  
img = sendXML.createElement(“image”);  
xx = globalArray\*.\_height;  
yy = globalArray\*.\_width;  
xx1 = \_parent.MainMC.\_x+globalArray\*.\_x;  
yy1 = \_parent.MainMC.\_y+globalArray\*.\_y;  
myscalex = globalArray\*.\_xscale;  
myscaley = globalArray\*.\_yscale;  
trace(“myscalex::”+myscalex);  
trace(“myscaley::”+myscaley);  
arotate1 = Math.round(globalArray\*.\_rotation);  
trace(“arotate1::”+arotate1);  
////////////////////////////////////  
dx = globalArray\*.\_x;  
dy = globalArray\*.\_y;  
var dist:Number = Math.sqrt(dx_dx+dy_dy);  
var diam:Number = 2_arotate1;  
fdeg = 57.3_diam/dist;  
/////////////////////////  
img.attributes.fill = keepercolor;  
img.attributes.transform = “rotate(”+fdeg+" “+100+” “+100+”)";  
img.attributes.x = xx1;  
img.attributes.y = yy1;  
img.attributes.width = globalArray\*.\_width;  
img.attributes.height = globalArray\*.\_height;  
img.attributes[“xlink:href”] = isvgPath;  
root.appendChild(img);  
//////////////////////////  
/////////////  
}

Regards,  
R.Denesh Kumar  
+919952018252  
[rdene2000@yahoo.com](mailto:rdene2000@yahoo.com)
