This content has been marked as final. Show 11 replies
> is it possble to create a sprite on stage with out dragging it on the
MX 2004, makeScriptedSprite(), like this:
channel(x).makeScriptedSprite(member("yourcastmember"), point(x, y))
Earlier versions of Director:
Search in google-groups for puppetSprite - there are many posts about the
Thank you but another question i got a textArea to go onto stage now i want to put text in to it tryed
sprite(5).text = "hello"
dont work and also
channel(5).sprite.text = "hello"
that dont work either ho how do u control the new sprite
Real close! Try
You need to save a reference to the scripted sprite so you can make
changes to it. I recommend using a global variable to do that, though
depending on your needs that may not be necessary. Under the assumption
that you have a text member named "TextInput", this will work (watch for
line wraps... (there should be 2 lines of code between the on exitFrame
on exitFrame me
This way, you can do whatever you want to the sprite by using the
gTextSprite reference. You can change the text (like in the example
above), or the font
You can adjust the location
Thank you Loads that works if u ever in wales ill buy u a pint
still not doing what i want it to do the script works the thing is i want alot of text boxes each 1 having diffrent text this methord they all have the same text as im changing the member
there must be a way with out me having to place the text boxes on the stage
what i need to do is create the sprite on the stage then name the sprite and edit it
oh well who needs sleep
If you want lots of different pieces of text around the screen, you need
to use multiple members, since, as you've seen, changing the text of the
member changes the text of all the sprites that use that member.
You can create a new member on the fly. That way you don't need to make
them all 1st. Just make sure that you delete them when you are done
with the member(membername).erase() function or you'll have lots of
extraneous members laying around....
global gTextSprite1, gTextSprite2
on exitFrame me
gTextSprite1.member.text="this is some text"
gTextSprite2.member.text="this is some other text"
Thank you Loads you are litterlay saving me
the last question can i use the flash label of the flash textarea
What do you mean? How do you want to use it?
well i wana use html in the text box u see in the flash components you can in this one i cant