A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: advisor to the king

  1. #1
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    advisor to the king

    I subscribe to a cool magazine called "Make"(makezine.com) in the current issue was a simple basic program called proverbs that I thought was cute so I coverted it to flash..

    http://bretlanius.com/flash/advisor.html

    Very simple Actionscript
    PHP Code:
    randomRange=function(Min,Max){

        return 
    Math.floor((Math.random()*Max-Min+1)+Min);


    part1 = new Array("A bird in the hand","A friend in need","A job worth doing","A little knowledge","A stolen pleasure","A thing of beauty","Absolute power","All work and no play","Anger","Blind ambition","Charity","Crime","Curiosity","Envy","Evil","Generosity","God in his wisdom","Haste","Heaven above","Hindsight","Honesty","Impulsive behavior","Jealousy","Love","Misery","Money","Much ado about nothing","One good turn","Pride","Procrastination","Regret","Revenge","Selfishness","Success","The devil you know","The darkest hour","The early bird","The pursuit of happiness","The road less travelled","The road to hell");
    part2 = new Array("breeds contempt.","brings happiness.","can work miracles.","cannot buy happiness.","comes before a fall.","comes to those who wait.","corrupts absolutely.","costs nothing.","does nobody any good.","doesn't pay.","has a silver lining.","heals all wounds.","hurts.","is a dangerous thing.","is a joy forever.","is a mixed blessing.","is bad news.","is best forgotten.","is better than nothing.","is bliss.","is cheap.","is good news.","is its own reward.","is next to godliness.","is only skin deep.","is often spoken in jest.","is sweet.","is the best medicine.","is the best policy.","is the root of all evil.","is the path to wisdom.","is a thing of beauty.","justifies the means.","kills.","lasts forever.","leads to a lifetime of regret.","makes you stronger.","pleases no one.","speaks louder than words.","will move mountains.");

    btn1.onRelease=function(){
    x1=randomRange(0,part1.length-1)
    x2=randomRange(0,part2.length-1)
        
    p1=part1[x1];
        
    p2=part2[x2];
        
    txt1.text=p1+" "+p2
        


  2. #2
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Quote Originally Posted by blanius
    Very nice.
    Initially, I thought it's an "advisor to Bob H".

  3. #3
    That web bloke Stoke Laurie's Avatar
    Join Date
    Jan 2006
    Location
    England
    Posts
    869
    It gave me
    Anger is the best medicine!
    Then
    Anger speaks loder than words!
    Wise words indeed

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Yeah cracked me up too.....

    What I love about KM is that I threw this together in 5 minutes, clip art from Microsoft and a font I had then converting the basic code to AS1

  5. #5
    Ubi bene, ibi patria Nightcap's Avatar
    Join Date
    Jun 2007
    Location
    GA, USA
    Posts
    184
    Success can work miracles.

    and

    Money is bad news.

    Really nice Blanius and thanks for the code!

    Everybody thinks of changing humanity,
    Nobody thinks of changing himself.

  6. #6
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I like this one
    Impulsive behavior makes you stronger.

  7. #7

  8. #8
    Member
    Join Date
    Dec 2005
    Location
    Utah
    Posts
    98
    Fun stuff! Thanks!

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