-
i am having way to much troble loading dynamic text with a scroll button
what are the quickest steps to do this
also can you change the scroll bar to make it look different?
plzz i have a huge headache
i need quick steps plz
-
This question must be asked 3 or 4 times a day at least!
You could check out other threads...
But tell me this:
Dynamic text loaded from a text file?
Dynamic text written as a variable in AS in the main movie?
Dynamic text with html tags?
Dynamic text with embedded fonts?
Guess I'll set up a .fla with all possibilities!
What do you want?
-
Dynamic text with embedded fonts that sounds good i guess
thanks
my site is at http://www.members.cox.net/keith5885/ if you wanna see
anyway thanks
i suck at actionscript and i am trying to cram my self with info
-
-
Voyons, oldNewbie.. tu deviens professeur ici! Ces questions tant repetees malgre tous nos efforts sont un peu ennervants, non? Au moins, ceux que vous aidez ne chicanent point avec vous...
heh
nig
-
Use the new LoadVars object to load dynamic text...
Create a text file that looks something like this, and save as "myfile.txt":
stuff=hey now
Next, open a new flash movie and draw a dynamic text filed on the stage. Give it a name of myText. Then, on the first frame of the timeline, ad this code:
// create loadvars object
lv= new LoadVars();
// define function to execute once it has finished loading
lv.onLoad= function (){
_root.myText.text=this.stuff;
}
// load text file
lv.load("myfile.txt");
Save the flash file to the same directory as the textfile and test.
HTH,
K.
-
Sorry for annoying you, but could you be a little bit more specific?
-
That is pretty specific...
What else do you want to know?
K.
-
Okay.... I'll create a dynamic text FIELD...and when I select it, I get the Action-Menu.... and then? I copy-paste that script of yours into the actionscript window?
And what izz LoadVar?
-
Select the first frame of the main timeline, than paste that script into the actions window...
Load Vars is an object that handles loading of external variables...
K.
-
Okay... (using Flash 5)
-I draw a Dynamic Textfield and I give the Variable the name myText . I give it wordwrap, because in the future it will contain more text, and it will be non-selectable.
-In the first key frame of the layer of that text field I paste:
// create loadvars object
lv = new LoadVars();
// define function to execute once it has finished loading
lv.onLoad = function () { _root.myText.text = this.stuff;};
// load text file
lv.load("mytext.txt");
-I create a mytext.txt file containing: stuff=hey hello
I export it and run it.. but no text appears... :-/
[Edited by Wicked Mouse on 03-28-2002 at 04:55 PM]
-
If you're using Flash 5, the name of your textfield variable should be the same as the one in your text file, thus not myText but stuff since your text file says:
stuff=hey hello...
-
Okey.. zo.. the textfield gets the Variable: stuff
and the script?.. stays like that?
-
Yeah, the method I posted won't work in Flash 5, it's specific to Flash MX (you did post to the MX forum, after all...)
For F5 follow oldnewbie's advice- name your text field "stuff" (to match the text file), then, on the first frame of the main timeline put:
loadVariables("myfile.txt",this);
Sorry for the confusion,
K.
-
I'm a newbie, so...
Couldn't you just say it STEP-BY-STEP? Not just wave your hands in the air like that like you're some Jedi.
Say it just like I said it... please. Otherwise I won't follow it...
Sorry for annoying you like this..
-
OK, your textfile looks like this:
stuff=hey now
Saved as "myfile.txt".
Open a new flash movie. Draw a dynamic text field, and give it the name "stuff".
Select the first frame of the main timeline. Paste this code into the Actions window:
loadVariables("myfile.txt",this);
Save to the same directory as the textfile and test.
That's it.
K.
-
Alright!! THAT's what I'm talking about!!
And NOW.... I want to scroll the HUGE text, 'cos it doesn't fit in that field
-
For a continuous scroller, the easiest way is to place two buttons on the stage. Select the first (down button) and add the code:
on(press){
_root.scrolldown=true;
}
on(release, releaseOutside,rollOut, dragOut){
_root.scrolldown=false;
}
On the second button (up) put:
on(press){
_root.scrollup=true;
}
on(release, releaseOutside,rollOut, dragOut){
_root.scrollup=false;
}
Now, create a new movie clip symbol. You don't need to put any graphics in it (unless you want to). Place an instance of this clip on the stage. Select it, and paste this into the Actions window:
onClipEvent(enterFrame){
if(_root.scrollup){
_root.stuff.scroll--;
}
else if(scrolldown){
_root.stuff.scroll++;
}
}
HTH,
K.
-
I did as you told... but it won't scroll....
How does that script say which or what to scroll?
-
Ok, try this to start with (we'll get more complex later...). You can delete the buttons and movieclip from the example above for now...
So- you've got your dynamic text field (named"stuff") on stage, loading text from an external file.
Place a button on stage. Select it, and give it the code:
on(press){
_root.stuff.scroll++;
}
This should scroll the text one line everytime it is pressed.
Lemme know if this works, then we'll move on...
K.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|