Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-15-2011, 08:02 PM   #1
benjio21
Senior Member
 
Join Date: Jan 2011
Location: uk
Posts: 502
Send a message via Skype™ to benjio21
Default why s my text not showing???

in my function i have a dynamic text fild but the text only shows the first letter of what i write marked in the code below. also the other 2 texts field show nothing. but i get no errors can any1 explain why?

ActionScript Code:
private function findWinner(hand:Array):void         {             var dealer:Object = dealerCards[0];             var name:String = dealer.cardName;             var suit:String = dealer.cardType;             var value:int = dealer.cardValue;             playerWins = false;             for each (var card:Object in hand)             {                 if (card.cardType == suit && card.cardValue >= value)                 {                     playerWins = true;                     break;                 }             }             if (playerWins)             {                 playerwallet.amount +=  bet1;                 banker.bankAmount -=  bet1;                 text_field.text = "Player wins!";                 trace(playerwallet.amount);             }             else             {                 playerwallet.amount -=  bet1;                 banker.bankAmount +=  bet1;                 text_field.text = "Dealer wins!";                 trace(playerwallet.amount);                 }             deal_btn.addEventListener(MouseEvent.CLICK, dealCards);             checkForGameOver();         }
benjio21 is offline   Reply With Quote
Old 04-15-2011, 08:13 PM   #2
trujuice
Member
 
Join Date: Feb 2005
Posts: 73
Default

make sure that you have your fonts character set embedded
trujuice is offline   Reply With Quote
Old 04-15-2011, 08:14 PM   #3
sparX
!Senior Member
 
Join Date: Jan 2010
Posts: 1,675
Default

Hard to say if we can't see the creation of the textFields.
I assume your just creating them on the authoring stage?
If so check the settings, maybe your alignment settings are wrong or maybe you only have the Uppercase letters embeded not the lower case or something...
sparX is offline   Reply With Quote
Old 04-15-2011, 08:25 PM   #4
benjio21
Senior Member
 
Join Date: Jan 2011
Location: uk
Posts: 502
Send a message via Skype™ to benjio21
Default

thanks you guys
prob sorted.

ben
benjio21 is offline   Reply With Quote
Old 04-16-2011, 08:04 PM   #5
benjio21
Senior Member
 
Join Date: Jan 2011
Location: uk
Posts: 502
Send a message via Skype™ to benjio21
Default

my amounts are not showing in my text fields. the "player wins!" is.
can any1 help. i have 2 dynamic text fields on the stage names bank_txt & wallet_text.
the amounts are held in classes but cant get the to show up. i dont get no errors and if i trace the wallet after a bet it works correct. just cant get it to show..

ActionScript Code:
private function init(e:Event=null):void         {             removeEventListener(Event.ADDED_TO_STAGE,init);             playerwallet = new playerWallet;             banker = new Bank;             playerBet = 0;             betBox1 = new betBox  ;             gameOver = false;             legalBet = true;             deck = new CardDeck("blackjack");             wallet_txt.text = String(playerwallet.amount);             bank_txt.text = String(banker.bankAmount);             playerContainer = new Sprite();             addChild(playerContainer);             dealerContainer = new Sprite();             addChild(dealerContainer);             deal_btn.addEventListener(MouseEvent.CLICK,dealCards);         }

thanks

ben
benjio21 is offline   Reply With Quote
Old 04-16-2011, 08:58 PM   #6
trujuice
Member
 
Join Date: Feb 2005
Posts: 73
Default

make sure you have the numbers character set of your font embedded too
trujuice is offline   Reply With Quote
Old 04-16-2011, 09:07 PM   #7
benjio21
Senior Member
 
Join Date: Jan 2011
Location: uk
Posts: 502
Send a message via Skype™ to benjio21
Default

thank you sorted now
benjio21 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:29 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.