CreateTextField not showing - HELP!

  • clem_c_rock
  • Novice
  • Novice
  • clem_c_rock
  • Posts: 20

Post 3+ Months Ago

Hello,
I'm creating a series of movie clips that are attached from the library.

After the movie clip is attached, I want to create some text on that movie clip. When I try this, I can't see any of the text that is created

When I print the movie clip contents it shows that the the mytext textfield exists:

j:mytext : _level0.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext
j:mc_image_loader : _level0.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mc_image_loader
j:instance3 : _level0.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.instance3

Here's the code I'm trying:

Code: [ Select ]
_root.mc_scroll_group.masked_movie.scrollpage.attachMovie('show_db_list', 'show_db_list', 1, {_x:4, _y:4} );

//==== build test fields ======================================
_root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.createTextField("mytext",10,0,0,300,300);
_root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.multiline = true;
_root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.wordWrap = true;
_root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.border = true;

myformat = new TextFormat();
myformat.size = 14;

_root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.setTextFormat(myformat);
_root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.text = "this is some test text";
//=============================================================
  1. _root.mc_scroll_group.masked_movie.scrollpage.attachMovie('show_db_list', 'show_db_list', 1, {_x:4, _y:4} );
  2. //==== build test fields ======================================
  3. _root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.createTextField("mytext",10,0,0,300,300);
  4. _root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.multiline = true;
  5. _root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.wordWrap = true;
  6. _root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.border = true;
  7. myformat = new TextFormat();
  8. myformat.size = 14;
  9. _root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.setTextFormat(myformat);
  10. _root.mc_scroll_group.masked_movie.scrollpage.show_db_list.mc_show_plate.mytext.text = "this is some test text";
  11. //=============================================================


Any help is desperately needed!
  • clem_c_rock
  • Novice
  • Novice
  • clem_c_rock
  • Posts: 20

Post 3+ Months Ago

It's weird - the only thing that will show up is the text border and I gave the text a color and the only thing that shows up is the border. I also tried the setNewTextFormat idea instead setTextFormat.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

i think your problem is that you don't have fonts embeded. You need to store a specific character set in the library or try to specify "_serif" or "_sanserif"
  • clem_c_rock
  • Novice
  • Novice
  • clem_c_rock
  • Posts: 20

Post 3+ Months Ago

I have been trying to embed fonts and it's still not working.

Here's my latest code:


Code: [ Select ]
_root.mc_scroll_group1.masked_movie.scrollpage.attachMovie('show_db_list', 'show_db_list' + i, _root.mc_scroll_group1.masked_movie.scrollpage.getNextHighestDepth(), {_x:4, _y:y_pos } );
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].attachMovie('txt_mc_1', 'txt_mc_1', 1, {_x:0, _y:46} );

y_pos += mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate._height + 10;
    
//==== build test fields ======================================
depth = _root.mc_scroll_group1.masked_movie.scrollpage.show_db_list.mc_show_plate.getNextHighestDepth();
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate.createTextField("mytext"+i,depth,10,30,150,40);
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].embedFonts = true;
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].multiline = true;
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].wordWrap = true;
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].border = true;
    
//myformat = new TextFormat();
var myformat1:TextFormat = new TextFormat("_serif", 12, 0x000000);
myformat1.size = 14;
myformat1.color = 0xff0000;
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].setNewTextFormat(myformat1);
_root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].text = "this is my first test field object text afa fafas fafa asf afa asfas af afa asfa faf";
//=============================================================
  1. _root.mc_scroll_group1.masked_movie.scrollpage.attachMovie('show_db_list', 'show_db_list' + i, _root.mc_scroll_group1.masked_movie.scrollpage.getNextHighestDepth(), {_x:4, _y:y_pos } );
  2. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].attachMovie('txt_mc_1', 'txt_mc_1', 1, {_x:0, _y:46} );
  3. y_pos += mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate._height + 10;
  4.     
  5. //==== build test fields ======================================
  6. depth = _root.mc_scroll_group1.masked_movie.scrollpage.show_db_list.mc_show_plate.getNextHighestDepth();
  7. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate.createTextField("mytext"+i,depth,10,30,150,40);
  8. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].embedFonts = true;
  9. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].multiline = true;
  10. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].wordWrap = true;
  11. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].border = true;
  12.     
  13. //myformat = new TextFormat();
  14. var myformat1:TextFormat = new TextFormat("_serif", 12, 0x000000);
  15. myformat1.size = 14;
  16. myformat1.color = 0xff0000;
  17. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].setNewTextFormat(myformat1);
  18. _root.mc_scroll_group1.masked_movie.scrollpage['show_db_list' + i].mc_show_plate["mytext"+i].text = "this is my first test field object text afa fafas fafa asf afa asfas af afa asfa faf";
  19. //=============================================================

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.