Bonjour à toi
yane
, Alrs voila, suit, la réponse à ta question :
Bon c'est du Flash 8 donc tu ne peux pas l'ouvrir avec Flash 7.1. Ensuite voila le code pour le fichier "TextCss.zip" :
//****************************************************************************
// Tutorial réalisé d'après l'exemple de Macromedia, Copyright (C) 2005 Macromedia, Inc. All Rights Reserved.
// avec quelques modifications perso et amélioration de la feuille de style CSS
//
//*****************************************************************************
var monStyle:TextField.StyleSheet = new TextField.StyleSheet(); // création de la variable "monStyle"
monStyle.load("style.css"); // "monStyle" charge la feuille de style CSS
monText_txt.styleSheet = monStyle; // on applique "monStyle" à "monText_txt"
monText_txt.multiline= true; // on formate le champ de texte. multilignes > oui
monText_txt.wordWrap = true; // active le retour auto à la ligne > oui
monText_txt.html = true;// au format html > oui
var texte:XML = new XML(); // variable txt au format xml
texte.ignoreWhite = true; // on ignore les blancs
texte.load("style.html"); // on charge le fichier html
texte.onLoad = function () { // au chargement
monText_txt.htmlText = texte; // on affiche le texte au format html
}
Et pour le fichier "sources.zip" :
//****************************************************************************
//Copyright (C) 2005 Macromedia, Inc. All Rights Reserved.
//The following is Sample Code and is subject to all restrictions on
//such code as contained in the End User License Agreement accompanying
//this product.
//****************************************************************************
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("style.css");
content_txt.styleSheet = myStyle;
content_txt.multiline= true;
content_txt.wordWrap = true;
content_txt.html = true;
var story:XML = new XML();
story.ignoreWhite = true;
story.load("sample.html");
story.onLoad = function () {
content_txt.htmlText = story;
}
Supposant que les autre fichier ont été ouvert sans problème !
Bonne journée à toi !
@+
Flo