theviceMedlem sedan dec. 2005198 inlägg Hej, har nu försökt att fixa så att CSS fungerar i flash, men det vill inte fungera för mig = min variabel laddas inte in i textfältet. Vad gör jag för fel?
Min variabel heter profil i ASP dokumentet, och mitt textfält heter profil också. Kod:
// Create a new style sheet and LoadVars object
var myVars:LoadVars = new LoadVars();
var styles = new TextField.StyleSheet();
// Location of CSS and text files to load
var txt_url = " http://v3.booring.se/flash_variabler.asp";
var css_url = " http://v3.booring.se/inc/style.css";
// Load text to display and define onLoad handler
myVars.load(txt_url);
myVars.onData = function(content) {
storyText = content;
};
// Load CSS file and define onLoad handler:
styles.load(css_url);
styles.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.
profil.styleSheet = styles;
profil.text = storyText;
}
};
# Timmie G
Är variablen storyText definerad utanför "myVars.onData" ?
T.ex:
[b]var storyText = "";[/b]
// Create a new style sheet and LoadVars object
var myVars:LoadVars = new LoadVars();
var styles = new TextField.StyleSheet();
// Location of CSS and text files to load
var txt_url = " http://v3.booring.se/flash_variabler.asp";
var css_url = " http://v3.booring.se/inc/style.css";
// Load text to display and define onLoad handler
myVars.load(txt_url);
myVars.onData = function(content) {
storyText = content;
};
// Load CSS file and define onLoad handler:
styles.load(css_url);
styles.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.
profil.styleSheet = styles;
profil.text = storyText;
}
};
/Mirandir
theviceMedlem sedan dec. 2005198 inlägg Jag fick änra lite i koden för att det skulle fungera att ladda in flash filen. Men när jag väl fick det att fungera så visar det sig att onmousover inte fungerar i flash? Eller går det att lösa?
Eftersom at jag laddar in helalänkar in i flsahen så kan jag inte använda on(rollover):
tex, <a href="a" class="b">c</a>
# Timmie G