A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Variable adding problem, Please can you help?

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Location
    U.K
    Posts
    23

    Variable adding problem, Please can you help?

    Hi anyone can you please help, i'm running CS3 action script 2.

    I have made two input text boxes, their variables being AuthorBox and YopBox

    I have a dynamic text box with the vairable name ResultsBox


    What I want is Dynamic text box to equal something like

    ResultsBox = AuthorBox + ". (" + YopBox + ")"

    So that the dynamic text box displays something like this

    Smith. A. (1997)

    I have created a button with the following code attached to it but it just shows the AuthorBox variable on its own.

    on (release) {
    ResultsBox = AllText + ". (" + YopBox + ")"
    }


    Can you please help????? Would be much appreciated and the final program will help a lot of people.

    Thanks

    Bottlebank

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    what is AllText? and can you post your FLA file?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Junior Member
    Join Date
    Jan 2012
    Location
    U.K
    Posts
    23
    Sorry typed it in wrong

    on (release) {
    ResultsBox = AuthorBox + ". (" + YopBox + ")";
    }


    Sorry am a newbie, how do i upload the FLA to the thread?

    Bottlebank

    Thanks for your time btw.

  4. #4
    Junior Member
    Join Date
    Jan 2012
    Location
    U.K
    Posts
    23
    I think it should be attached now
    Attached Files Attached Files

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    try this

    Actionscript Code:
    //declare empty variables first

    AuthorBox = "";
    YopBox = "";
    ResultsBox = "";
    // probably do all
    // also can be used as clear form button etc.

    //button command

    ResultsBox = Author.text + ". (" + YearofPublication.text + ")";

    it now works

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