PHP Doku:: The SWFText class - class.swftext.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenMing (flash)The SWFText class

Ein Service von Reinhard Neidl - Webprogrammierung.

Ming (flash)

<<SWFSprite->stopSound

SWFText->addString>>


UnterSeiten:

The SWFText class

Einführung

SWFText.

Klassenbeschreibung

SWFText {
/* Methoden */
void SWFText::addString ( string $string )
void addUTF8String ( string $text )
void __construct ( void )
float getAscent ( void )
float getDescent ( void )
float getLeading ( void )
float getUTF8Width ( string $string )
float getWidth ( string $string )
void moveTo ( float $x , float $y )
void setColor ( int $red , int $green , int $blue [, int $a = 255 ] )
void setFont ( SWFFont $font )
void setHeight ( float $height )
void setSpacing ( float $spacing )
}

Inhaltsverzeichnis


2 BenutzerBeiträge:
- Beiträge aktualisieren...
p_smiecho at interia dot pl
1.12.2003 12:26
It seems to me that there is a bug: everything works perfect but only with Linux. SWFText crashes while working on Windows. So I do it that way:

<?php
   $f
= new SWFFont('Arial');
  
$t = new SWFTextField();
  
$t -> setFont($f);
  
$t -> addString('Hello world!!!');

  
$p = new SWFSprite();
  
$i = $p -> add($t);
  
$i -> moveto(100, 100);    // Here you can move text !!
   //$p -> remove($i);

  
$m = new SWFMovie();
//   ...
  
$m -> add($p);
?>

Of course it writes text where I want, but I still can't get other methods of SWFText class. For example: I can't get text width (swftext->getwidth).
franky at boucheros dot com
22.04.2002 15:12
For windows platform :

<?php
$f
=new SWFFont("_sans");
$t=new SWFTextField();
?>

and comment the moveto line.



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)