A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: Not so smart clip? The scrollbar component?

  1. #1
    Junior Member
    Join Date
    Jan 2001
    Posts
    29

    Thumbs up

    Hi--

    Has anyone used Flash MX on the Mac and experienced when a scrollbar component is used with a dynamic text field (pulling text from an external source), the scroll funcationality does not work? I have properly targetted the dynamic text field. What is going on? Anyone else have this problem? Am I missing a step????

    Thanks!!!

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    266
    Hi,

    yes it works fine, so you are probably missing a step.

    Without knowing how you have tried to use the component, and exactly what doesn't work, I can't advise you as to where you are going wrong.

    Have you read up on the scrollbar component???

    If yes, post more details, and someone will gladly help you out.

    Dan.


  3. #3
    Junior Member
    Join Date
    Jan 2001
    Posts
    29
    HI-- thanks for the reply.

    Well, this is what I basically did. I did a dynamic text box, and named it with the variable name: about_english

    The external text file is called "about_english" and has the text in it with the variable name there "about_english". I have an action at the same time that just says loadVariablesNum("about_english.txt", 0);

    This is just pulling the text to be displayed within the dynamic text box.

    I then grabbed the scrollbar component and dragged it to the right/on top of the dynamic text field, where it recognized the variable name and what it should be controlling. I have the text in multiline as well.

    So I am not sure what is happening with this. The text is displaying fine, the scrollbars do not work. I am not even getting the little scroll block within the up and down scrollbars.

    Hope someone knows what I am missing! Its happened to me several times. I think one time I went into the dynamic text block and did a bunch of carriage returns, and it worked once, but now it isn't working.

    Help!

    -Alexis

  4. #4
    (sic) Covenent's Avatar
    Join Date
    Dec 2000
    Location
    Ireland
    Posts
    709
    I have barely actually used the Macromedia components, but yesterday I was making something and I decided to use the scrollbar component. I created a dynamic text field, and place a scrollbar onto it, then I loaded a tring from an XML file into the dynamic text field. The text field is receving the string and is displaying it, but the scrollbar is still disabled and wont scroll the text field even though the text field is multiline, and the text exceeds the text fields height.

    I dont know why the scrollbar doesnt update. Im using Windows 98, so its not a Mac thing.

  5. #5
    Junior Member
    Join Date
    Jan 2001
    Posts
    29
    See--- That's the exact same problem I have. It seems that this is a problem with data that is pulled into the component. I got the scrollbar to work when I put the text in the actual box, but it won't work when its pulled dynamically. Whats up witth that?!?

  6. #6
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    To activate the scrollbar after attaching it, you need to go to one of the menues (don't have flash here so can't tell which) and then click on scrollbar. The white square box in your textfield will become black. Then put your text in and it works ON A MAC!

  7. #7
    Senior Member
    Join Date
    Nov 2001
    Posts
    667
    Make sure you are using myTextInstanceName.text = "blah" and not myTextVarName = "blah"

  8. #8
    Junior Member
    Join Date
    Jan 2001
    Posts
    29

    Angry Huh?

    I'm don't understand what menu you set that in. If you are talking about the properties menu, I have set the target there already. I have a dotted box oultline anyway because my text is dynamic. What is the menu you go to? It sounds like you are refering to when you have text that you paste into the text block in flash. We are talking about pulling text dynamically from an external file. There is nothing to be pasted into this box in the actual flash file...

    Anyone else have an idea?

    -Alexis

    Originally posted by cancerinform
    To activate the scrollbar after attaching it, you need to go to one of the menues (don't have flash here so can't tell which) and then click on scrollbar. The white square box in your textfield will become black. Then put your text in and it works ON A MAC!

  9. #9
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Sorry overlooked that you are using external file. Have not tried it but I am interested how it works.

  10. #10
    Junior Member
    Join Date
    Jan 2001
    Posts
    29
    Originally posted by etcettra
    Make sure you are using myTextInstanceName.text = "blah" and not myTextVarName = "blah"
    I am putting this name in the component input box under "target text field", which is the name of my instance of my dynamic text box.

    Do I need to put what you wrote somewhere in the timeline as an action on its own?

    Still haven't been able to get it to work.... Have you done it like this?

    Anyone else?? I am in a bind...

  11. #11
    Senior Member
    Join Date
    Nov 2001
    Posts
    667
    But when you are asinging the text to the field are you using the variable name or instanceName.text property of the text field? If you use the variable name the scroll bar will not work.

  12. #12
    Junior Member
    Join Date
    Jan 2001
    Posts
    29
    Originally posted by etcettra
    But when you are asinging the text to the field are you using the variable name or instanceName.text property of the text field? If you use the variable name the scroll bar will not work.
    Ok, I am not really good in ActionScript, so I am sure this is where the problem is....

    This is what I am doing. I put in the following action:
    loadVariablesNum("about_english.txt", 0);

    In the text file, I tell it : about_english=
    Then I have the actual text that will go in there after that.

    So in the dynamic text box, I give the text box the variable name "about_english" (I type this in the properties inspector box). Then I use the instance name "about_english" on that dynamic text box. I refer to that instance name with my scrollbar.

    How should I set it up, if this isn't the way to do it and there is a simpler and better way? I don't know how to put it as you are explaining it...

    I appreciate your help!

  13. #13
    Senior Member
    Join Date
    Nov 2001
    Posts
    667
    Take out the variable name for your text box (leave it blank) and use this code to load your txt file:

    Code:
    aeLoader = new LoadVars();
    aeLoader.load("about_english.txt");
    aeLoader.onLoad = function() {
    	about_english.text = aeLoader.about_english;
    }

  14. #14
    Vox = Voice Vox98's Avatar
    Join Date
    Mar 2001
    Posts
    879

  15. #15
    Junior Member
    Join Date
    Jan 2001
    Posts
    29
    Hi!

    Thanks a lot for the responses. The last two replies work! But! (I knew this wouldn't be so easy), I have some text that has an "&" and different accents (for Spanish and Portuguese) being read in from these text files. Whenever it gets to one of the symbols, flash won't display the text from that point on. I put it in as html format too, and it seems like some basic HTML tags work, like <B> for BOLD, but HTML entities do not work, like &amp; for the "&". Does the component not work with this??? Anyone read in a text file that has different characters that need to be used??? Thanks!

  16. #16
    Senior Member
    Join Date
    Nov 2001
    Posts
    667
    If you have things showing up a: &ampamp etc. then you need to se the text field to render as html, and use txtField.htmlText = whatever instend of txtField.text = whatever. Otherwise, if this isn't your problem then the only other way I know of is to url encode the characters in the txt file. Heres a link with the codes (remember you'll need to unescape the strings you import):

    http://www.macromedia.com/support/fl...l_encoding.htm

  17. #17
    (sic) Covenent's Avatar
    Join Date
    Dec 2000
    Location
    Ireland
    Posts
    709
    Originally posted by etcettra
    Make sure you are using myTextInstanceName.text = "blah" and not myTextVarName = "blah"
    Cheers that exactly the answer, for everything else I have made I used to set the text of a dynamic text field like that, but I didnt for this for some reason...

    Anyway cheers again!

  18. #18
    Junior Member
    Join Date
    Jan 2001
    Posts
    29
    Thanks a bunch for the help! That last tip wrapped it up for me! I have to catch up on the more technical side of flash. Its pretty tricky to keep on top of! Thanks again for all your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center