where did it go?
- Started
- Last post
- 6 Responses
- Kernit
i'm having a problem with an externally loading swf for my flash site. i have an swf file which loads an external html file. by itself, it works fine.
i have my main site which will load up this external swf. again this works fine loading the swf file, but it's not showing the html file inside the swf.
basically i can't work out what i'm doing wrong, or omitting. as this is my first flash site and i'm not a programmer, i'm having a bit of bother trying to troubleshoot it. i'm wondering if it's anything to do with loading levels (_root 1, 2 etc) or something like that.
here's how i've built it so far:
the 'about' button script loads 'about.swf' into a movie clip holder (called 'about_holder' in the instance field):
on (release) {
gotoAndStop("Main Scene", "about");
loadMovie("about.swf", "about_holder");
}this script for my dynamic text box calls an html file ('about_text.html') into 'about.swf':
loadVariablesNum("about_text.htm... 0);
if anyone could help, or lead me in the right direction, i would be very grateful, as i'm not really sure where to start looking.
thanks
- Bluejam0
"loadVariablesNum("about_t
ext.html", 0); "I think you might have to target the movieclip 'about_holder' rather than the level '0'.
- Kernit0
hmm. that opened the external html file in a new window.
does it need to be told to look for the movieclip instance 'about_holder' in the main swf instead of itself, or am i going down the wrong path there?
- unfittoprint0
why don't u use the new loadVars object?
myVars = new loadVars()
myVars.onLoad = function(sucess){
if (sucess) {
dothis();
} else {
trace(damn!!!)
}
}myVars.load("about_text.html)
- Kernit0
won't that just tell me with an error message that it hasn't loaded? i'm a bit of a newbie with all this programming lark, as you can probably tell, so i'm not used to all the nomenclature yet. but from my flash mx bible, it seems loadVars is used for receiving and sending form data?
- unfittoprint0
the good thing about it is that it creates an object (myVars, for example) that will hold every variable received/send for/from Flash. You can populate textfields, movieclips, etc.. with the loadVars object variables...
like this (var1, var2, var3 are variables in your text file...):
myVars = new loadVars();
myVars.onLoad = function(sucess){
if (sucess) {
myTextField1.text = var1;
myTextField2.text = var2;
myTextField1.text = var3;
} else {
trace(damn!!!)
}
}myVars.load("about_text.h
tml);good luck...
- Kernit0
thanks for your help uftp.
:o)