View Full Version : no button mouse over
bluewalrus
09-25-2008, 06:24 PM
I have a movie clip called where. On mouse over I want it to load in a text file i have this code but on mouse over nothings happening.
where.onRollOver = function() {
loadText = new LoadVars();
loadText.onLoad = function() {
_root.locate_txt.html = true;
_root.locate_txt.htmlText = this.my_text;
};
loadText.load("location.txt");
};
I'm quote new to AS, and learning AS 3, so I don't know AS 2. But if you would mind showing me there full loadText variable that'd be great(I'm a newb, so if that didn't make sence, humor me)
Medyman
09-26-2008, 03:26 AM
I have a movie clip called where. On mouse over I want it to load in a text file i have this code but on mouse over nothings happening.
where.onRollOver = function() {
loadText = new LoadVars();
loadText.onLoad = function() {
_root.locate_txt.html = true;
_root.locate_txt.htmlText = this.my_text;
};
loadText.load("location.txt");
};
Have you tried tracing out my_text to see if it's actually loading anything? To test, try this:
where.onRollOver = function() {
loadText = new LoadVars();
loadText.load("location.txt");
trace(loadText.my_text);
};
bluewalrus
09-26-2008, 04:52 PM
opps hah figured it out mostly forgot to give an instance name on the stage of the same that i gave the clip in the library. but now after that the text is staying on mouse off i tried on rollout and clear but that didnt work.
script for other guy for loading external text file:
loadText = new LoadVars();
loadText.onLoad = function() {
_root.locate_txt.html = true;
_root.locate_txt.htmlText = this.my_text;
};
loadText.load("location.txt");
I made a dynamic text field named locate_txt which that code puts the text in location.txt into. The location.txt contains text but must start with my_text= it reads after that =. make sense i think?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.