SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing Textbox Font with Actionscript

    I have an input box that I want to change the font of from Actionscript. The font value will be retrieved from ASP, but I can deal with that part. I CAN'T just set the value of the textbox equal to an HTML string containing the font because I will later retrieve the string, and don't want HTML in it.

    So basically, I need a way to set the font of a textbox to that of a value stored in a variable. Is this possible or will I be forced to do the loadVariables + HTML route?

  2. #2
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about using the font symbol functionality? It's not something i have used yet but plan to in my next project or two and i have thought a bit about so this is blue sky guessing, not hard fact. I believe you can define a font as a font symbol in a similar way to using a symbol from a shared library (it is not embeded in the movie but sits in another movie with other shared library items). Then, depending on what variable values are sent to your main movie from your ASP, you can define what font symbol to load from the shared library.

    Maybe?

    Check out Macromedia note

    I would be interested to know if this is possible but haven't tried it myself yet.

  3. #3
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read this help file on your hard drive:

    C:\Program Files\Macromedia\Flash 5\Help\UsingFlash\ContextHelp.htm

    The you should be able to assign the font symbol as a variable to the Input box in the Variable field.

    Just an idea.

    Glen

  4. #4
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, that won't work either. This Flash movie is for a frontend to an app that is mostly backend based. Since I am not the only user, I cannot just embed fonts like this, fonts used could be anything that the software user chooses (any system font).

    Basically I am wondering if there is a property such as TextBoxName.Font or something that would allow me to do this.

  5. #5
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, i know what your aiming at now but i don't know any way of doing it in flash 5. Basically you're wanting to allow the user to define the font used in a text box in a flash movie from their own system fonts. Is that right? I suppose it is similar to problem of dynamically inserting images into a flash movie on request but with fonts, a bit of a weak suggestion but maybe perhaps Flash 6 could help out?

  6. #6
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by appy
    Ah, i know what your aiming at now but i don't know any way of doing it in flash 5. Basically you're wanting to allow the user to define the font used in a text box in a flash movie from their own system fonts. Is that right? I suppose it is similar to problem of dynamically inserting images into a flash movie on request but with fonts, a bit of a weak suggestion but maybe perhaps Flash 6 could help out?
    No, I think he just wants to be able to change the font used in the Input box simply as you would do it in HTML but using the method he defined in his first post.

    Glen

  7. #7
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by glenplake


    No, I think he just wants to be able to change the font used in the Input box simply as you would do it in HTML but using the method he defined in his first post.

    Glen
    Yeah, thats all I want. I know that if I set the textbox to accept HTML that I can set the textbox variable to <font face="somefont" size="10">, but I do not want to do that unless their is no other way. Are there any Flash gurus out there that know how to do this?

  8. #8
    Pixel Junkie flux's Avatar
    Join Date
    Apr 2001
    Location
    Brussels Belgium
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I know, there's no other way...maybe something to put on the Flash 7 wishlist? I will be really surprised if they would already have this feature in the upcoming version (6).


Bookmarks

Posting Permissions

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