A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Variables Problem

Hybrid View

  1. #1
    Senior Member
    Join Date
    Sep 2001
    Location
    Toronto, Canada
    Posts
    701

    Variables Problem

    I am using variables in my flash website. I am using Flash MX.

    I want a html link mixed in with the text.
    I checked a tutorial and this is how they said to put it like this.
    text = "<a href=\"http://www.peelreferral.ca/m_22.asp\"><u>"

    It doesn't work it just shows up like this when I preview it and there is not functionality.

    All help greatly appreciated.

  2. #2
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    text.html=true;

    you need to assign it to accept html first.

  3. #3
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    Also, assign your text to htmlText, not just text:

    yourTxt.html = true;
    yourTxt.htmlText = "<a href=\"http://www.peelreferral.ca/m_22.asp\">click me</a>"

    _b

  4. #4
    Senior Member
    Join Date
    Sep 2001
    Location
    Toronto, Canada
    Posts
    701
    when I put in that code- nothing happens - nothing show up
    yourTxt.html = true;
    yourTxt.htmlText = "<a href=\"http://www.peelreferral.ca/m_22.asp\">click me</a>"

    Is there something else I need to do?

  5. #5
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    the textfield has to have an instance name (not variable name) of yourTxt, which of course can be any name you please.
    _b

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Location
    Toronto, Canada
    Posts
    701
    I tried that, but now it says my movie features that flash player 5 does not supoort.
    WARNING: This movie uses features that are not supported in the Flash 5 player
    Symbol=Text Area, layer=Text, frame=1:Flash MX Text Field Instance Name



    Is there a way to change the flash player that I am using?This is only for the testing the movie. I have flash player 8 on my machine.

  7. #7
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    If you're authoring in flash 5, you may not be able to use this. Try opening the swf in a browser (which'll have FP8). If it still doesn't work, flash 5 may not be able to compile AS2.0 stuff. IF this is the case, I can't help further, I wasn't much of an ASer back when I used 5. Good luck.

    _b

  8. #8
    Senior Member
    Join Date
    Sep 2001
    Location
    Toronto, Canada
    Posts
    701
    I actually have Flash MX but I downloaded this template for a site from a animation site. It may have orginally been a Flash 5 file.

    I have saved the file as a Flash MX 2004 document.
    I am wondering if I should try to just put in a regular scrollbar component and forgo the variables. Any thoughts?

    I appreciate all the help.

    Taz

  9. #9
    Senior Member
    Join Date
    Sep 2001
    Location
    Toronto, Canada
    Posts
    701
    I sorted out the problem with the Flash 5 player. I can compile the movie now without errors.

    The link is still not showing up though.

    I would be willing to send the fla to someone if they wanted to take a look and see if they can help.

    Taz

  10. #10
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    just post the .fla here in the thread. I'll be happy to take a look for you.

    _b

  11. #11
    Senior Member
    Join Date
    Sep 2001
    Location
    Toronto, Canada
    Posts
    701
    The fla is posted at:
    http://www.ecaledonhills.com/CHE/
    there is only one fla posted in that file.

    It is the link area that I am having problems. In the library, it is in the Movie folder and it is called Text Area.It is frame 5 of text variables.


    Aside from the link problem with the variables, I was wondering if it is possible to post images or buttons within the variables?

    Appreciate the help.

    Taz

  12. #12
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    All set, just replace ALL of your code with this and follow the pattern for your other three links.

    yourTxt.html = true;
    yourTxt.htmlText = "<a href=\"http://www.peelreferral.ca/m_22.asp\">Peel Referral Association.</a>"+newline+newline+"CALEDON CHAMBER OF COMMERCE"+newline+newline+"DOGDE BAENA - PHOTOGRAPHER"+newline+newline+"HARDING & ASSOCIATES - COMPUTER REPAIR";
    title = "LINKS";

    as far as your second question, I don't think i'm quite sure what you're asking. There aren't any variables in use in this section. Can you be more explicit with what you want.

    _b

  13. #13
    Senior Member
    Join Date
    Sep 2001
    Location
    Toronto, Canada
    Posts
    701
    Thanks that worked.

    Just had problems getting each link on a different line. The +newline+newline+ does not seem to work when I have two links in a row.

    For my second question, where that text is that you just helped me with - the text is in a text variables. I want to put several sample pictures that will act as a button to link to different websites. So these pictures need to appear within the scrollpane just as the links did.

    Any suggestions?

    Thanks for all the great help.

    Taz

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