cvs: presentations /slides/peru/ejemplos barrapunto.rss img_resize.php ming.php ming2.php
| From: | Jesus M. Castagnetto | Date: | Sat, 04 Jun 2005 20:10:16 +0000 |
| Subject: | cvs: presentations /slides/peru/ejemplos barrapunto.rss img_resize.php ming.php ming2.php | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1148@lists.php.net to get a copy of this message | ||
jmcastagnetto Sat Jun 4 16:10:16 2005 EDT
Added files:
/presentations/slides/peru/ejemplos barrapunto.rss img_resize.php
ming.php ming2.php
Log:
examples for IDAT talk
http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/barrapunto.rss?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/barrapunto.rss +++ presentations/slides/peru/ejemplos/barrapunto.rss <?xml version="1.0" encoding="ISO-8859-1"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:slash="http://slashcode.com/rss/1.0/modules/Slash/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" > <channel rdf:about="http://barrapunto.com/"> <title>Barrapunto</title> <link>http://barrapunto.com/</link> <description>La información que te interesa</description> <dc:language>es</dc:language> <dc:rights>Copyright &copy; 2003, Barrapunto</dc:rights> <dc:date>2005-06-04T16:13:06+00:00</dc:date> <dc:publisher>Barrapunto S.L.</dc:publisher> <dc:creator>webmaster@barrapunto.com</dc:creator> <dc:subject>Software libre</dc:subject> <syn:updatePeriod>hourly</syn:updatePeriod> <syn:updateFrequency>1</syn:updateFrequency> <syn:updateBase>1970-01-01T00:00+00:00</syn:updateBase> <items> <rdf:Seq> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/121242" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/097203" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/1539200" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/0821237" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/081219" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/0117221" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/2152226" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/1657252" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/1559245" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/160219" /> </rdf:Seq> </items> <image rdf:resource="http://barrapunto.com/topics/topicbarrapunto.png" /> <textinput rdf:resource="http://barrapunto.com/search.pl" /> </channel> <image rdf:about="http://barrapunto.com/topics/topicbarrapunto.png"> <title>Barrapunto</title> <url>http://barrapunto.com/topics/topicbarrapunto.png</url> <link>http://barrapunto.com/</link> </image> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/121242"> <title>La ministra responderá "on line" acerca del Plan Antipiratería</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/121242</link> <dc:creator>Yonderboy</dc:creator> <dc:date>2005-06-04T11:55:32+00:00</dc:date> <dc:subject>Copyleft</dc:subject> <slash:department>mal-plan</slash:department> <slash:hitparade></slash:hitparade> <slash:section>es</slash:section> <slash:comments>40</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/097203"> <title>Apple se pasa a Intel</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/097203</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T08:59:39+00:00</dc:date> <dc:subject>apple</dc:subject> <slash:department>las-ranas-crían-pelo</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>135</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/1539200"> <title>PS3 sin disco duro de serie</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/1539200</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T08:38:50+00:00</dc:date> <dc:subject>juegos</dc:subject> <slash:department>el-chocolate-del-loro</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>56</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/0821237"> <title>Madfox: Firefox "compatible" con IE</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/0821237</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T08:21:05+00:00</dc:date> <dc:subject>Mozilla</dc:subject> <slash:department>se-me-había-escapado</slash:department> <slash:hitparade></slash:hitparade> <slash:section>softlibre</slash:section> <slash:comments>23</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/081219"> <title>¿Se puede vivir en containers?</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/081219</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T07:58:42+00:00</dc:date> <dc:subject>Cultura hacker</dc:subject> <slash:department>¡me-encanta-que-te-encante,-encanto!</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>42</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/0117221"> <title>KDE se une al "Summer of Code" de Google</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/0117221</link> <dc:creator>rvr</dc:creator> <dc:date>2005-06-04T01:14:59+00:00</dc:date> <dc:subject>kde</dc:subject> <slash:department>los-summerios</slash:department> <slash:hitparade></slash:hitparade> <slash:section>softlibre</slash:section> <slash:comments>9</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/2152226"> <title>"Brasil y la ofensiva Linux", en la BBC</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/2152226</link> <dc:creator>Yonderboy</dc:creator> <dc:date>2005-06-03T21:36:24+00:00</dc:date> <dc:subject>reinolinux</dc:subject> <slash:department>cerrando-la-brecha-digital</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>17</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/1657252"> <title>Firewall de Contingencia</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/1657252</link> <dc:creator>fernand0</dc:creator> <dc:date>2005-06-03T16:38:44+00:00</dc:date> <dc:subject>internet</dc:subject> <slash:department>fernand0</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>30</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/1559245"> <title>KOffice 1.4, a punto de salir del horno</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/1559245</link> <dc:creator>rvr</dc:creator> <dc:date>2005-06-03T15:56:58+00:00</dc:date> <dc:subject>kde</dc:subject> <slash:department>la-kocina-de-arguiñano</slash:department> <slash:hitparade></slash:hitparade> <slash:section>softlibre</slash:section> <slash:comments>23</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/160219"> <title>Tutorial sobre 'podcasts' bajo PalmOS</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/160219</link> <dc:creator>rvr</dc:creator> <dc:date>2005-06-03T15:52:37+00:00</dc:date> <dc:subject>pda</dc:subject> <slash:department>palmitos</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>4</slash:comments> </item> <textinput rdf:about="http://barrapunto.com/search.pl"> <title>Search Barrapunto</title> <description>Search Barrapunto stories</description> <name>query</name> <link>http://barrapunto.com/search.pl</link> </textinput> </rdf:RDF> http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/img_resize.php?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/img_resize.php +++ presentations/slides/peru/ejemplos/img_resize.php <?php Header('Content-Type: image/png'); $height = 600; $txt = 'Mi sobrino Marcio, futuro programador del kernel de Linux'; $font = '/usr/X11R6/lib/X11/fonts/TTF/luximri.ttf'; if (!file_exists($font)) { $font = 'timesi'; } $size = ImageTTFBbox(14,0,$font,$txt); $txt_w = abs($size[2]-$size[0]); $txt_h = abs($size[6]-$size[1]); // cargando la imágen original $bg = ImageCreateFromJpeg('../../sdphp/images/jmc_nephew.jpg'); // calculando las nuevas dimensiones $img_width = imagesx($bg); $img_height = imagesy($bg); $width = ($height)/$img_height * $img_width; $sizing = "Imágen original: $img_width x $img_height\r\n"; $sizing .= " Imágen nueva: $width x $height"; // creando la imágen final $im = ImageCreateTrueColor($width,$height); ImageCopyResampled($im,$bg,0,0,0,0, $width,$height,$img_width,$img_height); $white = ImageColorAllocate($im,255,255,255); $black = ImageColorAllocate($im,0,0,0); $col = ImageColorResolveAlpha($im,10,10,10,50); ImageFilledRectangle($im,10,5,470,90,0x30ffffff); ImageTTFText($im,18,0,20,40,$black,$font,$sizing); ImageDestroy($bg); $box = ($width-$txt_w)/2; ImageFilledRectangle($im,$box-10, $height-$txt_h-30,$width-$box,$height-5,$col); $yellow = ImageColorAllocate($im,255,255,10); ImageTTFText($im,14,0,$box,$height-$txt_h-5,$yellow,$font,$txt); ImagePNG($im); ?> http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/ming.php?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/ming.php +++ presentations/slides/peru/ejemplos/ming.php <?php $s = new SWFShape(); $fp = fopen('../../intro/php-big.jpg','r'); $jpg = new SWFBitmap($fp); $w = $jpg->getWidth(); $h = $jpg->getHeight(); $f = $s->addFill($jpg); $f->moveTo(-$w/2, -$h/2); $s->setRightFill($f); $s->movePenTo(-$w/2, -$h/2); $s->drawLine($w, 0); $s->drawLine(0, $h); $s->drawLine(-$w, 0); $s->drawLine(0, -$h); $p = new SWFSprite(); $i = $p->add($s); for($step=0; $step<360; $step+=2) { $p->nextFrame(); $i->rotate(-2); } $m = new SWFMovie(); $i = $m->add($p); $i->moveTo(230,120); $m->setRate(100); $m->setDimension($w*1.8, $h*1.8); header('Content-type: application/x-shockwave-flash'); $m->output(6); ?> http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/ming2.php?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/ming2.php +++ presentations/slides/peru/ejemplos/ming2.php <?php require 'XML/RSS.php'; $r =& new XML_RSS('barrapunto.rss'); $r->parse(); $allItems = $r->getItems(); $itemCount = count($allItems); $width = 1000; $m = new SWFMovie(); $m->setDimension($width, 70); $m->setBackground(0xcf, 0xcf, 0xcf); $f = new SWFFont("../../../../pres2/fonts/Techno.fdb"); $hit = new SWFShape(); $hit->setRightFill($hit->addFill(0,0,0)); $hit->movePenTo(-($width/2), -30); $hit->drawLine($width, 0); $hit->drawLine(0, 60); $hit->drawLine(-$width, 0); $hit->drawLine(0, -60); $x = 0; // build the buttons foreach($allItems as $Item) { $title = $Item['title']; $link = $Item['link']; // get the text $t = new SWFText(); $t->setFont($f); $t->setHeight(50); $t->setColor(0,0,0); $t->moveTo(-$f->getWidth($title)/2, 25); $t->addString($title); // make a button $b[$x] = new SWFButton(); $b[$x]->addShape($hit, SWFBUTTON_HIT); $b[$x]->addShape($t, SWFBUTTON_OVER | SWFBUTTON_UP | SWFBUTTON_DOWN); $b[$x++]->addAction(new SWFAction("getURL('$link','_new');"), SWFBUTTON_MOUSEUP); } // display them for($x=0; $x<$itemCount; $x++) { $i = $m->add($b[$x]); $i->moveTo($width/2,30); for($j=0; $j<=30; ++$j) { $i->scaleTo(sqrt(sqrt($j/30))); $i->multColor(1.0, 1.0, 1.0, $j/30); $m->nextFrame(); } for($j=0; $j<=30; ++$j) { $i->scaleTo(sqrt(sqrt(1+($j/30)))); $i->multColor(1.0, 1.0, 1.0, (30-$j)/30); $m->nextFrame(); } $m->remove($i); } header('Content-type: application/x-shockwave-flash'); $m->output(); ?>
http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/barrapunto.rss?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/barrapunto.rss +++ presentations/slides/peru/ejemplos/barrapunto.rss <?xml version="1.0" encoding="ISO-8859-1"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:slash="http://slashcode.com/rss/1.0/modules/Slash/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" > <channel rdf:about="http://barrapunto.com/"> <title>Barrapunto</title> <link>http://barrapunto.com/</link> <description>La información que te interesa</description> <dc:language>es</dc:language> <dc:rights>Copyright &copy; 2003, Barrapunto</dc:rights> <dc:date>2005-06-04T16:13:06+00:00</dc:date> <dc:publisher>Barrapunto S.L.</dc:publisher> <dc:creator>webmaster@barrapunto.com</dc:creator> <dc:subject>Software libre</dc:subject> <syn:updatePeriod>hourly</syn:updatePeriod> <syn:updateFrequency>1</syn:updateFrequency> <syn:updateBase>1970-01-01T00:00+00:00</syn:updateBase> <items> <rdf:Seq> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/121242" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/097203" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/1539200" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/0821237" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/081219" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/04/0117221" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/2152226" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/1657252" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/1559245" /> <rdf:li rdf:resource="http://barrapunto.com/article.pl?sid=05/06/03/160219" /> </rdf:Seq> </items> <image rdf:resource="http://barrapunto.com/topics/topicbarrapunto.png" /> <textinput rdf:resource="http://barrapunto.com/search.pl" /> </channel> <image rdf:about="http://barrapunto.com/topics/topicbarrapunto.png"> <title>Barrapunto</title> <url>http://barrapunto.com/topics/topicbarrapunto.png</url> <link>http://barrapunto.com/</link> </image> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/121242"> <title>La ministra responderá "on line" acerca del Plan Antipiratería</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/121242</link> <dc:creator>Yonderboy</dc:creator> <dc:date>2005-06-04T11:55:32+00:00</dc:date> <dc:subject>Copyleft</dc:subject> <slash:department>mal-plan</slash:department> <slash:hitparade></slash:hitparade> <slash:section>es</slash:section> <slash:comments>40</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/097203"> <title>Apple se pasa a Intel</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/097203</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T08:59:39+00:00</dc:date> <dc:subject>apple</dc:subject> <slash:department>las-ranas-crían-pelo</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>135</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/1539200"> <title>PS3 sin disco duro de serie</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/1539200</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T08:38:50+00:00</dc:date> <dc:subject>juegos</dc:subject> <slash:department>el-chocolate-del-loro</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>56</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/0821237"> <title>Madfox: Firefox "compatible" con IE</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/0821237</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T08:21:05+00:00</dc:date> <dc:subject>Mozilla</dc:subject> <slash:department>se-me-había-escapado</slash:department> <slash:hitparade></slash:hitparade> <slash:section>softlibre</slash:section> <slash:comments>23</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/081219"> <title>¿Se puede vivir en containers?</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/081219</link> <dc:creator>Candyman</dc:creator> <dc:date>2005-06-04T07:58:42+00:00</dc:date> <dc:subject>Cultura hacker</dc:subject> <slash:department>¡me-encanta-que-te-encante,-encanto!</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>42</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/04/0117221"> <title>KDE se une al "Summer of Code" de Google</title> <link>http://barrapunto.com/article.pl?sid=05/06/04/0117221</link> <dc:creator>rvr</dc:creator> <dc:date>2005-06-04T01:14:59+00:00</dc:date> <dc:subject>kde</dc:subject> <slash:department>los-summerios</slash:department> <slash:hitparade></slash:hitparade> <slash:section>softlibre</slash:section> <slash:comments>9</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/2152226"> <title>"Brasil y la ofensiva Linux", en la BBC</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/2152226</link> <dc:creator>Yonderboy</dc:creator> <dc:date>2005-06-03T21:36:24+00:00</dc:date> <dc:subject>reinolinux</dc:subject> <slash:department>cerrando-la-brecha-digital</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>17</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/1657252"> <title>Firewall de Contingencia</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/1657252</link> <dc:creator>fernand0</dc:creator> <dc:date>2005-06-03T16:38:44+00:00</dc:date> <dc:subject>internet</dc:subject> <slash:department>fernand0</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>30</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/1559245"> <title>KOffice 1.4, a punto de salir del horno</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/1559245</link> <dc:creator>rvr</dc:creator> <dc:date>2005-06-03T15:56:58+00:00</dc:date> <dc:subject>kde</dc:subject> <slash:department>la-kocina-de-arguiñano</slash:department> <slash:hitparade></slash:hitparade> <slash:section>softlibre</slash:section> <slash:comments>23</slash:comments> </item> <item rdf:about="http://barrapunto.com/article.pl?sid=05/06/03/160219"> <title>Tutorial sobre 'podcasts' bajo PalmOS</title> <link>http://barrapunto.com/article.pl?sid=05/06/03/160219</link> <dc:creator>rvr</dc:creator> <dc:date>2005-06-03T15:52:37+00:00</dc:date> <dc:subject>pda</dc:subject> <slash:department>palmitos</slash:department> <slash:hitparade></slash:hitparade> <slash:section>articles</slash:section> <slash:comments>4</slash:comments> </item> <textinput rdf:about="http://barrapunto.com/search.pl"> <title>Search Barrapunto</title> <description>Search Barrapunto stories</description> <name>query</name> <link>http://barrapunto.com/search.pl</link> </textinput> </rdf:RDF> http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/img_resize.php?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/img_resize.php +++ presentations/slides/peru/ejemplos/img_resize.php <?php Header('Content-Type: image/png'); $height = 600; $txt = 'Mi sobrino Marcio, futuro programador del kernel de Linux'; $font = '/usr/X11R6/lib/X11/fonts/TTF/luximri.ttf'; if (!file_exists($font)) { $font = 'timesi'; } $size = ImageTTFBbox(14,0,$font,$txt); $txt_w = abs($size[2]-$size[0]); $txt_h = abs($size[6]-$size[1]); // cargando la imágen original $bg = ImageCreateFromJpeg('../../sdphp/images/jmc_nephew.jpg'); // calculando las nuevas dimensiones $img_width = imagesx($bg); $img_height = imagesy($bg); $width = ($height)/$img_height * $img_width; $sizing = "Imágen original: $img_width x $img_height\r\n"; $sizing .= " Imágen nueva: $width x $height"; // creando la imágen final $im = ImageCreateTrueColor($width,$height); ImageCopyResampled($im,$bg,0,0,0,0, $width,$height,$img_width,$img_height); $white = ImageColorAllocate($im,255,255,255); $black = ImageColorAllocate($im,0,0,0); $col = ImageColorResolveAlpha($im,10,10,10,50); ImageFilledRectangle($im,10,5,470,90,0x30ffffff); ImageTTFText($im,18,0,20,40,$black,$font,$sizing); ImageDestroy($bg); $box = ($width-$txt_w)/2; ImageFilledRectangle($im,$box-10, $height-$txt_h-30,$width-$box,$height-5,$col); $yellow = ImageColorAllocate($im,255,255,10); ImageTTFText($im,14,0,$box,$height-$txt_h-5,$yellow,$font,$txt); ImagePNG($im); ?> http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/ming.php?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/ming.php +++ presentations/slides/peru/ejemplos/ming.php <?php $s = new SWFShape(); $fp = fopen('../../intro/php-big.jpg','r'); $jpg = new SWFBitmap($fp); $w = $jpg->getWidth(); $h = $jpg->getHeight(); $f = $s->addFill($jpg); $f->moveTo(-$w/2, -$h/2); $s->setRightFill($f); $s->movePenTo(-$w/2, -$h/2); $s->drawLine($w, 0); $s->drawLine(0, $h); $s->drawLine(-$w, 0); $s->drawLine(0, -$h); $p = new SWFSprite(); $i = $p->add($s); for($step=0; $step<360; $step+=2) { $p->nextFrame(); $i->rotate(-2); } $m = new SWFMovie(); $i = $m->add($p); $i->moveTo(230,120); $m->setRate(100); $m->setDimension($w*1.8, $h*1.8); header('Content-type: application/x-shockwave-flash'); $m->output(6); ?> http://cvs.php.net/co.php/presentations/slides/peru/ejemplos/ming2.php?r=1.1&p=1 Index: presentations/slides/peru/ejemplos/ming2.php +++ presentations/slides/peru/ejemplos/ming2.php <?php require 'XML/RSS.php'; $r =& new XML_RSS('barrapunto.rss'); $r->parse(); $allItems = $r->getItems(); $itemCount = count($allItems); $width = 1000; $m = new SWFMovie(); $m->setDimension($width, 70); $m->setBackground(0xcf, 0xcf, 0xcf); $f = new SWFFont("../../../../pres2/fonts/Techno.fdb"); $hit = new SWFShape(); $hit->setRightFill($hit->addFill(0,0,0)); $hit->movePenTo(-($width/2), -30); $hit->drawLine($width, 0); $hit->drawLine(0, 60); $hit->drawLine(-$width, 0); $hit->drawLine(0, -60); $x = 0; // build the buttons foreach($allItems as $Item) { $title = $Item['title']; $link = $Item['link']; // get the text $t = new SWFText(); $t->setFont($f); $t->setHeight(50); $t->setColor(0,0,0); $t->moveTo(-$f->getWidth($title)/2, 25); $t->addString($title); // make a button $b[$x] = new SWFButton(); $b[$x]->addShape($hit, SWFBUTTON_HIT); $b[$x]->addShape($t, SWFBUTTON_OVER | SWFBUTTON_UP | SWFBUTTON_DOWN); $b[$x++]->addAction(new SWFAction("getURL('$link','_new');"), SWFBUTTON_MOUSEUP); } // display them for($x=0; $x<$itemCount; $x++) { $i = $m->add($b[$x]); $i->moveTo($width/2,30); for($j=0; $j<=30; ++$j) { $i->scaleTo(sqrt(sqrt($j/30))); $i->multColor(1.0, 1.0, 1.0, $j/30); $m->nextFrame(); } for($j=0; $j<=30; ++$j) { $i->scaleTo(sqrt(sqrt(1+($j/30)))); $i->multColor(1.0, 1.0, 1.0, (30-$j)/30); $m->nextFrame(); } $m->remove($i); } header('Content-type: application/x-shockwave-flash'); $m->output(); ?>