I think what you want is the following: for the "Up" button: on(click){ _parent.Findings.scroll-=1; } for the "down" button: on(click){ _parent.Findings.scroll+=1; } [quoted text, click to view] "cdeg" <cdegidio@earthlink.net> wrote in message news:c0bfqd$iv8$1@forums.macromedia.com... > I am trying to create scrolling text using scrolling buttons. However, when I > Control > Test Movie, I get a script error message > > These are the steps I have followed to create the scrolling text > > 1) Created a Dynamic text field (Multiline) with an instance name of Findings. > 2)With the Dynamic text field selected, went to top menu and chose Text > > Scrollabl > 2) Filled the Dynamic text field with tex > 3) Created two buttons, converted them to symbols, checking "Button" as the > behavior. The instance names, respectively, were "Up" and "Down > 4) Selected the "Up" button on the Stag > 5) In the Actions panel, navigated from Built-in classes >Movie > TextField > > Properties and then double-clicked Scroll to add it to the Script pane. I > changed instanceName.scroll to Findings.scroll and added += 1; so that the > script appeared as Findings.scroll += 1 > 6) I repeated steps 4 & 5 for the "Down" button and changed the script to read > Findings.scroll -= 1 > 7) Did Control > Test movie and received the message of > > **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement must appear > within on handle > Findings.scroll -= 1 > > **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement must appear > within on handle > Findings.scroll += 1 > > Total ActionScript Errors: 2 Reported Errors: > > Also, when in the Action Panel (with a button selected on the stage), if I > double-click Scroll (which places the script in the Action Script pane) and, > without changing anything in the script, then click "Check syntax" it tells me > that there are syntax errors and gives me the same error message as above > > Could someone please tell me what I have done wrong? And also what Statement > must appear within on handler means and how I can fix it > > Thanks very much. (If this post appears twice, I apologize. I tried to send > it once before and got disconnected from the site >
I am trying to create scrolling text using scrolling buttons. However, when I Control > Test Movie, I get a script error message These are the steps I have followed to create the scrolling text 1) Created a Dynamic text field (Multiline) with an instance name of Findings. 2)With the Dynamic text field selected, went to top menu and chose Text > Scrollabl 2) Filled the Dynamic text field with tex 3) Created two buttons, converted them to symbols, checking "Button" as the behavior. The instance names, respectively, were "Up" and "Down 4) Selected the "Up" button on the Stag 5) In the Actions panel, navigated from Built-in classes >Movie > TextField > Properties and then double-clicked Scroll to add it to the Script pane. I changed instanceName.scroll to Findings.scroll and added += 1; so that the script appeared as Findings.scroll += 1 6) I repeated steps 4 & 5 for the "Down" button and changed the script to read Findings.scroll -= 1 7) Did Control > Test movie and received the message of **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handle Findings.scroll -= 1 **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handle Findings.scroll += 1 Total ActionScript Errors: 2 Reported Errors: Also, when in the Action Panel (with a button selected on the stage), if I double-click Scroll (which places the script in the Action Script pane) and, without changing anything in the script, then click "Check syntax" it tells me that there are syntax errors and gives me the same error message as above Could someone please tell me what I have done wrong? And also what Statement must appear within on handler means and how I can fix it Thanks very much. (If this post appears twice, I apologize. I tried to send it once before and got disconnected from the site
Hi cdeg We used scrolling text for a project at work. Following is the script for the up button (assuming the text field is called "Findings") on(release) Findings.scroll -= ...and the down button on(release) Findings.scroll += I think you just need to add the on(release) handler to your code. I'm certainly no expert, but we had some difficulty with this very issue here, and that is how we solved it Good luck Hilto
You were right, I did need a line referring to the mouse click action, which Hilton happened to know after struggling with the same problem. I wish they would have put that in the User Manual. Thanks so much You wrote: (Sorry,I haven't figured out how to properly execute the "quote" function on this website yet [quoted text, click to view] >I think what you want is the following
for the "Up" button on(click) _parent.Findings.scroll-=1 for the "down" button on(click) _parent.Findings.scroll+=1 "cdeg" <cdegidio@earthlink.net> wrote in messag news:c0bfqd$iv8$1@forums.macromedia.com.. [quoted text, click to view] > I am trying to create scrolling text using scrolling buttons. However when > Control > Test Movie, I get a script error messag > These are the steps I have followed to create the scrolling tex > 1) Created a Dynamic text field (Multiline) with an instance name o Findings > 2)With the Dynamic text field selected, went to top menu and chose Text > Scrollab > 2) Filled the Dynamic text field with te > 3) Created two buttons, converted them to symbols, checking "Button" a th > behavior. The instance names, respectively, were "Up" and "Dow > 4) Selected the "Up" button on the Sta > 5) In the Actions panel, navigated from Built-in classes >Movie TextField > Properties and then double-clicked Scroll to add it to the Script pane. > changed instanceName.scroll to Findings.scroll and added += 1; so that th > script appeared as Findings.scroll += > 6) I repeated steps 4 & 5 for the "Down" button and changed the script t rea > Findings.scroll -= > 7) Did Control > Test movie and received the message o > **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement mus appea > within on handl > Findings.scroll -= > **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement mus appea > within on handl > Findings.scroll += > Total ActionScript Errors: 2 Reported Errors > Also, when in the Action Panel (with a button selected on the stage), i > double-click Scroll (which places the script in the Action Script pane and > without changing anything in the script, then click "Check syntax" i tells m > that there are syntax errors and gives me the same error message as abov > Could someone please tell me what I have done wrong? And also wha Statemen > must appear within on handler means and how I can fix i > Thanks very much. (If this post appears twice, I apologize. I tried t sen > it once before and got disconnected from the sit
Thank you SO much, Hilton. It worked. I have spent 5 hours (I am a reasonably "junior" learner of Flash) trying to figure this out before I found this site. The FlashMX User Manual gave a different script for the scrolling buttons and I could not figure out why it wasn't working Would you happen to know how to make the scrolling run smoothly as opposed to scrolling one text-sized box of text at a time? If not, I will post a separate message asking this question. Thanks again Carme [quoted text, click to view] You wrote >We used scrolling text for a project at work. Following is the script for the
up button (assuming the text field is called "Findings") on(release) Findings.scroll -= ...and the down button on(release) Findings.scroll += I think you just need to add the on(release) handler to your code. I'm certainly no expert, but we had some difficulty with this very issue here, and that is how we solved it. "cdeg" <cdegidio@earthlink.net> wrote in messag news:c0bfqd$iv8$1@forums.macromedia.com.. [quoted text, click to view] > I am trying to create scrolling text using scrolling buttons. However when > Control > Test Movie, I get a script error messag > These are the steps I have followed to create the scrolling tex > 1) Created a Dynamic text field (Multiline) with an instance name o Findings > 2)With the Dynamic text field selected, went to top menu and chose Text > Scrollab > 2) Filled the Dynamic text field with te > 3) Created two buttons, converted them to symbols, checking "Button" a th > behavior. The instance names, respectively, were "Up" and "Dow > 4) Selected the "Up" button on the Sta > 5) In the Actions panel, navigated from Built-in classes >Movie TextField > Properties and then double-clicked Scroll to add it to the Script pane. > changed instanceName.scroll to Findings.scroll and added += 1; so that th > script appeared as Findings.scroll += > 6) I repeated steps 4 & 5 for the "Down" button and changed the script t rea > Findings.scroll -= > 7) Did Control > Test movie and received the message o > **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement mus appea > within on handl > Findings.scroll -= > **Error** Screen=slide1, layer=Layer 1, frame=1:Line 1: Statement mus appea > within on handl > Findings.scroll += > Total ActionScript Errors: 2 Reported Errors > Also, when in the Action Panel (with a button selected on the stage), i > double-click Scroll (which places the script in the Action Script pane and > without changing anything in the script, then click "Check syntax" i tells m > that there are syntax errors and gives me the same error message as abov > Could someone please tell me what I have done wrong? And also wha Statemen > must appear within on handler means and how I can fix i > Thanks very much. (If this post appears twice, I apologize. I tried t sen > it once before and got disconnected from the sit
[quoted text, click to view] You wrote >Hi cdeg
We used scrolling text for a project at work. Following is the script for the up button (assuming the text field is called "Findings") on(release) Findings.scroll -= ...and the down button on(release) Findings.scroll += I think you just need to add the on(release) handler to your code. I'm certainly no expert, but we had some difficulty with this very issue here, and that is how we solved it Good luck Hilto
Hi Carmen, I know you can scroll more than one line at a time (use something like +=3 instead of +=1), but I don't know how to make it scroll *smoothly*. I'm pretty junior myself, sorry! It can be done; you see it out there all over the place. When you find out, please let me know. It's good info to have Thanks Hilto
Thanks, Hilton. Currently it scrolls the number of lines that fill up the text box at a time, which is what I think the += 1 means. (I am not positive about the meaning of the += 1) I.e., You see the first 6 lines of text (which is the maximum number of lines that the box, given its size, can show at a time) and then, when you click the button, it jumps down to the next 6 lines, etc. It's hard to explain. I will do a search of the forum to see if anyone has asked the question before and, if not (or if I don't understand the response), I will post a message asking it myself [quoted text, click to view] You wrote: >>I know you can scroll more than one line at a time (use something like +=3
instead of +=1), but I don't know how to make it scroll *smoothly*. I'm pretty junior myself, sorry! It can be done; you see it out there all over the place. When you find out, please let me know. It's good info to have.
Don't see what you're looking for? Try a search.
|