TextFields don't have onRollOver events, but MovieClips do. So you'll
need to first create a MovieClip (like in your first question) and then
create the textField in it. Heres some example code:
var myMovieClip:MovieClip = this.createEmptyMovieClip(myMovieClip_mc,
this.getNextHighestDepth());
trace(myMovieClip: + myMovieClip);
var myTextField:TextField =
myMovieClip.createTextField(myTextField_txt,
myMovieClip.getNextHighestDepth(), 100, 100, 300, 100);
trace(myTextField: +myTextField);
myTextField.text =test;
myMovieClip.onRollOver = function(){
myTextField.text = NEW TEXT;
}
In the code above 'this' would be your _root layer. Coding to _root is
generally considered a bad practice.
Hope that helps!
-Dan
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of edward
Sent: Thursday, April 05, 2007 2:53 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] re: createTextField
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
well, I have simplified everything. My only two little issues now
are:
1. my mouseover does not work to change the text's color.
2. i imported silkscreen bitmap font size 8 linkage for first
frame, and linked for actionscript. i named it mysilkscreen.
however, when i execute the movie, no errors but the font is just a
generic serif font now, any ideas? its tough when flash gives me no
errors.
here is the code:
_root.myRed = 0xFF;
_root.myLightGray = 0x99;
_root.myDarkGray = 0x353535;
_root.createTextField(mytext,1,100,100,300,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = false;
menuFonts_Fmt = new TextFormat();
with(menuFonts_Fmt) {
color = myLightGray;
bullet = false;
underline = false;
font=mysilkscreen;
size = 8;
}
mytext.text = Writing;
mytext.setTextFormat(menuFonts_Fmt);
//
_root.mytext.onRollOver = function() {
_root.mytext.textColor = myDarkGray;
}
-BEGIN PGP SIGNATURE-
Note: This signature can be verified at https://www.hushtools.com/verify
Version: Hush 2.5
wpwEAQECAAYFAkYVUz8ACgkQnK42HzOJXBc6SgP/WvdRkiCt743MiFk0LaHo5WZtYaaS
FUU7Kw6PDtMghjL2gHkfN1wjU4tLYKS3af8G0fuzj+IwoEzjWs7RN0T9yT52f7+aDaWZ
eztH6YtosIKbijf0yNUT1SP10OcLoHfw2CbLcTq0ZAo7kLI8Lbltve6M0pAGDZ4fRW5N
Oole38w=
=w8ob
-END PGP SIGNATURE-
--
Click for free info on online doctorate degrees and make $250k/ year
http://tagline.hushmail.com/fc/CAaCXv1ZYZ9Qs1mam0nqgyWB4wpiriIq/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
This e-mail and its attachments are intended only for the use of the
addressee(s) and may contain privileged, confidential or proprietary
information. If you are not the intended recipient, or the employee or agent
responsible for delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution, displaying, copying, or
use of this information is strictly prohibited. If you have received this
communication in error, please inform the sender immediately and delete and
destroy any record of this message. Thank you.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com