Number Pyramid
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Number Pyramid

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    3

    Number Pyramid

    Hi Everyone,

    I am trying to reproduce a classic number pyramid in flash.
    Its basically 3 text fields in a row with 2 text fields above them and finally a single text field at the top making a pyramid.

    As you enter numbers in the bottom 3 fields the boxes above will show their addition up to the top box.

    Just like this example:

    http://nrich.maths.org/content/id/2281/pyramid3.swf

    If anyone could point me to a .fla file or offer any help it would be appreciated.

    Cheers
    Phil

  2. #2
    Junior Member
    Join Date
    Aug 2010
    Posts
    3

    Nearly done it :)

    Hi people,

    Ok I've got his and it seems to work fine:

    on (release)
    {
    _root.outputtext = _root.inputone - - _root.inputtwo;
    _root.outputtext2 = _root.inputtwo - - _root.inputthree;
    _root.outputtext3 = _root.outputtext - - _root.outputtext2;

    }

    The only thing is the whole thing is controlled by a button,

    How do I make the text box outputs update real time as I enter the 3 values?

    Cheers
    Phil

  3. #3
    Member
    Join Date
    Jul 2012
    Posts
    39
    Hmm, try TextEvent.TEXT_INPUT...

  4. #4
    Junior Member
    Join Date
    Feb 2014
    Location
    Bangladesh
    Posts
    21
    I was searching for this solution, thanks philrober

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

Poll by Flashkit.com