Beste mensen,
ik heb hier een werkende .as file die ik include:
Nou wil ik graag de css en de html file die ik inlaad ergens anders neerzetten dan in de
direkte map van de betreffende .swf > nou dacht ik zo:
maar dit werkt helaas op geen enkele manier...
Hoop dat jullie me kunnen verder helpen....
ik heb hier een werkende .as file die ik include:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| // 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 = "bulk.html"; var css_url = "css.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. content.bulk.styleSheet = styles; content.bulk.text = storyText; } }; |
Nou wil ik graag de css en de html file die ik inlaad ergens anders neerzetten dan in de
direkte map van de betreffende .swf > nou dacht ik zo:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| // 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 = "./content/bulk.html"; > of bv ook "www.mijnsite.nl/pagina.html" var css_url = "./css/css.css"; > of bv ook "www.mijnsite.nl/css.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. content.bulk.styleSheet = styles; content.bulk.text = storyText; } }; |
maar dit werkt helaas op geen enkele manier...
Hoop dat jullie me kunnen verder helpen....