473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

create text in a parent MC

I'm trying to put text in a MC one level up.
Here's what I've tried so far:


_parent.textBox.createTextField("deck", 1, 0, 0, 300, 100);

Where textBox is the instance name of the MC at the parent level.
May 21 '07 #1
2 2977
bergy
89
I've never used the createTextField function. I've opted instead to create a new movieclip with a dynamic text field inside of it (so I can specify font settings) and then load that movie from the library onto the stage, give it an instance name and then modify the text inside of the dynamic text field in the movieclip. Hope that helps, there are tons of tutorials about loading movieclips and working with dynamic text boxes in flash - just google it if you're not sure how to do it.

I'm trying to put text in a MC one level up.
Here's what I've tried so far:


_parent.textBox.createTextField("deck", 1, 0, 0, 300, 100);

Where textBox is the instance name of the MC at the parent level.
May 28 '07 #2
Atran
319 100+
I'm trying to put text in a MC one level up.
Here's what I've tried so far:


_parent.textBox.createTextField("deck", 1, 0, 0, 300, 100);

Where textBox is the instance name of the MC at the parent level.
Hello, Try this code:
Expand|Select|Wrap|Line Numbers
  1. //Create a new text format.
  2. var txtFormat:TextFormat = new TextFormat();
  3. //Set txtFormat properties.
  4. with (txtFormat) {
  5.     bold = true;
  6.     font = "Curlz MT";
  7.     color = 0xD55E2B;
  8.     size = 32;
  9. }
  10. //Make the root create a textField.
  11. //txtbox is the instance name.
  12. _root.createTextField("txtbox", 0, 12, 12, 100, 100);
  13. //Set to txtbox a new text format.
  14. txtbox.setNewTextFormat(txtFormat);
  15. //Set txtbox text.
  16. txtbox.text = "Hello";
  17.  
And it doesnt works when you write _parent.textBox.createTextField.
TextBox doesnt create TextField, the movie(_root) creates that.
Jun 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: grayFalcon | last post by:
Hello! I've got a small problem here. I'm trying to write some code that would generate a drop-down menue for me, where I'd just need to enter the menu- and submenu items into an array. The...
7
by: Wolfgang Kreuzer | last post by:
Hello all, I have two tables - Projects and ProjectStruct Table Projects contains master records of the projects, ProjectStruct allows to define a project herarchie and contains the fields...
9
by: jon wayne | last post by:
OK! I had this nagging doubt Consider (without worrying abt access specifiers) class Kid : public Parent{...}; Parent::someFunc() { Kid k; }
16
by: Adda | last post by:
If I cycle through the MdiChildActivate event of the parent form I can read text in a textbox on the child mdiform -- console.writeline(Me.ActiveMdiChild.Controls(1).Text) But if I have a sub...
3
by: John Salerno | last post by:
I'm using the sample code of the file 'simple.py' and trying to make a single window with a panel in it, but I keep getting an error. Here's my code: (I know I might need something else, like a...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
7
by: Edwin Martinez | last post by:
Hello I have a parent form but I want to create 4 forms that will be shown in a area inside the parent form when I click to buttons. +----------------------------+ | Parent Form ...
14
RMWChaos
by: RMWChaos | last post by:
Firebug is reporting "too much recursion" when I attempt to create a child element in a parent that doesn't exist yet. The script should automatically create the missing parent before going on to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.