Help programming MING on PHP, please!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Help programming MING on PHP, please!

Postby uniquekaiser » 19. October 2009 21:02

Hi!

I've been trying to code a php page with the following features:

-One text box for "title"
-One text box for "body"
-One "browse" option for "image"

After filling "title", "body" and "image" clicking "Go Button" will generate (on the same page) a SWF file with "background" (a pre-defined image), "title", "Body" and "image" on given positions.

So far I tried using the http://www.gazbming.com/ and included XAMPP examples with no success (I think is because of my poor PHP understanding :P)

If anyone could help me i would be extremely thankful!!!

Cheers!

PS: XAMPP is a great tool!
Last edited by uniquekaiser on 19. October 2009 23:48, edited 1 time in total.
uniquekaiser
 
Posts: 2
Joined: 19. October 2009 20:54

Re: Help programming MING on PHP, please!

Postby uniquekaiser » 19. October 2009 23:47

Ok,

I've made some advances... i have managed to load the two images (from png files) adn add the two Texts that i wanted..

What i still haven't figured out how to do, is how to use a "Texto Box" as input for "Title", a "Text Area" to input the "Body" and a browse option to select the image..

The code of what i have accomplished so far is:

Code: Select all
<html>
<body>

<?php


$myFont = new SWFFont(dirname(__FILE__).'/impact.ttf');
$myMovie=new SWFMovie();
$myMovie->setDimension(1500,1125);
$myMovie->setBackground(70 ,130,180); 

//////////////////////////////////////////////
// Set background image to add to movie
$img="bg.png";

// add it and move it to x:0 y:0
$png = new SWFBitmap(fopen($img,"rb"));
$f1 = $myMovie->add($png);
$f1->moveTo(0,0);
//////////////////////////////////////////////

// Image to add to movie
$img="box.png";

// add it and move it to x - y position
$png = new SWFBitmap(fopen($img,"rb"));
$f1 = $myMovie->add($png);
$f1->moveTo(10,200);

///////////////////////////////////////////////

  $t = new SWFTextField(SWFTEXTFIELD_MULTILINE | SWFTEXTFIELD_WORDWRAP);
  $t->setFont($myFont);
  $t->addString('This is the Title');
  $t->setHeight(80);
  $t->setBounds(1400,160);
  $t->setColor(255,255,255);
  $t->align(SWFTEXTFIELD_ALIGN_CENTER);
  $i = $myMovie->add($t);
  $i->moveTo(50, 10);
 
///////////////////////////////////

  $t2 = new SWFTextField(SWFTEXTFIELD_MULTILINE | SWFTEXTFIELD_WORDWRAP);
  $t2->setFont($myFont);
  $t2->addString('This is the Body');
  $t2->setHeight(40);
  $t2->setBounds(650,600);
  $t2->setColor(255,255,255);
  $t2->align(SWFTEXTFIELD_ALIGN_LEFT);
  $i2 = $myMovie->add($t2);
  $i2->moveTo(850, 150);

///////////////////////////////////
//Save SWF

$myMovie->save("template.swf");

?>

<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=1500 HEIGHT=1125>
<PARAM NAME=movie VALUE="template.swf">
<EMBED src="template.swf" WIDTH=1500 HEIGHT=1125 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</OBJECT>

</body>
</html>
uniquekaiser
 
Posts: 2
Joined: 19. October 2009 20:54


Return to XAMPP for Windows

Who is online

Users browsing this forum: Onion and 150 guests