HI
I am not really into Flash and a bit unconcentrated at the moment but you should be able to make your text scroll. This is the script I have put in an swf for What I would call “regular” scrolling.
[AS]loadInfo = new LoadVars();
loadInfo.load(“textinfo.txt”);
loadInfo.onLoad = function() {
main_txt.htmltext = this.firstText;
};[/AS]And for the scrolling:
[AS]up.onPress = function() {
pressing = true;
movement = -1;
};
up.onRelease = function() {
pressing = false;
};
down.onPress = function() {
pressing = true;
movement = 1;
};
down.onRelease = function() {
pressing = false;
};
this.onEnterFrame = function() {
if (pressing == true) {
main_txt.scroll = main_txt.scroll+movement;
}
};
[/AS]where up refers to an “uparrow” mc, down to a “downarrow” mc and main_txt to the textfield. Of course you need to make sure that the textfield is scrollable. It shouldn’t matter whether the textfield is an html textfield or not. Hope this helps=)
I don’t really remember but I think you need to put the MyData.load like I have done or it won’t work.
ok, i mean: when i type text in notepad, some of it will be cropped by size of swf file where it loads. text loads into dynamic text box - i added scrollers to that dynamic type box but its inactive.
Adding a scroller can be tricky. The best way to do it is to make sure that you have snapping turned on. I think it’s specifically “Snap to Objects” but I always make sure they are all on just in case. After turning the snapping on, select your dynamic text box so it is highlighted, then drag the scroller from the components box/menu on top of your textbox. You should see the scroller “snap” to your textbox and then in the properties panel the scroller should take on the instance name of your textbox somewhere in it’s properties (I forget exactly where).
If you are still having trouble post your fla and textfile. :hr:
yes i did snapping, got the instance name, all correct, still dead. basically does not react with notepad text size. i will work on it, maybe i shoud do animated scroller,not sure, need to think…thank you.
YOu need to take away “textbox” in the var field (and keep it as the textfield name which you have already done)and change the “set variable” statement to: textbox.text = mytext;
[AS]MyData = new LoadVars();
MyData.load(“exttxt1.txt”);
MyData.onLoad = function() {
textbox.text = MyData[“mytext”];
};[/AS]
where does it appear? If it appears in a window called “output” then you have a trace somewhere in your code.
Trace allows you to check what’s going on. You can trace the output of a variable from a calculation, the property of a movieclip, or the current frame your playhead is on. You can also output simple text like “hello”. It is a great debugging tool actually because you can put trace(“hello”) after a line of code and if you see “hello” in the output window then you know the line of code above the trace fired. If you don’t see “hello” then something is wrong with the code. Make sense?
So look through all the places you have code and see if you can find the trace. It will look like:
trace(something here)