flash link Q?
- Started
- Last post
- 19 Responses
- Parent
Anyone got any idea how to put a flash link ie. a load movie button or something.. in a text file so that a word in my externally loaded text file can control the flash movie? very grateful for any ideas?!
- ozhanlion0
doh, well put a variable link="http://www.yourlink.com" and then try to call that variable from your flash file.
this.loadvariables("link.txt")
getURL(link,"_blank");blabla.
I didn't test anycode mentioned here. but you got the logic don't you ?;
- Parent0
Not really?.. could you expand?.. i basically need to put a link on 'click here' that will load a movie?
- ********0
i've read through both your posts and I still don't have any idea what you are after?
- Parent0
here it is - i have a movie that loads a text file into a news reader. i know how to pit html links in and stuff, but i would like to put in a link that controls the flash movie so that i can loadmovie etc from the text file.. so you would have a link in the news that say reads clcik here to sign-up, that then loads the signup movie... clear? any ideas how!?
- rasko40
I dont see how oz's solution can work, because it is opening the link in a new window, when what you want is for the current swf to do something, such as move to a target frame correct?
- Parent0
correct rasko4 - i have this in flash;
on (release) {
_level5.removel();
loadMovieNum("contact.swf", 5);
}and want it to work from a link in the text file
- contra0
You can do it by calling a function (in the swf) from the text file. Can't remember exactly how but I've done it before and it works fine.
- ********0
How can you call a fuinction from within the text file? It's simple a data source..the authoring is done within flash.
- contra0
In the Flash file...
function whatever() {
}In the external text file...
here
- ********0
you've given skant knowledge of what you are doing..so this is a guess:
But rather than read the text into a field....you will need to read ythe text into a textfield that is within a button object and then attach that to you stage.
That way you can strcuture your text file to also have link the linkpath aswell.
- contra0
Sorry, here's the text file bit again minus the tag containers...
A HREF='asfunction:loadstoryboard'
here /A
- contra0
and you can see it working here...
http://www.gmj.net - go to Portfolio > Avant Seine
The text is loaded from an external txt file, the links in it call functions in the Flash movie it loads into. I assume that's what you're trying to do?
- ozhanlion0
this is your frame action:
function loader() {
trace("done");
// this.loadMovie("second.swf", 10);
}
myLoadVars = new LoadVars();
myLoadVars.load("myText.txt");
myLoadVars.onLoad = function(success) {
if (!success) {
_root.output_txt.text = "Flash is using the default values.";
} else {
output_txt.html = true;
output_txt.htmlText = this.sometext;
}
};and this is your text file:
someText=click here
- contra0
Working example for you...
http://www.zen12165.zen.co.uk/fi…
- ozhanlion0
nice. asfunction to go.
- Parent0
wow, thanks contra... any chance of saving that down to MX as i can't open it?
thanks again
- contra0
No problem, download it again now, I've saved both FLAs as MX.
- Parent0
Thanks man.. still can't open main.fla though?
- contra0
Try again, I think it was a permissions problem. Should be ok now.