Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[FLASH MX 2004 PRO] image dans un textfield

2 réponses
Avatar
saturnino
Bonjour,

J'ai cru voir qu'il était possible de faire quelquechose dans ce genre :


this.label.htmlText = "<p>"+this.label.attachMovie("infobulleIco", "ico",
1)+msg+"</p>";


mais çà ne marche pas, suis-je obligé de passer par un lien externe pour
afficher mon image dans le champs texte?

merci
saturnino

2 réponses

Avatar
zwetan
salut,


J'ai cru voir qu'il était possible de faire quelquechose dans ce genre :

this.label.htmlText = "<p>"+this.label.attachMovie("infobulleIco", "ico",
1)+msg+"</p>";


mais çà ne marche pas, suis-je obligé de passer par un lien externe pour
afficher mon image dans le champs texte?




essaye plutot cela
this.label.htmlText = "<p><img src="infobulleIco" id="ico">"+msg+"</p>";

cf la doc
"The <img> tags supports the following attributes:
a.. src Specifies the URL to a JPEG or SWF file, or the linkage
identifier for a movie clip symbol in the library. This attribute is
required; all other attributes are optional. External files (JPEG and SWF
files) do not show until they have downloaded completely.
b.. id Specifies the name for the movie clip instance (created by Flash
Player) that contains the embedded JPEG file, SWF file, or movie clip. This
is useful if you want to control the embedded content with ActionScript."

attention aussi a bien preciser le width et height de l'image a cause de
cela
"
Specifying height and width values
If you specify width and height attributes for an <img> tag, space is
reserved in the text field for the JPEG file, SWF file, or movie clip. After
a JPEG or SWF file has downloaded completely, it appears in the reserved
space. Flash scales the media up or down, according to the height and width
values. You must enter both height and width attributes to scale the image.

If you don't specify height and width values, no space is reserved for the
embedded media. After a JPEG or SWF file has downloaded completely, Flash
inserts it into the text field at full size and rebreaks text around it.

Note: If you are dynamically loading your images into a text field
containing text, it is good practice to specify the width and height of the
original image so the text properly wraps around the space you reserve for
your image.

"

zwetan
Avatar
saturnino
bonjour,

merci zwetan,

effectivement c'était dans la doc.

saturnino


"zwetan" a écrit dans le message de news:
dhubdm$5qg$
salut,


J'ai cru voir qu'il était possible de faire quelquechose dans ce genre :

this.label.htmlText = "<p>"+this.label.attachMovie("infobulleIco", "ico",
1)+msg+"</p>";


mais çà ne marche pas, suis-je obligé de passer par un lien externe pour
afficher mon image dans le champs texte?




essaye plutot cela
this.label.htmlText = "<p><img src="infobulleIco"
id="ico">"+msg+"</p>";

cf la doc
"The <img> tags supports the following attributes:
a.. src Specifies the URL to a JPEG or SWF file, or the linkage
identifier for a movie clip symbol in the library. This attribute is
required; all other attributes are optional. External files (JPEG and SWF
files) do not show until they have downloaded completely.
b.. id Specifies the name for the movie clip instance (created by Flash
Player) that contains the embedded JPEG file, SWF file, or movie clip.
This
is useful if you want to control the embedded content with ActionScript."

attention aussi a bien preciser le width et height de l'image a cause de
cela
"
Specifying height and width values
If you specify width and height attributes for an <img> tag, space is
reserved in the text field for the JPEG file, SWF file, or movie clip.
After
a JPEG or SWF file has downloaded completely, it appears in the reserved
space. Flash scales the media up or down, according to the height and
width
values. You must enter both height and width attributes to scale the
image.

If you don't specify height and width values, no space is reserved for the
embedded media. After a JPEG or SWF file has downloaded completely, Flash
inserts it into the text field at full size and rebreaks text around it.

Note: If you are dynamically loading your images into a text field
containing text, it is good practice to specify the width and height of
the
original image so the text properly wraps around the space you reserve for
your image.

"

zwetan