LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




ReplyREPLY THREAD
 
Thread Tools Display Modes
  #1  
Old 11-22-2006, 09:00 PM
mb81 mb81 is offline
Registered User
 
Join Date: Nov 2006
Posts: 3
Rep Power: 0
mb81 is on a distinguished road
Dynamic text is not keeping the style sheet

We have developed a pretty extensive flash project that has multiple scenes and such. In each scene, there is a Dynamic text box loading external content and loading an external style sheet and applying that style to the dynamic text. It seems we are having intermittent problems with the dynamic text not following the style sheet if we flip back and forth between the scenes. Sometimes we will come back and it will fine, then we do the same thing again and the dynamic text is showing up again unstyled.

Any ideas on what we are doing wrong?
Reply With Quote
  #2  
Old 11-22-2006, 09:02 PM
[PAUL FERRIE]'s Avatar
[PAUL FERRIE] [PAUL FERRIE] is offline
Glasgow Flash Developer
 
Join Date: Feb 2005
Location: United Kingdom
Posts: 7,756
Rep Power: 16
[PAUL FERRIE] is on a distinguished road
Hi mb81 welcome to FM
Most developers should/would tell you that it is genrally a bad idea to use scene's. There is a post round here some where about it. Scottea was the thread poster i think.
__________________
.:To me AS is like LEGO, Only for the big Kids :.
- Site - Blog - Glasgow Flasher - Activeden

- bringmadeleinehome.com
Reply With Quote
  #3  
Old 11-22-2006, 09:18 PM
mb81 mb81 is offline
Registered User
 
Join Date: Nov 2006
Posts: 3
Rep Power: 0
mb81 is on a distinguished road
I don't control how it's put together, I am doing the actionscript/functionality portion. Do you have some advice that can actually help me?
Reply With Quote
  #4  
Old 11-26-2006, 12:04 AM
jason456's Avatar
jason456 jason456 is offline
Registered User
 
Join Date: Jul 2006
Posts: 35
Rep Power: 0
jason456 is on a distinguished road
being rude won't get you anywhere.
__________________
My site - Click here
My flash page - Click here
Reply With Quote
  #5  
Old 11-27-2006, 05:00 AM
mb81 mb81 is offline
Registered User
 
Join Date: Nov 2006
Posts: 3
Rep Power: 0
mb81 is on a distinguished road
You're right, that's why I wasn't rude, if I wanted to be rude I would have called somebody a name or something. I asked a question about how to fix a problem I was having with dynamic text boxes and was told that I should get rid of scenes. I, as a programmer, completely understand, why we shouldn't use scenes, but as I stated, I am not in control of the aspect of the project and I need help on dealing with the text boxes when switching back and forth between scenes. If someone can answer that question that I first stated, that would be helpful.
Reply With Quote
  #6  
Old 11-27-2006, 07:29 AM
[PAUL FERRIE]'s Avatar
[PAUL FERRIE] [PAUL FERRIE] is offline
Glasgow Flash Developer
 
Join Date: Feb 2005
Location: United Kingdom
Posts: 7,756
Rep Power: 16
[PAUL FERRIE] is on a distinguished road
Check this thread
__________________
.:To me AS is like LEGO, Only for the big Kids :.
- Site - Blog - Glasgow Flasher - Activeden

- bringmadeleinehome.com
Reply With Quote
  #7  
Old 11-27-2006, 04:14 PM
Scottae's Avatar
Scottae Scottae is offline
God Moderator
 
Join Date: Oct 2003
Location: United States
Posts: 6,532
Rep Power: 16
Scottae is on a distinguished road
Source

Quote:
Originally Posted by mb81
Any ideas on what we are doing wrong?
If your flipping back and forth gets rid of the text field and then brings it back, then you need to reset the styleSheet property for the text field each time. When the text field gets done away with and then brought back, all of it's properties are reset to default. Easy way to deal with this situation is to create a method that you use to set the text for the text field. In that method, set the styleSheet property right before setting the htmlText property. Example:

Actionscript:
var dynTextField:TextField;
var css:TextField.StyleSheet;
function setText(pText:String):Void
{
	dynTextField.styleSheet = css;
	dynTextField.htmlText = pText;
}
__________________
Our greatest glory is not in never falling but in rising everytime we fall. - Confucius

Blog | Shared Items
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Text - change text box variable on click kenisswell Flash MX ActionScript 10 11-01-2005 09:20 PM
Creting input textfield denizci2000 Flash MX 5 12-15-2004 08:58 PM
Problems with dynamic style sheet text in flash player 6 d60eba Flash MX 2 11-09-2004 10:54 AM
HTML text not showing in dynamic text field Wasaby Flash MX 2004 2 09-07-2004 04:34 PM
Setting Dynamic Text in Frame Scripts zorba990 Flash MX ActionScript 4 04-28-2003 11:32 PM




All times are GMT. The time now is 01:33 AM.