Professional Web Applications Themes

Help Loading a email address into a dynamic text box - Macromedia Flash Actionscript

Hello, I need some help trying to get the html formatting into a dynamic text box. My text box instance name is email, i am using a text file to store custom data in so I can change the interface on my project by just changing the values in the text file. I have selected the render as html in the properties for this text box but nothing seems to work to have the text format when its called from the file. I have searched the net and cant seem to find an example of formatting a email so it ...

  1. #1

    Default Help Loading a email address into a dynamic text box

    Hello,

    I need some help trying to get the html formatting into a dynamic text box.
    My text box instance name is email, i am using a text file to store custom
    data in so I can change the interface on my project by just changing the
    values in the text file.

    I have selected the render as html in the properties for this text box but
    nothing seems to work to have the text format when its called from the file.
    I have searched the net and cant seem to find an example of formatting a
    email so it can be clicked on.

    My code is as follows

    // Load text as variable and assign it to dynamic text field
    custom_lv = new LoadVars();
    custom_lv.onLoad = onText;
    custom_lv.load("custom.txt");
    function onText() {
    salesman.text = custom_lv.rl_salesman;
    phone.text = custom_lv.rl_phone;


    email.htmlText = "<a href='mailto:" + custom_lv.rl_email + "'>" + "</a>"

    I thought this would work but it doesnt. Can someone tell me what I am doing
    wrong?


    This is the line in the custom.txt file I am hoping to format.

    &rl_email=guyhisdomain.com

    TIA for any help

    Rick


    Run Guest

  2. #2

    Default Re: Help Loading a email address into a dynamic text box

    What you might do is just put an invisible button on top of the email
    address field. Then pass the email you get to a function on the button that
    will call getURL("mailto: [myEmail]")

    Flash has limited HTML: formatting capabilities and does not interact
    entirely with the browser functions. And the you could just style the text
    so it looks like the default blue/underline of a traditional link.

    HTH
    -Ken

    "Run" <runu4comcast.net> wrote in message
    news:c1lbv8$sf$1forums.macromedia.com...
    > Hello,
    >
    > I need some help trying to get the html formatting into a dynamic text
    box.
    > My text box instance name is email, i am using a text file to store custom
    > data in so I can change the interface on my project by just changing the
    > values in the text file.
    >
    > I have selected the render as html in the properties for this text box but
    > nothing seems to work to have the text format when its called from the
    file.
    > I have searched the net and cant seem to find an example of formatting a
    > email so it can be clicked on.
    >
    > My code is as follows
    >
    > // Load text as variable and assign it to dynamic text field
    > custom_lv = new LoadVars();
    > custom_lv.onLoad = onText;
    > custom_lv.load("custom.txt");
    > function onText() {
    > salesman.text = custom_lv.rl_salesman;
    > phone.text = custom_lv.rl_phone;
    >
    >
    > email.htmlText = "<a href='mailto:" + custom_lv.rl_email + "'>" + "</a>"
    >
    > I thought this would work but it doesnt. Can someone tell me what I am
    doing
    > wrong?
    >
    >
    > This is the line in the custom.txt file I am hoping to format.
    >
    > &rl_email=guyhisdomain.com
    >
    > TIA for any help
    >
    > Rick
    >
    >

    Ken Silanskas Guest

  3. #3

    Default Re: Help Loading a email address into a dynamic text box

    The reason your not seeing anything is because there's nothing to show ;-)

    try replacing

    "<a href='mailto:" + custom_lv.rl_email + "'>" + "</a>"

    with:

    email.htmlText = "<a href='mailto:" + custom_lv.rl_email + "'>" +
    "myemaillink</a>";

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  4. #4

    Default Re: Help Loading a email address into a dynamic text box

    John,

    Just wanted to say thank you for the help, I sent it in email and it bounced
    back. I was hoping I could get you to look at something else I tried to see
    if I can understand it better.

    I realized what I did when I saw your post, not use to flash action script
    at all, but the app I am doing is going to be a projector and I wanted the
    visual text assigned to this button to reflect the actual value in the
    rl_email. So I used the following code

    // Load text as variable and assign it to dynamic text field
    custom_rlu = new LoadVars();
    custom_rlu.onLoad = onText;
    custom_rlu.load("custom.txt");
    function onText() {
    salesman.text = custom_rlu.rl_salesman;
    trace ("salesman = " + salesman.text) ;
    phone.text = custom_rlu.rl_phone;
    trace ("phone = " + phone.text ) ;
    trace ("email.text before set = " + email.text) ;
    trace ("email.htmlText before set = " + email.htmlText) ;
    email.htmlText = custom_rlu.rl_email;
    trace ("email.htmlText after set = " + email.htmlText) ;
    }



    The problem I am having is when I test the movie or debug I check the value
    of email.htmlText and it contains three copies of the value of rl_email and
    some formatting that isn't even set as they are in properties for the
    instance of the text box. This is most evident in that I have center
    selected and it is aligning left. I added the traces to see if the value was
    empty first and it is, but it then fills with the following which while
    being three copies still doesn't work. The value that prints to the screen
    is a pair of double quotes which is I think due to the last two characters.

    Here is the output of the trace;

    salesman = Cool Salesguy
    phone = 555-555-5555
    email.text before set =
    email.htmlText before set =
    email.htmlText after set = <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT
    FACE="Gill Sans MT" SIZE="15" COLOR="#FFFFFF">&quot;<A HREF="mailto:"
    [email]Guyhisdomain.com[/email] "" TARGET="">&quot;
    </A></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT
    FACE="Gill Sans MT" SIZE="15" COLOR="#FFFFFF"><A HREF="mailto:"
    [email]Guyhisdomain.com[/email] "" TARGET=""></A></FONT></P></TEXTFORMAT><TEXTFORMAT
    LEADING="2"><P ALIGN="LEFT"><FONT FACE="Gill Sans MT" SIZE="15"
    COLOR="#FFFFFF"><A HREF="mailto:" [email]Guyhisdomain.com[/email] ""
    TARGET="">&quot;Guyhisdomain.com</A>&quot;</FONT></P></TEXTFORMAT>


    Really appreciate your help in this and for past help as well.

    Thanks again

    Rick




    "Laiverd.COM" <share_your_knowledgesomeserver.com> wrote in message
    news:c1ls05$of2$1forums.macromedia.com...
    > The reason your not seeing anything is because there's nothing to show ;-)
    >
    > try replacing
    >
    > "<a href='mailto:" + custom_lv.rl_email + "'>" + "</a>"
    >
    > with:
    >
    > email.htmlText = "<a href='mailto:" + custom_lv.rl_email + "'>" +
    > "myemaillink</a>";
    >
    > John
    >
    > --
    > --------------------------------------------------------------------------
    --
    > -----------
    > RESOURCES
    > [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    > --------------------------------------------------------------------------
    --
    > -----------
    > TUTORIALS at
    > [url]www.laiverd.com[/url]
    > Flash & PHP Emailform
    > Using textfiles in Flash
    > --------------------------------------------------------------------------
    --
    > -----------
    >
    >

    Run Guest

  5. #5

    Default Re: Help Loading a email address into a dynamic text box

    Ken,

    That's a very good alternative, thank you for the suggestion. I am hoping to
    get the normal way working if I can though.


    Thanks again

    Rick




    "Ken Silanskas" <ksilansdillstarproductions.com> wrote in message
    news:c1lh9c$97m$1forums.macromedia.com...
    > What you might do is just put an invisible button on top of the email
    > address field. Then pass the email you get to a function on the button
    that
    > will call getURL("mailto: [myEmail]")
    >
    > Flash has limited HTML: formatting capabilities and does not interact
    > entirely with the browser functions. And the you could just style the text
    > so it looks like the default blue/underline of a traditional link.
    >
    > HTH
    > -Ken
    >
    > "Run" <runu4comcast.net> wrote in message
    > news:c1lbv8$sf$1forums.macromedia.com...
    > > Hello,
    > >
    > > I need some help trying to get the html formatting into a dynamic text
    > box.
    > > My text box instance name is email, i am using a text file to store
    custom
    > > data in so I can change the interface on my project by just changing the
    > > values in the text file.
    > >
    > > I have selected the render as html in the properties for this text box
    but
    > > nothing seems to work to have the text format when its called from the
    > file.
    > > I have searched the net and cant seem to find an example of formatting a
    > > email so it can be clicked on.
    > >
    > > My code is as follows
    > >
    > > // Load text as variable and assign it to dynamic text field
    > > custom_lv = new LoadVars();
    > > custom_lv.onLoad = onText;
    > > custom_lv.load("custom.txt");
    > > function onText() {
    > > salesman.text = custom_lv.rl_salesman;
    > > phone.text = custom_lv.rl_phone;
    > >
    > >
    > > email.htmlText = "<a href='mailto:" + custom_lv.rl_email + "'>" + "</a>"
    > >
    > > I thought this would work but it doesnt. Can someone tell me what I am
    > doing
    > > wrong?
    > >
    > >
    > > This is the line in the custom.txt file I am hoping to format.
    > >
    > > &rl_email=guyhisdomain.com
    > >
    > > TIA for any help
    > >
    > > Rick
    > >
    > >
    >
    >

    Run Guest

  6. #6

    Default Re: Help Loading a email address into a dynamic text box

    You might wanna doublecheck that the textfield is indeed set to be html
    enabled. Otherwiese zip and upload the file somewhere (including textfile)
    so we can have a look.

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  7. #7

    Default Re: Help Loading a email address into a dynamic text box

    Hello there,

    I'm having the same problem...

    please look at

    [url]www.mataborrao.com/comunicacao[/url]

    on the mailing list, I would be happy if I can mouseover those email adresses
    and have an email link for each.

    It?s all the same, a txt file, loaded into an dynamic html enabled box

    Hopping to ear from you

    Pluda

    Pluda Guest

Similar Threads

  1. Loading dynamic text, xml or php
    By Sbisa in forum Macromedia Dynamic HTML
    Replies: 6
    Last Post: September 20th, 11:15 AM
  2. How to extract an email-address from a text file
    By Jerry in forum PHP Development
    Replies: 5
    Last Post: August 3rd, 10:37 PM
  3. Dynamic Text Box...not loading properly?
    By ready2buz webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: September 29th, 02:18 PM
  4. loading dynamic text swf (into movie)
    By Suburban Hero in forum Macromedia Flash
    Replies: 0
    Last Post: August 19th, 02:34 PM
  5. Loading Dynamic Text
    By JustinRFalk webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 2
    Last Post: July 21st, 08:30 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139