10 Replies - 27331 Views - Last Post: 21 June 2011 - 12:58 PM

#1 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Flash Challenges

Posted 19 May 2006 - 11:08 AM

Alright guys, I've decided to post small Flash "challenges" for anyone to try. Majority will be based on mathematics simulations that I have everyday here at work. I'll try to have each challenge split into a number of parts starting from easy beginnings to "Holy Shit", so that everybody can at least try each challenge. The final parts will be difficult. I'll be around to help anybody that wants it, so feel free to post on the Flash & ActionScript boards.

Flash Challenge "Rules":
1. Use ActionScript and as little library objects as possible.
2. Don't panic. Ask for help ;)
3. When using a library object make sure you tell us that in the documentation or post.
4. If somebody has already posted a solution to one of the challenges:
* Beginners: Try to do your own script from scratch using an exsisting solution as a guide.
* !Beginners: Either do your own "better" version or simplify an existing solution.
5. This thread is for challenge briefs. Do NOT post your solutions in this thread.
6. Start every Challenge on Part I.. Don't skip any parts.
7. Post your solutions to ALL the parts you've attempted, not just the last one.

Here goes :)

Is This A Good Question/Topic? 0
  • +

Replies To: Flash Challenges

#2 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: Flash Challenges

Posted 19 May 2006 - 11:10 AM

Flash Challenge #1 - A rectangle

PART I
Draw a rectangle with dimentions 200px wide and 100px high. The rectangle should be positioned at coordinates x=200, y=200.

PART II
Draw 3 rectangles with different colour outlines and dimentions 100px by 50px, 80px by 25px and 60px by 120px. They can be positioned anywhere on the screen.

PART III
Draw a rectangle anywhere on the stage, with dimentions 200px by 100px. Eash side of the rectangle must react to mouse interaction (like a button) with the following styles for states: on up #000099 2px, on over #990000 2px, on down #009900 3px.

PART IV
Draw a rectangle anywhere on the stage, with dimentions 200px by 100px. Eash side of the rectangle must react to mouse interaction (like a button) with the following styles for states: on up #000099 2px, on over #990000 2px, on down #009900 3px. Each side must have a label with current dimentions displayed (use library object if neccessary.. extra cred if you don't) and must be positioned in the middle of the line and just outside the rectangle. When pressed and dragged, the side should move and follow the mouse along one axis. The rest of the rectangle must resize. Dimention's labels and their position must update.

PART V - Holy Shit
Draw a rectangle centered on the stage, with dimentions 200px by 100px. Eash side of the rectangle must react to mouse interaction (like a button) with the following styles for states: on up #000099 2px, on over #990000 2px, on down #009900 3px. Each side must have a label with current dimentions displayed and must be positioned in the middle of the line and just outside the rectangle. When pressed and dragged, the side should move and follow the mouse along one axis. The rest of the rectangle must resize. Include 4 corner points (8px diameter dots) which have mouse interaction. When dot pressed and dragged, the rectangle should rotate corresponding to mouse movement and dots must remain positioned on the rectangle's corners. Dimention's labels and their position must update, but must not rotate.


Discussion and solutions here
Was This Post Helpful? 0
  • +
  • -

#3 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Flash Challenges

Posted 19 May 2006 - 12:13 PM

For those interested in trying the challenges but you don't have Flash, you can download a free 30 day trial directly from Adobe (formerly Macromedia):

http://www.adobe.com...roduct=flashpro
Was This Post Helpful? 0
  • +
  • -

#4 RiazMC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-December 06

Re: Flash Challenges

Posted 18 December 2006 - 07:21 PM

Ok im having trouble with the first challenge! Where would i even start!
Was This Post Helpful? 0
  • +
  • -

#5 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: Flash Challenges

Posted 19 December 2006 - 12:59 AM

Heres the discussion page :)

http://www.dreaminco...wtopic16324.htm
Was This Post Helpful? 0
  • +
  • -

#6 sharkyvk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 03-August 08

Re: Flash Challenges

Posted 03 August 2008 - 11:11 AM

View PostpioSko, on 19 May, 2006 - 11:08 AM, said:

Alright guys, I've decided to post small Flash "challenges" for anyone to try. Majority will be based on mathematics simulations that I have everyday here at work. I'll try to have each challenge split into a number of parts starting from easy beginnings to "Holy Shit", so that everybody can at least try each challenge. The final parts will be difficult. I'll be around to help anybody that wants it, so feel free to post on the Flash & ActionScript boards.

Flash Challenge "Rules":
1. Use ActionScript and as little library objects as possible.
2. Don't panic. Ask for help ;)
3. When using a library object make sure you tell us that in the documentation or post.
4. If somebody has already posted a solution to one of the challenges:
* Beginners: Try to do your own script from scratch using an exsisting solution as a guide.
* !Beginners: Either do your own "better" version or simplify an existing solution.
5. This thread is for challenge briefs. Do NOT post your solutions in this thread.
6. Start every Challenge on Part I.. Don't skip any parts.
7. Post your solutions to ALL the parts you've attempted, not just the last one.

Here goes :)


Hi Is this post still being read and replied to if I try to make these questions/scripts.

THX
Was This Post Helpful? 0
  • +
  • -

#7 BetaWar  Icon User is online

  • #include "soul.h"
  • member icon

Reputation: 1148
  • View blog
  • Posts: 7,149
  • Joined: 07-September 06

Re: Flash Challenges

Posted 07 August 2008 - 07:27 AM

When you reply to them it will be bumped to the top and people will see, that way we will know when you have posted in it and may be able to help you out.
Was This Post Helpful? 0
  • +
  • -

#8 GreenSpiral  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 64
  • Joined: 30-December 08

Re: Flash Challenges

Posted 31 December 2008 - 08:04 AM

For those people who want to try Flash but can't buy adobe and don't want a 30 day trial -> use LiveSwif (google it to find it). LiveSwif is free but it isn't perfect.
Was This Post Helpful? 1
  • +
  • -

#9 Charlie IronGleet  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 225
  • Joined: 29-January 09

Re: Flash Challenges

Posted 16 February 2009 - 06:04 AM

View PostGreenSpiral, on 31 Dec, 2008 - 07:04 AM, said:

For those people who want to try Flash but can't buy adobe and don't want a 30 day trial -> use LiveSwif (google it to find it). LiveSwif is free but it isn't perfect.


Yeah - thats an option. Heres a better one: Pirate software is the great democratizer of the tech world. How many successful and now wealthy developers learned their trade on bootleg copies of flash, visual studio, photshop, etc., I wonder? Alot more than would care to admit no doubt. It can't be discussed here -- and I respect that -- but I will give aspiring flash programmers who are poor a clue: google "flash torrent".

IronGleet :pirate:

This post has been edited by Charlie IronGleet: 16 February 2009 - 06:05 AM

Was This Post Helpful? -1
  • +
  • -

#10 SwiftStriker00  Icon User is offline

  • No idea why my code works
  • member icon

Reputation: 433
  • View blog
  • Posts: 1,596
  • Joined: 25-December 08

Re: Flash Challenges

Posted 24 June 2009 - 06:07 AM

View PostCharlie IronGleet, on 16 Feb, 2009 - 07:04 AM, said:

View PostGreenSpiral, on 31 Dec, 2008 - 07:04 AM, said:

For those people who want to try Flash but can't buy adobe and don't want a 30 day trial -> use LiveSwif (google it to find it). LiveSwif is free but it isn't perfect.


Yeah - thats an option. Heres a better one: Pirate software is the great democratizer of the tech world. How many successful and now wealthy developers learned their trade on bootleg copies of flash, visual studio, photshop, etc., I wonder? Alot more than would care to admit no doubt. It can't be discussed here -- and I respect that -- but I will give aspiring flash programmers who are poor a clue: google "flash torrent".

IronGleet :pirate:


>.> <.< .... who does that :P ? Anyway slightly more legal ways are : Here. Also if you know a professor or friend, you can ask them for their key, granted you can't register and get teh "advanced" tech support. But who registers software anyway?

In regards to the challenges, I like what you got going, Part IV isn't that bad, but Holy Shit is going to take me a little bit :)

This post has been edited by SwiftStriker00: 24 June 2009 - 06:07 AM

Was This Post Helpful? 0
  • +
  • -

#11 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: Flash Challenges

Posted 21 June 2011 - 12:58 PM

jeez has'nt anybody heard of ming its all I use.
build your own flash editor.
<style>

#dbr{float: right;
height: 300px;
width: 400px;}
#fgtex{
position: absolute;
width: 1020px;

top: 700px;
left: 0px;
border: 2px solid black;
display: none;}
#fg2{float: left;} 

#fgztex{position: absolute;
left: 0px;
top: 60px;
background-color:gray;
width: 100;
height: 510;
border: 2px solid black;
display: none;
padding: 2px;} 


#fgzact{position: absolute;
left: 0px;
top: 60px;
background-color:gray;
width: 100;
height: 510;
border: 2px solid black;
display: none;
padding: 2px;} 

#fgact{position: absolute;
left: 0px;
top: 60px;
background-color:gray;
width: 100;
height: 300;
border: 2px solid black;
display: none;
padding: 2px;}
#sw{position: absolute;
top: 250;
left: 370;}
#top{position: absolute;
top: 0px;
left: 0px;
width: 1020;
height: 60px;
background-color: gray;
font-family: "Comic Sans MS", cursive, sans-serif;
color: white;}
#fg1{
position: absolute;
width: 1020px;

top: 700px;
left: 0px;
border: 2px solid black;
display: none;}


#fgline{
position: absolute;
width: 1020px;
top: 700px;
left: 0px;
border: 2px solid black;
display: none;}

#fglinecolor{
position: absolute;
width: 1020px;
top: 700px;
left: 0px;
border: 2px solid black;
display: none;}
#fgs{
position: absolute;
width: 1020px;

top: 700px;
left: 0px;
border: 2px solid black;
display: none;}

#fg2{float: left;}


li{float: left;
font-family: "Comic Sans MS", cursive, sans-serif;
color: blue;

z-index: 0;}

#fg8{position: absolute;
top: 40px;
left: 20px;
width: 60px;
height: 160px;
display: none;
background-color: white;}


#fg9{position: absolute;
top: 40px;
left: 150px;
width: 100px;
height: 100px;
display: none;
background-color: gray;}
ledgend{font-family: "Comic Sans MS", cursive, sans-serif;
color: blue;
font-size: 10px;
}

#fgz1{position: absolute;
left: 0px;
top: 60px;
width: 100;
height: 260;
border: 2px solid black;
display: none;
padding: 2px;
background-color: gray;}

#fgzline{position: absolute;
left: 0px;
top: 60px;
width: 100;
height: 450;
border: 2px solid black;
display: none;
padding: 2px;
background-color: gray;}

#ope{position: absolute;
left: 60px;
top: 120px;
width: 200;
height: 100;
border: 2px solid black;
display: none;
padding: 2px;}


#ope1{position: absolute;
left: 60px;
top: 120px;
width: 200;
height: 100;
border: 2px solid black;
display: none;
padding: 2px;}


#fgz2{position: absolute;
left: 0px;
top: 60px;
width: 100;
height: 450;
border: 2px solid black;
display: none;
padding: 2px;
background-color: gray;}


#uu{position: absolute;
left: 500;
top: 10;
color: blue;} 

#uu1{position: absolute;
left: 560;
top: 10;
color: blue;} 
#uu2{position: absolute;
left: 660;
top: 10;
color: blue;} 

#ll{position: absolute;
left: 530;
top: 20;
color: blue;
width: 100px;
height: 200px;
display: none;} 

#ll2{position: absolute;
left: 580;
top: 20;
color: blue;
width: 100px;
height: 200px;
display: none;}  
#timg{position: absolute;
left: 620;
top: 100;
color: blue;
width: 100px;
display: none;} 


#tt{position: absolute;
left: 620;
top: 100;
color: blue;
width: 100px;
display: none;} 

#ttex{position: absolute;
left: 620;
top: 200;
color: blue;
width: 100px;
display: none;} 
#amov{position: absolute;
left: 620;
top: 200;
color: blue;
width: 100px;
display: none;}

</style>
<body bgcolor='white'>
<script>
var sc;
var gh;
var mh;
var tm;
var mm;
var pp;
var kk;
function shorien(pj) { 
var ur = pj.split(" ");
Winj = window.open("orientate.php?id="+ur[0]+"&&title="+ur[1], "orien", "width=700,height=800"); } 

function shimgg(pp) { 

Winj = window.open("editimg.php?id="+pp, "edimg", "width=700,height=800"); } 
function shmov(pp) { 
var parts = pp.split(" ");

Winj = window.open("actionedit.php?id="+parts[0]+"&&title="+parts[1], "action", "width=700,height=800"); } 
function shed() { 
var ff = document.getElementById("ll");
ff.style.display ="block";
} 
function shed1() { 
var ff = document.getElementById("ll2");
ff.style.display ="block";
}


function shshape() { 
var ff = document.getElementById("tt");
ff.style.display ="block";
} 
function tim() { 
var ff = document.getElementById("timg");
ff.style.display ="block";
} 

function tex() { 
var ff = document.getElementById("ttex");
ff.style.display ="block";
} 
function shshapef(mm) { 
document.showshape.va.value =mm; }


function shfz(pp) { 

Winj = window.open("circleedit.php?id="+pp, "shape", "width=700,height=800"); } 
 

 


function shtex1(pp3) { 

Winj = window.open("textwindow.php?id="+pp3, "tex", "width=700,height=800"); } 
function optxtbox(uu) { 
Winj = window.open("txtboxfunct.php?id="+uu, "texbox", "width=700,height=800"); }

function putact(mh) { 
document.actt.ele.value =mh; }

function inc() { 
var inc = document.getElementById("po");
var ft = inc.height;
inc.height = ft * 2;
var bgw = inc.width;
inc.width = bgw * 2; }


function pptex(sc) { 
document.textform.bgtex.value =sc; }


function shtex() { 
var tt = document.getElementById("fgtex");
tt.style.display = "block"; }

 
function dec() { 
var inc = document.getElementById("po");
var ft = inc.height;
inc.height = ft / 2;
var bgw = inc.width;
inc.width = bgw / 2; } 


function itemopen(gh) { 
var yt = document.getElementById(gh);
yt.style.display = "block"; }

function shape() { 
var tt = document.getElementById("fg8");
tt.style.display = "block"; }

function op() { 
var tt = document.getElementById("ope");
tt.style.display = "block";
var fd = document.getElementById("fg9");
fd.style.display = "none"; }

function op1() { 
var tt = document.getElementById("ope1");
tt.style.display = "block";
var fd = document.getElementById("fg9");
fd.style.display = "none"; }

function sh1() { 
var tt = document.getElementById("fgline");
tt.style.display = "block"; }

function shac() { 
var tt = document.getElementById("fgzact");
tt.style.display = "block"; }

function c() { 
var ttg = document.getElementById("fgline");
ttg.style.display ="none"; }


function ne() { 
document.location = "miindex.php";}


function sh2() { 
var tth = document.getElementById("fgs");
tth.style.display = "block"; }

function shline() { 
var tt = document.getElementById("fglinecolor");
tt.style.display = "block"; }

function sh() { 
var tt = document.getElementById("fg1");
tt.style.display = "block"; }

function pp(sc) { 
document.cc.bgc.value =sc; }

function pp1(sc) { 
document.ssq.lc.value =sc; }

function pp2(sc) { 
document.ssq.bg1.value =sc; }

function pp3(sc) { 
document.lines.bg3.value =sc; }

function ci() { 
var tt = document.getElementById("fgz1");
tt.style.display = "block";
var fd = document.getElementById("fg8");
fd.style.display = "none"; }

function te() { 
var tt = document.getElementById("fgztex");
tt.style.display = "block";}


function lin() { 
var ttu = document.getElementById("fgzline");
ttu.style.display = "block";
var fd = document.getElementById("fg8");
fd.style.display = "none"; }

function fi() { 
var tt = document.getElementById("fg9");
tt.style.display = "block"; }

function sq() { 
var tt = document.getElementById("fgz2");
tt.style.display = "block";
var fd = document.getElementById("fg8");
fd.style.display = "none"; }

function lsi(ff) { 
document.lines.linesize.value =ff;}

function lsi2(ff) { 
document.ssq.lw.value =ff;} 
function fac(gp,gt) { 
var ttg = document.getElementById("fgact");
ttg.style.display = "block";
document.spi.spid.value= gt;
document.rso.soundid.value =gt;
document.spi.spname.value = gp; } 

function ovi() { 
var ffm = document.getElementById("amov");
ffm.style.display ="block"; } 

</script>
<div id='top'><div id='fg2'><i onclick='shape();'>Shape</i><div id='fg8'></ul><li onclick='ci()'>Circle<br /><img src='circ.png' height='30' width='30' /></li><li onclick='sq()'>Square<br /><img src='square.png' height='30' width='30'  /></li><li onclick='lin()'>Line<br /><img src='line2.png'  width='30'  /></li></ul></div></div><div id='fg2'><i onclick='fi();'>    File</i><div id='fg9'><ul><li onclick='ne();'>New</li><li onclick='op()'>Open</li><li onclick='op1()'>Import</li></ul></div></div><div id='fg2'><img src='enlarge.png' height='30' onclick='inc();' /></div><div id='fg2'><img src='dec.png' height='30' onclick='dec();'/></div><div id='fg2'><img src='tex.png' height='30' onclick='te();'/></div><div id='fg2'><ul>
<?php
include "config.php";
$titlen = $_GET['titlename'];
$tit = substr($titlen,0,- 4);
$qe = "SELECT * FROM func4 WHERE titlename = '$tit' AND ifadd = 'sprite'";
$re = sqlite_query($db,$qe);
while($ro = sqlite_fetch_object($re) ) { 
echo "<li id='$ro->ot1' value='$ro->id' onclick='fac(this.id,this.value)'>$ro->ot1</li><br />"; } 
?>
</ul></div><div id='fg2'><div id='p' onclick='shac();'>Create Action</div><ul>
<?php
$qet = "SELECT * FROM func4 WHERE titlename = '$tit'";
$ret = sqlite_query($db,$qet);
while($rot = sqlite_fetch_object($ret) ) { 
echo "<li id='$rot->id' onclick='putact(this.id);'>$rot->type</li><br />";
$tit = $rot->titlename; } 
?>
</ul></div>
<form name='showshape'><input type='BUTTON' name='va' value=' ' onclick='shfz(this.value);'/></form></div>
<div id='uu' onclick='shed();'>Edit</div>
<div id='ll'><ul>
<li onclick='editmov();'>Movie</li>
<li onclick='shshape();'>Shape</li>
<li onclick='tim();'>Image</li>
<li onclick='tex();'>Text</li>
<li>Sound</li>
<li>Video</li>
<li onclick='ovi();'>Action</li>
</ul></div><div id='uu1' onclick='shed1();'>Text Box
</div><div id='ll2'>
<ul>
<?php
echo "<li id='$tit' onclick='optxtbox(this.id)'>$tit Add</li>";
?>
</ul></div></div>
<div id='tt'><ul>
<?php
include "config.php";
$q = "SELECT * FROM func4 WHERE titlename='$tit' AND type !='tex' AND type != 'img'";
$res = sqlite_query($db, $q);
while ($row = sqlite_fetch_object($res) ) { 
echo "<li id='$row->id' onclick='shshapef(this.id);'>$row->type</li>"; } 
echo "</ul></div>";


?>

<div id='timg'><ul>
<?php
include "config.php";
$q = "SELECT * FROM func4 WHERE titlename='$tit' AND type = 'img'";
$res = sqlite_query($db, $q);
while ($row = sqlite_fetch_object($res) ) { 
echo "<li id='$row->id' onclick='shimgg(this.id);'>$row->type</li>"; } 
echo "</ul></div>";


?>
<div id='ttex'><ul>
<?php
include "config.php";
$q = "SELECT * FROM func4 WHERE titlename='$tit' AND type ='tex'";
$res = sqlite_query($db, $q);
while ($row = sqlite_fetch_object($res) ) { 
echo "<li id='$row->id' onclick='shtex1(this.id);'>$row->type</li>"; } 
echo "</ul></div>";
?>

<div id='uu2'>Orientate
<ul>
<?php
$qet = "SELECT * FROM func4 WHERE titlename = '$tit'";
$ret = sqlite_query($db,$qet);
while($rot = sqlite_fetch_object($ret) ) { 
$inf = $rot->id . ' ' . $rot->titlename;
echo "<li id='$inf' onclick='shorien(this.id);'>$rot->type</li><br />";
$tit = $rot->titlename; } 
?>
</ul></div>

<div id='dbr'><ul><ledgend>Multiple FRAMES</ledgend><br />
<?php
$qz = "SELECT * FROM func4 WHERE ent14 = '$tit'";
$resz = sqlite_query($db, $qz);
if(sqlite_num_rows($resz) > 0) { 
while ($rowz = sqlite_fetch_object($resz) ) { 
$noz[] = $rowz->ot9;
$ros[] = $rowz->ot8; } } 
$totalnum = count($noz);
if(isset($noz) ) { 
$fg = array_unique($noz);
$numtouse = ($totalnum / 2);

$total = count($fg);
$sum = count($ros); 

for($k=0;$k<$total;$k++) { 
$numm = $total * $k;

echo "<div id='fg2'><li id='$ros[$numm]. $tit' onclick='shmov1(this.id);'>$ros[$numm] ||</li></div>";  }  }     
echo "</ul>";
?>


</ul><ul><ledgend>Individual FRAMES</ledgend><br />
<?php
include "config.php";
echo "ti $tit";
$ql = "SELECT * FROM movv2 WHERE title ='$tit'";
$resl = sqlite_query($db, $ql);
if(sqlite_num_rows($resl) > 0) { 
while ($rowl = sqlite_fetch_object($resl) ) { 
$frno = $rowl->otm3; }   
$q = "SELECT * FROM func4 WHERE ent14 ='$tit' AND ot2 ='mov' LIMIT $frno";
$res = sqlite_query($db, $q);
if(sqlite_num_rows($res) > 0) { 
while ($row = sqlite_fetch_object($res) ) { 
$no = $row->ent15;  
echo "<div id='fg2'><li id='$no $tit' onclick='shmov(this.id);'>$no ||</li></div>"; } } }   
echo "</ul></div>";
?>




<?php
$qv = "SELECT * FROM func4 WHERE titlename='$tit' AND ifadd ='sprite'";
$resv = sqlite_query($db, $qv);
while ($rowv = sqlite_fetch_object($resv) ) { 
$spname = $rowv->ot1;
$spid = $rowv->id; } 

echo "<div id='fgact'><form action='fne3.php' method='post' name='spi'><textarea rows=10 cols=10 name='spriteact'></textarea><input type='text' value='$tit' name='titlez' /><br />name<br /><input type='text' name='spname' value=' ' /><br />id<br /><input type='text' name='spid' value=' ' /><input type='submit' name='tt' value='action script' /></form><form action='soundaad.php' method ='post' name='rso'>Soundfile<br /><input type='text' name='soundfile' /><br />Sound Name<br /><input type='text' name='soundname' /><br />hrtz<input type='text' name='hrtz' /><br />Bits<br /><input type='text' name='bits' /><br /><select name='stmo'><option value='stereo'>Stereo</option><option value='mono'>Mono</option></select><input type='text' name='soundid' value=' ' />title<input type='text' value='$tit' name='titlez' /><input type='submit' name='adsu' value='attach sound' /></form></div>";
?>

<?php
if(isset($_POST['titlename']) ) { 
$titlen = $_POST['titlename'];
$hn = $_POST['height'];
$wn = $_POST['width']; } 
else { 
$titlen = $_GET['titlename'];
$tit = substr($titlen,0,- 4);

$hn = $_GET['height'];
$wn = $_GET['width']; } 

echo "<div id='fg1'>";
$file = "rgb1.txt";
$dd = file($file);
$ww = array_chunk($dd, 6);
foreach($ww as $qq) { 
$vv = array_pop($qq);
$nao = trim($qq[2]) . ', ' . trim($qq[3]) . ', ' . trim($qq[4]); 
echo "<div id='fg2'><i style='background-color:$qq[1];width:60px;color:$qq[1];padding:5px;' id='$nao' onclick='pp(this.id);'>x</i></div>"; } 
echo "</div>";



echo "<div id='fgs'>";
$file = "rgb1.txt";
$dd = file($file);
$ww = array_chunk($dd, 6);
foreach($ww as $qq) { 
$vv = array_pop($qq);
$nao = trim($qq[2]) . ', ' . trim($qq[3]) . ', ' . trim($qq[4]); 
echo "<div id='fg2'><i style='background-color:$qq[1];width:60px;color:$qq[1];padding:5px;' id='$nao' onclick='pp2(this.id);'>x</i></div>"; } 
echo "</div>";



echo "<div id='fgline'>";
$file = "rgb1.txt";
$dd = file($file);
$ww = array_chunk($dd, 6);
foreach($ww as $qq) { 
$vv = array_pop($qq);
$nao = trim($qq[2]) . ', ' . trim($qq[3]) . ', ' . trim($qq[4]); 
echo "<div id='fg2'><i style='background-color:$qq[1];width:60px;color:$qq[1];padding:5px;' id='$nao' onclick='pp1(this.id);'>x</i></div>"; } 
echo "</div>";


echo "<div id='fglinecolor'>";
$file = "rgb1.txt";
$dd = file($file);
$ww = array_chunk($dd, 6);
foreach($ww as $qq) { 
$vv = array_pop($qq);
$nao = trim($qq[2]) . ', ' . trim($qq[3]) . ', ' . trim($qq[4]); 
echo "<div id='fg2'><i style='background-color:$qq[1];width:60px;color:$qq[1];padding:5px;' id='$nao' onclick='pp3(this.id);'>x</i></div>"; } 
echo "</div>";




echo "<div id='fgtex'>";
$file = "rgb1.txt";
$dd = file($file);
$ww = array_chunk($dd, 6);
foreach($ww as $qq) { 
$vv = array_pop($qq);
$nao = trim($qq[2]) . ', ' . trim($qq[3]) . ', ' . trim($qq[4]); 
echo "<div id='fg2'><i style='background-color:$qq[1];width:60px;color:$qq[1];padding:5px;' id='$nao' onclick='pptex(this.id);'>x</i></div>"; } 
echo "</div>";



//sq($lw,$lc1,$lc2,$lc3,$c1,$c2,$c3,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8)
echo "<div id='fgz1'>";
echo "<ledgend onclick='sh();'>Background Colour<ledgend><br />";

echo "<div id='f3'><form action='fne3.php' method='post' name='cc'><ledgend>Circle</ledgend><input type='hidden' name='name' value='circl' /><br /><ledgend>Size</ledgend><br /><input type='text' name='size' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><ledgend>Position x</ledgend><br /><input type='text' name='posx' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><ledgend>Position y</ledgend><br /><input type='text' name='posy' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br />Type<br /><select name='typec' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' ><br />
<option value='item'>Item</option>
<option value='sprite'>Sprite</option>
<option value='button'>Button</option></select><br />Sprite Name<br /><input type='text' name='spritename' value='none' style='height:20;width:50;color:white;background-color:blue;font-size:10px;'/><br />
<input type='text' name='bgc' value=' ' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' />
<input type='hidden' name='titlez' value='$tit' />
<input type='hidden' name='height' value='$hn' />
<input type='hidden' name='width' value='$wn' /><br />
<input type='submit' name='circ' value='submit' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /></form></div></div>";

echo "<div id='fgz2'>";
echo "<ledgend onclick='sh2();'>Background Colour<ledgend><br />";

echo "<form action='fne3.php' method='post' name='ssq'><ledgend>Square</ledgend><input type='hidden' name='name' value='sq' /><br /><ledgend>Line width</ledgend><br />
<input type='radio' value='1' name='lsize' onclick='lsi2(this.value);'/><img src='line1.png' /><br />
<input type='radio' value='2' name='lsize'  onclick='lsi2(this.value);'/><img src='line2.png' /><br />
<input type='radio' value='3' name='lsize'  onclick='lsi2(this.value);'/><img src='line3.png' /><br />
<input type='radio' value='4' name='lsize'  onclick='lsi2(this.value);'/><img src='line4.png' /><br />
<input type='radio' value='5' name='lsize'  onclick='lsi2(this.value);'/><img src='line5.png' /><br />
<input type='text' name='lw' value=' ' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br />
<ledgend onclick='sh1();'>Line color</ledgend><br /><input type='text' name='lc' value=' ' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><input type='BUTTON' name='save' value='save' onclick='c();' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br />
<ledgend>Position 1</ledgend><br /><input type='text' name='pos1' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><ledgend>Position 2</ledgend><br /><input type='text' name='pos2' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><ledgend>Size</ledgend><br /><input type='text' name='size' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br />
Type<br /><select name='type' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' >
<option value='item'>Item</option>
<option value='sprite'>Sprite</option>
<option value='button'>Button</option></select><br />Sprite Name<input type='text' name='spritename' value='none' style='height:20;width:50;color:white;background-color:blue;font-size:10px;'/><br />
bg<input type='text' name='bg1' value=' ' style='height:20;width:50;color:white;background-color:blue;font-size:10px;'/>
<input type='hidden' name='titlez' value='$tit' />
<input type='hidden' name='height' value='$hn' />
<input type='hidden' name='width' value='$wn' />
<input type='submit' name='sq' value='submit' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /></form></div>";

echo "<div id='fgzline'>";
echo "<ledgend onclick='shline();'>Background Colour<ledgend><br />";
echo "<form method='post' action='fne3.php' name='lines'><ledgend>Size</ledgend><br />
<input type='radio' value='1' onclick='lsi(this.value);'/><img src='line1.png' /><br />
<input type='radio' value='2' onclick='lsi(this.value);'/><img src='line2.png' /><br />
<input type='radio' value='3'  onclick='lsi(this.value);'/><img src='line3.png' /><br />
<input type='radio' value='4'  onclick='lsi(this.value);'/><img src='line4.png' /><br />
<input type='radio' value='5'  onclick='lsi(this.value);'/><img src='line5.png' /><br />
<input type='text' name='linesize' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br />
<input type='text' name='bg3' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' />
<br /><ledgend>Line beginning</ledgend><br />
<input type='text' name='poshx' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><ledgend>Line end</ledgend><br />
<input type='text' name='poshy' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' />
<br />
<br /><ledgend>Pos x</ledgend><br />
<input type='text' name='posix' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><ledgend>Pos y</ledgend><br />
<input type='text' name='posiy' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' />
<br />
Type<br /><select name='typeline' style='height:20;width:50;color:white;background-color:blue;font-size:10px;'>
<option value='item'>Item</option>
<option value='sprite'>Sprite</option>
<option value='button'>Button</option></select><br />Sprite Name<br /><input type='text' name='spritename' value='none' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /><br /><input type='hidden' name='titlez' value='$tit' />
<input type='hidden' name='height' value='$hn' />
<input type='hidden' name='width' value='$wn' /><br />
<input type='hidden' name='nameline' value='liner' /><br />
<input type='submit' name='linesn' value='submit' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /> 
</form>";

echo "</div>";





?>

<?php
echo "<div id='ope'>";
include "config.php";
$q = "SELECT * FROM movv2";
$res = sqlite_query($db,$q);
echo "<form action='fne3.php' method='post'>";
echo "<select name='titlez'>";
while ($row = sqlite_fetch_object($res) ) { 
echo "<option value='$row->title'>$row->title</option>"; } 
echo "</select>";
echo "<br /><input type='submit' value='open' name='open'></form></div>";


echo "<div id='ope1'><form enctype='multipart/form-data' action='fne3.php' method='post'>
<input type='hidden' name='MAX_FILE_SIZE' value='30000' />
Import this file <input name='userfile' type='file' />
<br /><ledgend>Pos x</ledgend><br />
<input type='text' name='posix' /><br /><ledgend>Pos y</ledgend><br />
<input type='text' name='posiy' />
<br />
Type<br /><select name='typeline'>
<option value='item'>Item</option>
<option value='sprite'>Sprite</option>
<option value='button'>Button</option></select><br />Sprite Name<input type='text' name='spritename' value='none' /><br />

tit<input type='text' name='titlez' value='$tit' />
h<input type='text' name='height' value='$hn' />
w<input type='text' name='width' value='$wn' /><br />

<input type='submit' value='Import File' name='upload' />
</form></div>";



echo "<div id='fgztex'>
<ledgend onclick='shtex();'>Background Colour<ledgend><br />
<form name='textform' action='fne3.php' method='post'>
<ledgend>Name<br /></ledgend><input type='text' name='nametex' value='tex' style='height:20;width:30;' /><br />
<ledgend>Font</ledgend><br /><select name='font'>
<option value='Bitstream Vera Sans Mono.fdb'>Sans Mono</option>
<option value='Bitstream Vera Sans.fdb'>Sans</option>
<option value='AnkeCalligraph.ttf'>AnkeCalligraph</option>
<option value='Brushed.ttf'>Brushed</option>
<option value='13_Misa.ttf'>13 Misa</option>
</select><br />
<ledgend>String</ledgend><br />
<textarea name='string' cols='5' rows='10'></textarea><BR />
<ledgend>Position x</ledgend><br /><input type='text' name='postexx' style='height:20;width:30;' /><br />
<ledgend>Position y</ledgend><br /><input type='text' name='postexy' style='height:20;width:30;' /><br />
bg<br /><input type='text' name='bgtex' value=' ' style='height:20;width:30;' /><br />
<ledgend>Height</ledgend><br /><input type='text' name='hgtex' value=' ' style='height:20;width:30;' /><br />
Type<br /><select name='typetex'>
<option value='item'>Item</option>
<option value='sprite'>Sprite</option>
<option value='button'>Button</option></select><br />Sprite Name<br /><input type='text' name='spritenametex' value='none' style='height:20;width:50;' /><br />
<input type='hidden' name='titlez' value='$tit' /><br />
<input type='hidden' name='height' value='$hn' /><br />
<input type='hidden' name='width' value='$wn' /><br />
<input type='submit' name='textsub' value='addtext' style='height:20;width:50;color:white;background-color:blue;'/></form></div>";


echo "<div id='fgzact'><form action='fne3.php' method='post' name='actt'>
<ledgend>Number of Frames</ledgend><br />";
include "config.php";
$qxfn = "SELECT * FROM movv2 WHERE title = '$tit'";
$rexfn = sqlite_query($db, $qxfn);
while($roxfn = sqlite_fetch_object($rexfn) ) { 
$framno = intval($roxfn->otm3); }   
echo "<input type='text' name='framesnum' value='$framno'  /><br />"; 
echo "<ledgend>Move</ledgend><br />
<ledgend>Move x</ledgend><br />
<input type='text' name='movex' style='height:20;width:30;' /><br /> 
<ledgend>Move y</ledgend><br />
<input type='text' name='movey' style='height:20;width:30;' /><br />
<ledgend>Rotate</ledgend><br />
<ledgend>Degrees</ledgend><br />
<input type='text' name='rotate' style='height:20;width:30;' /><br />
<ledgend>Scale</ledgend><br />
<ledgend>Scale x</ledgend><br />
<input type='text' name='scalex' value='1.0' style='height:20;width:30;' /><br />
<ledgend>Scale y</ledgend><br />
<input type='text' name='scaley' value='1.0' style='height:20;width:30;' /><br />
<input type='text' name='ele' value=' ' style='height:20;width:30;' /><br />
<input type='text' name='titlez' value='$tit' />
<input type='hidden' name='height' value='$hn' />
<input type='hidden' name='width' value='$wn' />

<input type='submit' name='actionsubmit' value='Create' style='height:20;width:50;color:white;background-color:blue;font-size:10px;' /></form></div>";  

?>
<?php

echo "<div id='sw'><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' ID='objects' WIDTH=$wn HEIGHT=$hn><PARAM NAME=movie VALUE='$titlen'><EMBED src='$titlen' ID='po' WIDTH=$wn HEIGHT=$hn TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></OBJECT></div>";
echo "$title";
echo "$titlename";
echo "$titlen";
?>
</code>
processor
<code>

<?php
include "lib.php";
include "config.php";
if(isset($_POST['titlename']) ) { 
$title = trim($_POST['titlename']);
$titlen = "$title" . '.swf';

$h = trim($_POST[h]);
$w = trim($_POST[w]);
$bg = trim($_POST[bg]);
$rr = explode(',', $bg); 
$c1 = $rr[0];
$c2 = $rr[1];
$c3 = $rr[2];
$rate = $_POST['framerate'];
$mscale = $_POST['mscale'];
$framno = $_POST['framenum'];


$v = $_POST['version'];

include "config.php";
$q = "INSERT INTO movv2(title, h, w, c1, c2, c3, otm1, otm2, otm3, otm4) values('$title', '$h', '$w', '$c1', '$c2', '$c3', '$rate', '$mscale', '$framno', '$v')";
$res = sqlite_query($db, $q);
if (!$res) die("Could not insert it's somebody else's fault");

$qx = "SELECT * FROM movv2 WHERE title = '$title'";
$rex = sqlite_query($db, $qx);
while($rox = sqlite_fetch_object($rex) ) { 
$titlen = "$rox->title" . '.swf';
$hn = trim($rox->h);
$wn = trim($rox->w);
$c1n = trim($rox->c1);
$c2n = trim($rox->c2);
$c3n = trim($rox->c3);
$v = $rox->otm4;

$rate = $rox->otm1;
$scale = $rox->otm2;
 } 

$movie = newmovie($hn,$wn,$c1n,$c2n,$c3n,$v,$rate,$scale); } 
else { 
$titleb = $_POST['titlez'];
$te = array();
$texp = array();
$ty = array();
$imgp = array();
$ly = array();
$sy = array();

 
include "config.php";
$qt = "SELECT * FROM movv2 WHERE title = '$titleb'";
$rese = sqlite_query($db, $qt);
while($r = sqlite_fetch_object($rese) ) { 
$titlen = "$r->title" . '.swf';
$hn = trim($r->h);
$wn = trim($r->w);
$c1n = trim($r->c1);
$c2n = trim($r->c2);
$c3n = trim($r->c3);
$v = trim($r->otm4);
$rate = trim($r->otm1);
$scale = trim($r->otm2);
$movie = newmovie($hn,$wn,$c1n,$c2n,$c3n,$v,$rate,$scale); } 
$titleb = $_POST['titlez'];



$rwq = "SELECT * FROM func4 WHERE titlename = '$titleb' AND type = 'img'";
$rwres = sqlite_query($db, $rwq);
while ($tr = sqlite_fetch_object($rwres) ) { 
$fileimg = $tr->ent;
$imgimg = addimg($fileimg);
$pos1img = $tr->px;
$pos2img = $tr->py;
$typeimg1 = $tr->ifadd;
$spr = $tr->ot1;
if($typeimg1 == 'item') { 
$imgp[] =additem($movie,$imgimg,$pos1img,$pos2img); } 
else if($typeimg1 =='sprite') { 
$u = sprite($imgimg);
addsprite($movie,$u,$spr,$pos1img,$pos2img); } 
else if($typeimg1 == 'button') { 
$d1v =but($imgimg);
$mm[] =additem($movie,$d1v,$pos1img,$pos2img); 
}
array_push($te, $imgp); } 



$rwqtex = "SELECT * FROM func4 WHERE titlename = '$titleb' AND type = 'tex'";
$rwrestex = sqlite_query($db, $rwqtex);
while ($trtex = sqlite_fetch_object($rwrestex) ) { 
$titleb = trim($trtex->titlename); 
$typetex = $trtex->type;
$fonttex = trim($trtex->ent1);
$font = $fonttex;
$postexx = $trtex->px;
$postexy = $trtex->py;
$stringtex = $trtex->ent3;
$addiftex = $trtex->ifadd;
$spritenametex = $trtex->ot1;
$texcolor = $trtex->ent;
$bgtexc = trim($texcolor);
$rrtex = explode(',', $bgtexc); 
$c1tex = intval($rrtex[0]);
$c2tex = intval($rrtex[1]);
$c3tex = intval($rrtex[2]);
$fheight = intval($trtex->ent2);
$tex = tex($font,$c1tex,$c2tex,$c3tex,$fheight,$stringtex);
if($addiftex == 'item') { 
$texp[] =additem($movie,$tex,$postexx,$postexy); } 
else if($addiftex =='sprite') { 
addsprite($movie,$tex,$spritenametex,$postexx,$postexy); } 
else if($addiftex == 'button') { 
$d1 =but($tex);
additem($movie,$d1,$postexx,$postexy); }  } 



$qe = "SELECT * FROM func4 WHERE titlename = '$titleb' AND type = 'sq'";
$re = sqlite_query($db,$qe);
while($ro = sqlite_fetch_object($re) ) { 
$sound = trim($ro->ent5);
$soundfile = trim($ro->ent6);
$soundname = trim($ro->ent7);
$type2 = $ro->ifadd;
$ent = $ro->ent;
$ent1 = intval($ro->ent1);
$ent2 = $ro->ent2;
$ent3 = $ro->ent3;
$type = $ro->type;
$sqqpx = $ro->px;
$sqqpy = $ro->py;
$ot1 = trim($ro->ot1);
$rr = explode(',', $ent); 
$sqc1 = intval(trim($rr[0]));
$sqc2 = intval($rr[1]);
$sqc3 = intval($rr[2]);

$rrline = explode(',', $ent2); 
$sqlc1 = intval($rrline[0]);
$sqlc2 = intval($rrline[1]);
$sqlc3 = intval($rrline[2]);
$p1 = $ent1;
$p2 = $ent1 - $ent1;
$p3 = $ent1 - $ent1;
$p4 = $ent1;
$p5 = $ent1 - ($ent1 * 2);
$p6 = $ent1 - $ent1;
$p7 = $ent1 - $ent1;
$p8 = $ent1 - ($ent1 * 2);  
//sq($lw,$lc1,$lc2,$lc3,$c1,$c2,$c3,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8)
$sq =sq($ent3,$sqlc1,$sqlc2,$sqlc3,$sqc1,$sqc2,$sqc3,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8);  


if($type2 == 'item') { 
$ty[] =additem($movie,$sq,$sqqpx,$sqqpy);  } 
else if($type2 == 'sprite' && $sound == 'sound') { 
$soundobject = nsound($soundfile);
$sp = new SWFSprite();
$f1 = $sp->add($sq);
$soundinstance=$sp->startSound($soundobject);
$soundinstance->loopCount(1);
$sp->nextFrame();

$ty[] = $movie->add($sp);
$ty[] = $f1->setName($soundname);
$ty[] = $f1->moveTo($sqqpx,$sqqpy); 
 } 

else if ($type2 == 'sprite' && $sound != 'sound') { 
$sp = sprite($sq);
$ty[] =addsprite($movie,$sp,$ot1,$sqqpx,$sqqpy); }  
else if($type2 == 'button') { 
$d1 =but($sq);
additem($movie,$d1,$sqqpx,$sqqpy);
 } } 


 
   



$titleb = $_POST['titlez'];
$rq = "SELECT * FROM func4 WHERE titlename = '$titleb' AND type = 'circl'";
$rres = sqlite_query($db, $rq);
while ($rro = sqlite_fetch_object($rres) ) { 
$iid = $rro->id;

$posxx = intval(trim($rro->px) );
$posyy = intval(trim($rro->py));
$type20 = $rro->ifadd;
$rtype = $rro->type;
$circlecolour = trim($rro->ent);
$rrv = explode(',', $circlecolour); 
$circle1 = intval(trim($rrv[0]) );
$circle2 = intval(trim($rrv[1]));
$circle3 = intval(trim($rrv[2]));
$circlesize = intval($rro->ent1);
$spritename = $rro->ot1;
$circlen = circ($circle1,$circle2,$circle3,$circlesize);
$sp = sprite($circlen); 
if($type20 == 'item') { 
$ite =additem($movie,$circlen,$posxx,$posyy);
include "config.php";
$ffq = "SELECT * FROM func4 WHERE ent15 = '$iid'";
$ffres = sqlite_query($db, $ffq);
if(sqlite_num_rows($ffres) > 0) { 
while ($ffrow = sqlite_fetch_object($ffres) ) { 
$moveTox = $ffrow->ent6;
$moveToy = $ffrow->ent7;
$Red = $ffrow->ent8;
$Green = $ffrow->ent9;
$Blue = $ffrow->ent10;
$Alpha = $ffrow->ent11;
$setDepth = $ffrow->ent12;
$rotateitem = $ffrow->ent13;
$scalex = $ffrow->ot3;
$scaley = $ffrow->ot4;
$skewx = $ffrow->ot5;
$skewy = $ffrow->ot6;
echo " mx $moveTox, my $moveToy, r $Red, g $Green, b $Blue, a $Alpha, d $setDepth, r $rotateitem, sx $scalex, sy $scaley, $skewx, $skewy";

 } 

$sy[] = orient($ite, $moveTox, $moveToy, $Red, $Green, $Blue, $Alpha, $setDepth, $rotateitem, $scalex, $scaley, $skewx, $skewy); } else { 
$sy[] = additem($movie,$circlen,$posxx,$posyy); }  

 } 
else if($type20 =='sprite') { 

addsprite($movie,$sp,$spritename,$posxx,$posyy); } 
else if($type20 == 'button') { 
$d =but($circlen);
additem($movie,$d,$posxx,$posyy); } } 


$titleb = $_POST['titlez'];
$rqli = "SELECT * FROM func4 WHERE titlename = '$titleb' AND type = 'liner'";
$rresli = sqlite_query($db, $rqli);
while ($rrl = sqlite_fetch_object($rresli) ) { 
$posxx = intval(trim($rrl->px) );
$posyy = intval(trim($rrl->py));
$type207 = $rrl->ifadd;
$rtype = $rrl->type;
$linecolour = trim($rrl->ent);
$rrvl = explode(',', $linecolour); 
$li1 = intval(trim($rrvl[0]) );
$li2 = intval(trim($rrvl[1]));
$li3 = intval(trim($rrvl[2]));
$linesize = intval($rrl->ent1);
$p1h = intval(trim($rrl->ent2) );
$p2h = intval(trim($rrl->ent3) );
$lik = lin($linesizel,$li1,$li2,$li3,$p1h,$p2h);
$spritenamel = $rrl->ot1; 
if($type207 == 'item') { 
$ly[] =additem($movie,$lik,$posxx,$posyy); } 
else if($type207 =='sprite') { 
$lkh = sprite($lik);
addsprite($movie,$lkh,$spritenamel,$posxx,$posyy); } 
else if($type207 == 'button') { 
$dl =but($lik);
additem($movie,$dl,$posxx,$posyy); }  } 




if(isset($_POST['linesn'])  ) { 
$linesizel = $_POST['linesize'];
$linecolourl = $_POST['bg3'];
$ee = explode(',', $linecolourl);
$lcv1 = intval(trim($ee[0]) );
$lcv2 = intval(trim($ee[1]) );
$lcv3 = intval(trim($ee[2]) );
$p1h = intval(trim($_POST['poshx']) );
$p2h = intval(trim($_POST['poshy']) );
$posxi = intval(trim($_POST['posix']) );
$posyi = intval(trim($_POST['posiy']) );
$typeline = $_POST['nameline'];
$addifline = $_POST['typeline'];
$spritename = $_POST['spritename'];
$line = lin($linesizel,$lcv1,$lcv2,$lcv3,$p1h,$p2h);
if($addifline == 'item') { 
$ly[] =additem($movie,$line,$posxi,$posyi); } 
else if($addidline =='sprite') { 
$lkh = sprite($line);
addsprite($movie,$lkh,$spritename,$posxi,$posyi); } 
else if($addifline == 'button') { 
$d1 =but($line);
additem($movie,$d1,$posxi,$posyi); }  
 
$wq = "INSERT INTO func4(titlename, ent, ent1, ent2, ent3, ifadd, type, px, py, ot1) values('$titleb', '$linecolourl', '$linesizel', '$p1h', '$p2h', '$addifline', '$typeline', '$posxi', '$posyi', '$spritename')";
$wres = sqlite_query($db, $wq); } 

 


if(isset($_POST['sq']) ) { 




$titleb = trim($_POST['titlez']);


$name1 = $_POST['name'];
$linesize = $_POST['lsize'];
$sqlcolor = $_POST['lc'];
$sqsize = $_POST['size'];
$posx1 = $_POST['pos1'];
$posy1 = $_POST['pos2'];
$addif1 = $_POST['type'];
$sqbgcolor = $_POST['bg1'];
$type1 = $_POST['type'];
$spritename = $_POST['spritename'];
$q = "INSERT INTO func4(titlename, type, ent, ent1, ent2, ent3, ifadd, px, py, ot1) values('$titleb', '$name1', '$sqbgcolor', '$sqsize', '$sqlcolor', '$linesize', '$type1', '$posx1', '$posy1', '$spritename')";

$res = sqlite_query($db,$q);

$qe = "SELECT * FROM func4 WHERE titlename = '$titleb' AND type ='sq' ORDER BY id DESC LIMIT 1";
$re = sqlite_query($db,$qe);
while($ro = sqlite_fetch_object($re) ) { 
$titlen = "$ro->titlename" . '.swf';
$type2 = $ro->ifadd;
$ent = $ro->ent;
$ent1 = $ro->ent1;
$ent2 = $ro->ent2;
$ent3 = $ro->ent3;
$ifadd = $ro->ifadd;
$sqqpx = $ro->px;
$sqqpy = $ro->py;
$ot1 = $ro->ot1;
$rr = explode(',', $ent); 
$sqc1 = trim($rr[0]);
$sqc2 = trim($rr[1]);
$sqc3 = trim($rr[2]);

$rrline = explode(',', $ent2); 
$sqlc1 = trim($rrline[0]);
$sqlc2 = trim($rrline[1]);
$sqlc3 = trim($rrline[2]);
$p1 = $ent1;
$p2 = $ent1 - $ent1;
$p3 = $ent1 - $ent1;
$p4 = $ent1;
$p5 = $ent1 - ($ent1 * 2);
$p6 = $ent1 - $ent1;
$p7 = $ent1 - $ent1;
$p8 = $ent1 - ($ent1 * 2);
$sq =sq($ent3,$sqlc1,$sqlc2,$sqlc3,$sqc1,$sqc2,$sqc3,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8);

if($type2 == 'item') { 
$ty[] =additem($movie,$sq,$sqqpx,$sqqpy); } 
else if($type2 == 'sprite') {  
$vv = sprite($sq);
$ty[] =addsprite($movie,$vv,$ot1,$sqqpx,$sqqpy); } 
else if($type2 == 'button') { 
$d1 =but($sq);
additem($movie,$d1,$sqqpx,$sqqpy); }   
else { }   } 
 } 


if(isset($_POST['upload']))
{
$titleb = $_POST['titlez'];
$imgname = 'img';
$typeimg = $_POST['typeline'];
$spritename = $_POST['spritename'];
$fileName = $_FILES['userfile'] ['name'];
$tmpName = $_FILES['userfile'] ['tmp_name'];
$fileSize = $_FILES['userfile'] ['size'];
$fp = fopen($tmpName, 'r');
$content = fread($fp, $fileSize);
$content = addslashes($content);
fclose($fp);
$picture = str_replace(' ', '_', $tmpName);
$source = $picture;
$target = 'pic/' . $fileName;
move_uploaded_file( $source, $target );

$file = $target;
$img = addimg($file);
$pos1 = $_POST[posix];
$pos2 = $_POST[posiy];
$lq = "INSERT INTO func4(titlename, type, ent, px, py, ifadd, ot1) values('$titleb', '$imgname', '$target', '$pos1', '$pos2', '$typeimg', '$spritename')";
$lres = sqlite_query($db, $lq);
if($typeimg == 'item') { 
$imgp[] =additem($movie,$img,$pos1,$pos2); } 
else if($typeimg =='sprite') { 
$u = sprite($img);
addsprite($movie,$u,$spritename,$pos1,$pos2); } 
else if($typeimg == 'button') { 
$d1b =but($img);
$imgp[] =additem($movie,$d1b,$pos1,$pos2); } 
} 




if(isset($_POST['circ']) ) { 
$titleb = trim($_POST['titlez']);
$titlen = $titleb . '.swf';
include "config.php";
$ccolor = $_POST['bgc'];
$typec = $_POST['typec'];
$csize = $_POST['size'];
$titlenz = $_POST['titlez'];
$name = $_POST['name'];
$posx = $_POST['posx'];
$posy = $_POST['posy'];
include "config.php";
$rr = explode(',', $ccolor); 
$c1 = trim($rr[0]);
$c2 = trim($rr[1]);
$c3 = trim($rr[2]);
$spritename = $_POST['spritename'];
$q = "INSERT INTO func4(titlename, type, ent, ent1, ifadd, px, py, ot1) values('$titleb', '$name', '$ccolor', '$csize', '$typec', '$posx', '$posy', '$spritename')";
$res = sqlite_query($db,$q);
$rq = "SELECT * FROM func4 WHERE titlename = '$titleb' AND type = 'circl' ORDER BY id DESC LIMIT 1";
$rres = sqlite_query($db, $rq);
while ($rro = sqlite_fetch_object($rres) ) { 
$circlecolour = trim($rro->ent);
$rr = explode(',', $circlecolour); 
$circle1 = trim($rr[0]);
$circle2 = trim($rr[1]);
$circle3 = trim($rr[2]);
$circlesize = trim($rro->ent1);
$spritename = $rro->ot1;
$circle = circ($circle1,$circle2,$circle3,$circlesize); 
if($typec == 'item') { 
$sy[] =additem($movie,$circle,$posx,$posy); } 
else if($typec =='sprite') { 
$cds = sprite($circle);
addsprite($movie,$cds,$spritename,$posx,$posy); } 
else if($typec == 'button') { 
$d =but($circle);
additem($movie,$d,$posx,$posy); } 
else { }   
 } }  
if(isset($_POST['textsub']) ) { 
$titleb = $_POST['titlez']; 
$typetex = $_POST['nametex'];
$fonttex = trim($_POST['font']);

$postexx = $_POST['postexx'];
$postexy = $_POST['postexy'];
$stringtex = $_POST['string'];
$addiftex = $_POST['typetex'];
$spritenametex = $_POST['spritenametex'];
$texcolor = $_POST['bgtex'];
$bgtexc = trim($texcolor);
$rrtex = explode(',', $bgtexc); 
$c1tex = intval($rrtex[0]);
$c2tex = intval($rrtex[1]);
$c3tex = intval($rrtex[2]);
$fheight = $_POST['hgtex'];
$tex = tex($fonttex,$c1tex,$c2tex,$c3tex,$fheight,$stringtex);
$qtex = "INSERT INTO func4(titlename, type, ent, ent1, ent2, ent3, ifadd, px, py, ot1) values('$titleb', '$typetex', '$bgtexc', '$fonttex', '$fheight', '$stringtex', '$addiftex', '$postexx', '$postexy', '$spritenametex')";
$restex = sqlite_query($db, $qtex);

if($addiftex == 'item') { 
$texp[] =additem($movie,$tex,$postexx,$postexy); } 
else if($addiftex =='sprite') { 
$rtg = sprite($tex);
addsprite($movie,$rtg,$spritenametex,$postexx,$postexy); } 
else if($addiftex == 'button') { 
$d1 =but($tex);
additem($movie,$d1,$postexx,$postexy); }  } } 


    
if(isset($_POST['actionsubmit']) ) { 
$id = trim($_POST['ele']);
$qs = "SELECT type, ent16 FROM func4 WHERE id = '$id'";
$re = sqlite_query($db,$qs);
while ($rr = sqlite_fetch_object($re) ) { 
$elem = trim($rr->type);  } 
$titleb = $_POST['titlez'];
$qsb = "SELECT * FROM func4 WHERE type = '$elem' AND titlename = '$titleb'";
$reb = sqlite_query($db,$qsb);
while ($rrb = sqlite_fetch_object($reb) ) { 
$nn[] = $rrb->id; } 
$arno = array_search($id, $nn); 
$te = array($texp , $ty, $sy, $imgp);
$framenum = intval(trim($_POST['framesnum']) );
$titleb = $_POST['titlez'];
$id = trim($_POST['ele']);
$movie->nextFrame();
$xf = intval(trim($_POST['movex']) );
$yf = intval(trim($_POST['movey']) );
$deg = intval(trim($_POST['rotate']) );
$scalex = $_POST['scalex'];
$scaley = $_POST['scaley'];
for($t=0;$t<$framenum;$t++) { 
$qact = "INSERT INTO func4(ent14, ent15, ent16, ot2, ot3, ot4, ot5, ot6, ot7, ot8, ot9) VALUES('$titleb', '$t', '$arno', 'mov', '$xf', '$yf', '$deg', '$scalex', '$scaley', '$elem', '$id')"; 
$resact = sqlite_query($db, $qact);
if (!$resact) die("Could not insert action table it's somebody else's fault"); }  }  

$te = array($texp, $ty, $sy, $imgp, $ly);

$titleb = $_POST['titlez'];
$qxfn = "SELECT * FROM movv2 WHERE title = '$titleb'";
$rexfn = sqlite_query($db, $qxfn);
while($roxfn = sqlite_fetch_object($rexfn) ) { 
$framno = intval($roxfn->otm3); } 


$allmov1 = "SELECT ent15 FROM func4 WHERE ot2 = 'mov' AND ent14 = '$titleb' LIMIT $framno";
$resallmov1 = sqlite_query($db, $allmov1);
if (!$resallmov1) die("Could not create table it's somebody else's fault");

while ($movr1 = sqlite_fetch_object($resallmov1) ) { 

$framenum = $movr1->ent15; 
echo "frame no $framenum"; 
$movie->nextFrame();  
  

//523
$allmov = "SELECT * FROM func4 WHERE ot2 = 'mov' AND ent14 = '$titleb' AND ent15 = '$framenum'";
$resallmov = sqlite_query($db, $allmov);
if (!$resallmov) die("Could not create table it's somebody else's fault");

while ($movr = sqlite_fetch_object($resallmov) ) { 


$xf = (intval($movr->ot3 ));
$yf = (intval($movr->ot4) );
$deg = (intval($movr->ot5) );
$scalex = ($movr->ot6);
$scaley = ($movr->ot7);
$arno = ($movr->ent16);
$elem = $movr->ot8; 

if ($elem == 'tex') { 
acton($te[0][$arno],$xf,$yf,$deg,$scalex,$scaley); }  
if ($elem == 'sq') { 
acton($te[1][$arno],$xf,$yf,$deg,$scalex,$scaley); } 
else if ($elem == 'circl') { 
acton($te[2][$arno],$xf,$yf,$deg,$scalex,$scaley); } 
else if ($elem == 'liner') { 
acton($te[4][$arno],$xf,$yf,$deg,$scalex,$scaley); }    
else if ($elem == 'img') { 
acton($te[3][$arno],$xf,$yf,$deg,$scalex,$scaley); } 
 
 }  } 
    
  
if (isset($_POST['tt']) ) { 
$spa = $_POST['spriteact'];
$mo = $_POST['titlez'];
$spname = $_POST['spname'];
$spid = $_POST['spid'];
echo "$spa";
$filename = $mo . $spname;
$fi = $filename . '.txt';
$fp = fopen($fi, "w");
fwrite($fp, $spa);
$ffp = fopen($fi, "r");
$spriteact = fread($ffp, filesize($fi));
$spq = "UPDATE func4 SET ent11 = '$fi' WHERE id = '$spid'";
$spres = sqlite_query($db, $spq);
 
$actsp =<<<EOT
$spriteact;
EOT;
$movie->add(new SWFAction($actsp)); } 

$titleb = $_POST['titlez'];
echo "title $titleb";
$spd = "SELECT * FROM func4 WHERE titlename = '$titleb' AND ifadd = 'sprite' AND ent11 !=' '";
$spdres = sqlite_query($db, $spd);
if(sqlite_num_rows($spdres) > 0) { 
while($sprow = sqlite_fetch_object($spdres) ) { 
$filename = $sprow->ent11;
echo "filename $filename<br />";
$ffp = fopen($filename, "r");
$spriteact = fread($ffp, filesize($filename));
$actsp =<<<EOT
$spriteact;
EOT;
$movie->add(new SWFAction($actsp)); } }






$movie->save("$titlen", 9);
echo "frame no $frameno";
echo " mx $moveTox, my $moveToy, r $Red, g $Green, b $Blue, a $Alpha, d $setDepth, r $rotateitem, sx $scalex, sy $scaley, $skewx, $skewy"; 
?>

<script>
var title = "<?php echo $titlen;?>";
var height = "<?php echo $hn;?>";
var width = "<?php echo $wn;?>";
document.location = "ed.php?titlename="+title+"&&width="+width+"&&height="+height;
</script>





thers a lot more to it but thats the general gist, if u want more just ask....
as for rect.....whatever, i think its in there somewhere...

Edited by macosxnerd101: Please use BBCode for code tags, NOT XML. :code:.

ps check out gazbming.com
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1