my interests and experiences
RSS icon Email icon Home icon
  • Flash - dynamic text color and styles

    Another nuance of dynamically loaded text. In order to have your dynamic text have different colors or styles, what you need to do is select the “Render as HTML” button in the properties for your text box. Click either Bold or Italic, in the properties pane, then you need click the embed font button and select the character you want to embed. This will allow you to style that text box with the style you chose.

    If however you want to change the text within the same text box that requires a bit more work. You will have to create 3 text boxes 1 on stage and 2 off stage. The one on stage will be the normal style. Embed the characters for that text box, and then for the other two off stage, set one to be bold and the other to be italic, and then embed the characters for those. This will allow you to add dynamic HTML content that has both bold and italic styles in one text box.

    I have also found that you should write out in long hand the < and > symbols as &amp;&lt; and &amp;&gt;. Flash doesn’t seem to like to load the content if you aren’t typing them out that way.

    One final thing about text color in a dynamic text box. This can be achieved by using the deprecated HTML font tags and adding your color to them. For example:

    <FONT COLOR='#721d87'><B>www.grogler.com</B></font>

    NOTE - Be sure to use the long hand version of the greater than and less than symbols.

  • Flash Scrollpane - mouse wheel

    This was something that was driving me nuts a few months ago so I thought I would add it here. When I was dynamically loading content into a scrollpane in flash, I wanted to use the mouse wheel to scroll the content. I could adjust the amount that it would scroll by using:

    ///my_sp is the instance of the scrollpane
    my_sp.vLineScrollSize = 50;

    But it seemed to just randomly scroll every once in a while. I realized that is was because the mouse pointer just happened to be on the loaded text at that given time. So the work around I found for this was to add a rectangle to the lower most layer of the movieclip that was being loaded into the scrollpane. I set the alpha of it to zero and wahlah - it worked. Seems like a flaw in the scrollpane if you ask me.

  • Hello world!

    I am in the midst of redesigning my site, if you couln’t tell already. I will try it have as much info up asap. thanks for the patience.