Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][Flash] Prosta animacja tekstu
patryk20120
post
Post #1





Grupa: Zarejestrowani
Postów: 256
Pomógł: 1
Dołączył: 20.04.2008

Ostrzeżenie: (0%)
-----


Witam (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) mam pytanie, jak za pomocą MING'a zrobić animacje tekstu (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Mam jego wyświetlanie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
  1. <?php
  2.  Ming_setScale(1.0);
  3.  
  4.  function makeRect($r, $g, $b){
  5.   $s = new SWFShape();
  6.   $s->setRightFill($s->addFill($r, $g, $b));
  7.   $s->movePenTo(-100,-20);
  8.   $s->drawLineTo(100,-20);
  9.   $s->drawLineTo(100,20);
  10.   $s->drawLineTo(-100,20);
  11.   $s->drawLineTo(-100,-20);
  12.   return $s;
  13.  }
  14.  
  15. // Set Font
  16.  $font = new SWFFont("AnkeCalligraph.fdb");
  17.  $text1 = new SWFText();
  18.  $text1->setFont($font);
  19.  $text1->moveTo(62, 45);
  20.  $text1->setColor(0x00, 0x00, 0x00);
  21.  $text1->setHeight(28);
  22.  $text1->addString("patryk");
  23.  $b1 = new SWFButton();
  24.  $b1->setUp(makeRect(0xff, 0, 0));
  25.  $b1->setOver(makeRect(0xcc, 0, 0));
  26.  $b1->setDown(makeRect(0, 0, 0xaa));
  27.  $b1->setHit(makeRect(0, 0, 0));
  28.  $b1->addAction(new SWFAction("getURL('http://www.php.net/', 'phpsite');"),
  29.               SWFBUTTON_MOUSEUP);
  30.  
  31.  $m = new SWFMovie();
  32.  $m->setDimension(250,100);
  33.  $m->setBackground(0xcc, 0xcc, 0xcc);
  34.  
  35.  $i = $m->add($b1);
  36.  $m->add($text1);
  37.  $i->setName("phpsite");
  38.  $i->moveTo(110,40);
  39.  
  40. header("Cache-Control: no-cache, must-revalidate");
  41. header("Content-type: application/x-shockwave-flash");
  42. $m->output();
  43. ?>

ale czy ktoś wie, jak można go lekko w jakiś sposób animować (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) ?

Nikt nie wie (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 02:08