Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Accessing Text Field Inside Movie



I want to address a text field ("/ann_input") which is located inside a mc ("/ann_mov"). How do I do that? This is what I've tried out already:



Code:
onClipEvent (enterFrame) {
if (ann_mov._currentFrame == 2 AND ann_mov.ann_input != "") {
this.gotoAndStop(2);
}
}
also:

Code:
onClipEvent (enterFrame) {
if ("/ann_mov"._currentFrame == 2 AND "/ann_mov"."/ann_input" != "") {
this.gotoAndStop(2);
}
}
- naturally, neither works. HELP!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 04-20-2004, 04:26 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Accessing Text Field In A Loaded Movie..Issue
Hello,

I have been at it for a whole day and still cannot get this working, I would highly appreciate all the help I can get with this issue. I am loading a movie called "btn.swf" from my _root. Within this movie, I have a dynamic text field called "text_inst". Before I published this movie, I named the instance "myBtn".

I am able to load the movie on _root, but cannot seem to access the textfield "text_inst.text"; I have tried using the debugger and am able to see the "text_inst" but cannot trace it. How can I access text fields in loaded movies?

Please see my code:







Attach Code

//Global gRoot is declared
_global.gRoot = this;

//Global gNext to get Next Highes Depth.
var gNext = getNextHighestDepth();

//EmptyMovieClip NAV is created
gRoot.createEmptyMovieClip("nav", gRoot.getNextHighestDepth());
gRoot["nav"]._x = 200;
gRoot["nav"]._y = 548;

//MovieClipLoader() Object is created
var loader:MovieClipLoader = new MovieClipLoader();
loader.loadClip("movies/btn.swf", nav);

I am able to trace up to _level0.nav

Help Please.. Having Trouble With Accessing A Dynamic Text Box, Inside A Movie
am trying to access a dynamic text field that is in a movie which is contained in an array.

My code looks something like this

movies = new Array();

// add1, add2, etc are the instance names of the movies

movies[0] = add1;
movies[1] = add2;
movies[2] = add3;
movies[3] = add4;
movies[4] = add5;

/*inside of the movie addtest (add1 - add5 are all instances of this same movie) I have a dynamic textfield called number1. How do I access this field in order to change it?

I have created an array that I would like to put the text from the fields in.*/

num1 = new Array();
for (i=0; i < 5; i++)
{
num1[i] = _root.movies[i].number1;
}

is this right? If not how would I go about doing this??

Any help would be appreciated.

Accessing Dynamic Text Field In Multiple Instances Of Movie Clip
I have multiple instances of a movie clip (mc1 to mc10, created with DuplicateMovieClip) which contain dynamic text with a variable name "id." I want to access the various id's from my main scene.

for (i=1;i<10;i++) {
"mc"+i.id="foo";
}
DOES NOT WORK.

How would one do it?

Accessing Atext Field Inside A Movieclip & Simple Question
how do I do this, if I have this..


Code:
for (var i:Number = 0; i<10; i++)
{
var tmp = new TextField(); //how do I name it,tmp wont reference all 10 textfields..
tmp.text = "Hello";
tmp.width = 100;
tmp.height = 30;
obj[i].mc = new MovieClip();
obj[i].mc.addChild(tmp);
}
how do I access the text field inside it?

Access Text Field Inside Movie
I want to address a text field ("/ann_input") which is located inside a mc ("/ann_mov"). How do I do that? This is what I've tried out already:



Code:
onClipEvent (enterFrame) {
if (ann_mov._currentFrame == 2 AND ann_mov.ann_input != "") {
this.gotoAndStop(2);
}
}
also:

Code:
onClipEvent (enterFrame) {
if ("/ann_mov"._currentFrame == 2 AND "/ann_mov"."/ann_input" != "") {
this.gotoAndStop(2);
}
}
- naturally, neither works. HELP!

Movie Clips Inside Text Field. How ?
Hi everybody,

I am trying to create a flash based LAN Messenger, using flash & third party applications.

My Messenger uses Text Field similar to all the messengers. Also I want to place smileys(moviclips or images) inside the textfield.

As far as I know, there is only one Flash Component called "SmileyTextField" by "Julien" available at http://www.jolan.org. But it seems this text field is not

compatible with Flash MX 2004 Pro.

So I want to know whether it is possible to place a moviclip (smileys) inside a textfiled during runtime.

Thank You,

Kannan.

Movie Clips Inside Text Field. How ?
Hi everybody,

I am trying to create a flash based LAN Messenger, using flash & third party applications.

My Messenger uses Text Field similar to all the messengers. Also I want to place smileys(moviclips or images) inside the textfield.

As far as I know, there is only one Flash Component called "SmileyTextField" by "Julien" available at http://www.jolan.org. But it seems this text field is not

compatible with Flash MX 2004 Pro.

So I want to know whether it is possible to place a moviclip (smileys) inside a textfiled during runtime.

Thank You,

Kannan.

[F8] Dynamic Text Field Inside Movie Clip
Hello there.

I have a problem with dynamic text fields. You see, whenever I put them inside of movie clips, they don't display variables like they do in the main stage. I've tried copying and pasting [perfectly functional] dynamic text fields from the main stage inside of movie clips, and watched as they break down and stop working.

I asked around some other flash forums a while ago, and I have been told that it has to "reference the parent clip", or something like that. However, no further answers were yielded upon further questioning. All I've gathered is that the movie clip the dynamic text field is inside of needs to have an instance name. Can anyone here tell me how to go about making the dynamic text field reference the instance name and whatnot?

Any help is greatly appreciated.

Accessing Dynamic Text Field
I have a dynamic text field that I have placed directly on the stage prior to run-time (i.e. not using Actionscript). The text field's instance name is "info1" and when I access it from my document class it works great. (e.g. "info1.visible = false").

When I try to access info1 from other classes however, it doesn't work. I've tried using "root.info1..." and "parent.info1..." and "stage.info1..." but nothing seems to work. Does anybody know how to access that text field from non-document classes?

Any explination for why that procedure needs to be different would also be a big help to this newbie, thanks!

Accessing Text Field - Tricky One
my problem is structured like this

Main Movie
|
result MC <created dunamically>
|
name <dy text field> + button


bacically want to access the dy text field from the on(release) command of the button
should this not be _parent.name ????

when i try to trace it it is undefined???

TNX

Accessing A Text Field That Was Created In A Function
Maybe the function has nothing to do with it. But, I create a text field in a function on frame 1 and it shows up just fine:



Code:
if (nAnswers > 1)
{
var feedback:TextField = new TextField();
feedback.x = 100;
feedback.y = 200 + ((nAnswers + .5) * 30);
feedback.multiline = true;
feedback.width = 600;

var format:TextFormat = new TextFormat();
format.font = "Arial";
format.color = 0x666666;
format.size = 12;
format.bold = true;

feedback.defaultTextFormat = format;
feedback.text = "Select an Answer";
addChild(feedback);
}
then on frame 2 I want to access that text field and change what it says:


Code:
feedback.text = "New Text!"
But, I keep getting the error:

1120: Access of undefined property feedback

I see the textfield on frame 2 when I go to it, but I can't seem to change it...

What am I doing wrong?? How do I access textfields that I create on the stage?

Accessing A MC Instance Name From A Text Field, And Playing It...
I have a MC with an instance name, 'JOE'.

I have a dynamic text field with an instance name, 'EMP_NAME'.

The text field is set to "" default.

Upon runtime, I assign a text value of 'JOE' into 'EMP_NAME'.

Hence, _root.EMP_NAME.text = "JOE";

Once that's done, I want the MC to check the text in 'EMP_NAME', and play if the text is 'JOE'.

As of now, I have an 'if' statement to do that check. Since I'm going to have many MCs I do not want to add more 'if' statements or 'switch' cases as that would simply be hardcoding. I want to add more MCs with unique instance names like 'JOE', 'RICK', 'PAT' etc. and should correspondingly play the MC whose instance name matches to that assigned to 'EMP_NAME' directly and not with a condition.

Ideally speaking, though the syntax is incorrect, this is what I'm trying to do:


Code:
_root.emp_name.text.gotoAndPlay(10); //which is incorrect
alternatively,


Code:
var instance_name = _root.holder.text;
_root.instance_name.gotoAndPlay(10); // which is also incorrect.
So, is there a one liner code that would directly play the corresponding movie clip once after having read its instance name from the dynamic text field, WITHOUT a conditional statement?

Me make sense?

Problem Accessing Text Field Using Droptarget
Hi All
I have a flash application which is kind of quiz game. User has to drag and drop the option in appropriate location. Options and questions are movie clips on stage with text field, when I drag and drop the option on question I am unable to retrieve the text field content of the question. However I am able to retrieve textfield content of option.


Code:

function drag(evt:MouseEvent) {
trace("target name is "+evt.target.parent.name); \target name is o0
var textName:String=evt.target.parent.name;
var targetName:DisplayObject=getChildByName(textName);
trace(targetName.sname.text);
startx=evt.target.parent.x;
starty=evt.target.parent.y;
targetName.startDrag(true);
}
function drop(evt:MouseEvent) {
var textName:String=evt.target.parent.name;
var targetName:DisplayObject=getChildByName(textName);
targetName.stopDrag();
trace(targetName.x +" "+targetName.y); \65 60
evt.target.parent.x=startx;
evt.target.parent.y=starty;
trace("target name is "+targetName.dropTarget.name); \target name is instance20
var dropTargetN:String=targetName.dropTarget.name;
trace("dropTargetN "+dropTargetN); \dropTargetN instance20
var dropTargetName:DisplayObject=getChildByName(dropTargetN);
trace("Text of droptarget "+dropTargetName); \Text of droptarget null
}
Trace of above code shows


Code:

target name is o0
Cu
65 60
target name is instance20
dropTargetN instance20
Text of droptarget null
How do I get the text field content of the questions? I have tried adding the options and questions on stage programatically too. Any help would be appreciated.

Thanks in advance

Accessing Text Field Contents, Assigning To Variable
I want to set the contents of a variable ("zone1var") to the contents of a text field ("zone1"), which is inside a movie clip ("colorPicker"). So if the text field contains the text "CCFF00", I want the variable zone1var to equal "CCFF00". How do I write that in Actionscript?

This is what I tried, but it didn't work.

Code:
zone1var = colorPicker.zone1.text;

Accessing A String From A Variable Input Text Field
I'm trying to access the string from an input text field with this code but it isn't working:


Code:
empty.onEnterFrame = checkText;

var focus:String = new String();
var myTextNumber:String = new String();
var origMyText:String = new String();
var newMyText:String = new String();

function checkText():Void{
//Extract the number from the input text field in focus
focus = Selection.getFocus();
myTextNumber = focus.substr(15);

//Compare the original text with the input text
origMyText = myArray[myTextNumber];
trace(origMyText); // returns the correct string
newMyText = myInput[myTextNumber].text; //How do you do this?
trace(newMyText); // returns undefined
if(newMyText == origMyText){
trace(newMyText+" = "+origMyText);
}
}

Here's the full code so you can see more clearly what I'm doing:


Code:
//Load the text
var myVars:LoadVars = new LoadVars();
myVars.load("words_text.txt");
myVars.onLoad = function(bSuccess:Boolean):Void{
if(bSuccess){
splitText();
}else{
trace("error loading text");
}
};

//Define the Array object to store the seperated words
var myArray:Array = new Array();

//Define the _x and _y position variables of the text fields
var textX:Number = 40;
var textY:Number = 10;
var rightX:Number = Stage.width-100;

function splitText():Void{
//Assign the text to a String object
var myString:String = new String(myVars.text);

//Split the string Object at the spaces
myArray = myString.split(" ");

//Assign the split words to text fields
for(var i:Number = 0; i<myArray.length; i++){
var myText:TextField = this.createTextField("myText"+i,i,textX,textY,0,0);
var myInputDepth:Number = myArray.length+i;
var myInput:TextField = this.createTextField("myInput"+i,myInputDepth,textX,textY,0,0);
//trace(myText+" : "+myInput);

//Define TextFormat object
var myFormat:TextFormat = new TextFormat();
myFormat.font = "Verdana";
myFormat.size = 16;
myFormat.bold = true;
myText.setNewTextFormat(myFormat);
myText.autoSize = "left";
myText.selectable = false;
myText.textColor = 0xCCCCCC;
myText.background = true;
myText.backgroundColor = 0xEEEEEE;
myText.text = myArray[i];

//Apply same textFormat to myInput text and define the text field as input
myInput.setNewTextFormat(myFormat);
myInput.type = "input";
myInput.border = false;
myInput.tabIndex = i;
myInput._height = myText._height;
myInput._width = myText._width+10;
myInput.maxChars = myArray[i].length;

//Space the text fields evenly across the stage
textX += myText._width;

//Wrap the text if it goes beyond rightX
if(textX>rightX){
textX = 40;
textY += myText._height+5;
}
}
Selection.setFocus("myInput0");
};

empty.onEnterFrame = checkText;

var focus:String = new String();
var myTextNumber:String = new String();
var origMyText:String = new String();
var newMyText:String = new String();

function checkText():Void{
//Extract the number from the input text field in focus
focus = Selection.getFocus();
myTextNumber = focus.substr(15);

//Compare the original text with the input text
origMyText = myArray[myTextNumber];
trace(origMyText); // returns the correct string
newMyText = myInput0.text;
trace(newMyText); // returns undefined
if(newMyText == origMyText){
trace(newMyText+" = "+origMyText);
}
}

Accessing A Movie Clip Inside Of A Button
I have a movie clip inside of a button that I want to navigate through when certain events happen to the button. The button(instance name : btn) is on the stage and the movie clip(instance name : my_mc) is inside of the button. The following code:

ActionScript Code:
btn.addEventListener(MouseEvent.MOUSE_OVER,onOver);
btn.addEventListener(MouseEvent.MOUSE_OUT,onOff);

function onOver(event:MouseEvent):void{
    btn.my_mc.gotoAndPlay(2);
}
function onOff(event:MouseEvent):void{
    btn.my_mc.gotoAndPlay(11);
}

gives me the Error #1119: Access of possibly undefined property my_mc through a reference with static type flash.display:SimpleButton.

Thanks for any help,
BP

Accessing Function Inside Movie Clip
I created a movie clip in Flash. It has a few text fields, another clip that loads an image, and another clip that acts as a button. In its property settings, I set it for export and gave it the class name of ModuleClip.

I can dynamically create a bunch of these clips and arrange them. Using a loop, I can access a custom variable in all of them...


ActionScript Code:
trace(MovieClip(getChildByName("mod"+i)).num);

but I can't access a custom function in the clip the same way...


ActionScript Code:
MovieClip(getChildByName("mod"+i))fadeInText();

I figure the problem is that fadeInText() is not a function of MovieClip, so I tried...


ActionScript Code:
ModuleClip(getChildByName("mod"+i))fadeInText();

but that still doesn't work.

The error I get is...

Cannot access a property or method of a null object reference.

What am I missing?

Thanks for any help you can provide.

Accessing Dynamic Text Fields Inside Buttons
Hi,

I'm trying to make a dynamic menu bar which is composed by several buttons.

I created a button named "Header Button", which has inside it a dynamic text field in the up fram and in the down frame.

I'm using this code to create several instances of this item to make the button bar dynamicly.

var sections:Array = new Array("NOTICIAS","ARTISTAS","EVENTO","CONTACTO");

for (i=0;i<4;i++) {
this.attachMovie("Header Button","button" + i,this.getNextHighestDepth());
this["button"+i].section_up.text = sections[i];
this["button"+i].section_down.text = sections[i];
}

Well, the problem is that i cant see any text. I have also checked the text color.

To have sure that i'm getting the instances of Header Button was working, i created a circle in the Header Button original instance and then tested. It works.

I suspect that i'm missing some detail related to buttons and access to its frames.

Can somebody give me a tip on this?

Many thx

Accessing Dynamic Text Inside A Simple Button?
I have created a button symbol in the library that includes a dynamic text instance called labelTxt. I've then dragged this onto the stage to form several buttons called "btn1", "btn2" etc.
I want to be able to change the contents of the text on the buttons dynamically, but I am getting quite a few errors while trying to set the text.
I have tried using (for example)
btn1.labelTxt.text=myString
but am getting errors saying that the property isn't defined.
quote:1119: Access of possibly undefined property labelTxt through a reference with static type flash.display:SimpleButton.
I would skin a Button and use that but there are 3 quite different styles (skins) of buttons on this particular chart, and I'm not sure how to do that with Buttons. And I keep thinking there must be some easy way to access the labelTxt dynamic text in the buttons I have created.... any help would be very greatly appreciated :)

Accessing Component Variable Inside A Movie Clip.
Hi there,

I'm having problem when trying to access a component variable inside a movie clip....

the component is from FLVPlayback (compiled clip) the varible is "contentPath"... I name this component movie_mc.. this component is placed inside a movie clip..

The component is inside a movieclip called "player" I have correctly set the player movie clip linkage identifier for action scripiting..

so .. what im trying to do is..


// attachiong movie clip player_mc_temp to the root..
_root.attachMovie( "player", "player_mc_temp", _root.getNextHighestDepth(), {_x:238, _y:4} );

// setting the value of contentPath inside the movieclip
_root.player_mc_temp.movie_mc.contentPath =_parent.urlarray[i];

the "_parent.urlarray[i]" have the right value, and its trace correctly,
its a valid HTML url linked to the .flv file.

the player seemed to be attached properly but the video file wont run..
I think i cannot set the value of contentPath like this...

"_root.player_mc_temp.movie_mc.contentPath =_parent.urlarray[i];"


can someone help me im still newbie in flash action scripting....

thank you very much in advance.

Accessing Movie On Root While Inside A Movie
I am new to flash

I am working on flash 8.
I want to know that
i have two movies on the ground panel . i have placed one button in one movie . when i click that button i want to set other movie's alpha =0 that is placed on the root.

Problem Accessing Movie Clips Inside Of Loaded Swfs
Hey All;

Here's what I am having problems with. In swf movie A I have a movie clip on the stage with the instance name SQUARE. In swf movie B I load in swf movie A by using the following:

this.createEmptyMovieClip("world_mc", 999);
loadMovie("A.swf", world_mc);

Now... the following line of code gives me undefined:

trace (world_mc.SQUARE);

Why? Can I not access the movie clip SQUARE once swf A is loaded into swf B?

Thanks.

[Flash MX] Problem: Accessing A Component From Inside A Movie Clip
Okay I have this problem and I can't for the life of me figure out what's wrong. Here is an outline of what is happening:


1. I have a movie clip that contains two components, a combo box and a check box.

2. The combo box has the instance name "comboBox", and the check box has the instance name "checkBox".

3. The movie clip is exported for actionscript with the identifier "test".

4. I run the following code:


ActionScript Code:
attached = _root.attachMovie("test","componentContainer", 1);attached.comboBox.addItem("A", 1);


5. The item is not added to the combobox and I can't figure out why.

However, when I run the following code instead:


ActionScript Code:
attached = _root.attachMovie("test","componentContainer", 1);attached.comboBox._visible = false;


The combobox becomes invisible!

I can't understand why the addItem() function doesn't work but the _visible property does. Could it be a bug? Or some type of referencing issue? Please, I'd appreciate any help or ideas about why this is happening.

[Flash MX] Problem: Accessing A Component From Inside A Movie Clip
Okay I have this problem and I can't for the life of me figure out what's wrong. Here is an outline of what is happening:


1. I have a movie clip that contains two components, a combo box and a check box.

2. The combo box has the instance name "comboBox", and the check box has the instance name "checkBox".

3. The movie clip is exported for actionscript with the identifier "test".

4. I run the following code:


ActionScript Code:
attached = _root.attachMovie("test","componentContainer", 1);attached.comboBox.addItem("A", 1);


5. The item is not added to the combobox and I can't figure out why.

However, when I run the following code instead:


ActionScript Code:
attached = _root.attachMovie("test","componentContainer", 1);attached.comboBox._visible = false;


The combobox becomes invisible!

I can't understand why the addItem() function doesn't work but the _visible property does. Could it be a bug? Or some type of referencing issue? Please, I'd appreciate any help or ideas about why this is happening.

How To Stop Text Floating To Right Side Of An Image Inside A Dynamic Text Field
Hi

I have dynamic text field that loads in a txt file containing
html formatted text including an embedded image.
When I test the movie the text that should appear bellow
the image, instead, runs down the right side of the image.

I have tried adding various html attributes including -


Code:
<br clear="all"><img src="image.gif" /><br >
I have also tried attaching a style sheet and appying the
following class -


Code:
img.allClear {
clear: all;
}
and also redefining the image tag -


Code:
img {
clear: all;
}
None of witch have worked.

Can someone help with this please.

Regards Mydogmax

Long Text Doesn't Fit Inside Single-line Input Text Field
Hi, I've been browsing these forums for a long time but this is my first post.

I'm creating an interface by which a user can design and order their own customized decal. Please see my example (I've added my script at the bottom of this post):
http://www3.sympatico.ca/sin.young/decaldesigner.html

My issues are:

1. I've set the character limit to 21, but if you were to type in 21 "W"s into the input field for whatever reason, or choose a wider font, the text shifts to the left and some of the characters become hidden as they don't all fit. I'd like to make the width of the text to always fit inside of the width of the white area. I can't figure out how to make this work.

Here's an example that does pretty much what I'm trying to describe: www.stickerjunkie.com.


2. I have the Standard Colors combo box working perfectly but can't seem to get the Fonts combo box working.

Any hints or links to actionscript tutorials/help that might be useful to my predicament is extremely appreciated.

// display colors and formatting
decalColor = new Color(decal);
color1 = new Color(decalColor);
//
function changeColor(comp) {
decalColor.setRGB(comp.getSelectedItem().data);
}
//Standard Colors array
standardcolors = [{label:'STANDARD COLORS'},
{label:'White', data:0xffffff},
{label:'Black', data:0x000000},
{label:'Silver', data:0x9c9c9c},
{label:'Gray', data:0x636b73}];

collistStandard.setDataProvider(standardcolors);
collistStandard.setSelectedIndex(0);
collistStandard.setChangeHandler('changeColor');
//
//Fonts array
myfonts = [{label:'FONTS'},
{label:'Arial', data:'Arial'},
{label:'Serpentine', data:'Serpentine'},
{label:'Enviro', data:'Enviro'},
{label:'Forte', data:'Forte'}];

fontlist.setDataProvider(myfonts);
fontlist.setSelectedIndex(0);
fontlist.setChangeHandler('');

Changing Text Inside A Text Field, Bold/Italic/Underline Ect ...
Is it possible to change the appearance of text inside a text field, like say to bold, italic, underline, color and even a type of font if need be ... ?

Example:

Like say you have text field, and you have some option buttons, (bold/italic/underline/color/type-of-font) that when clicked on will dynamicaly change the text/font appearance in the text field.

Any tutorials on this matter, anyone know ?

The HTML Text Field Won't Center The Text Inside... Why?
Hello there,

The thing is: I have a HTML text field in my movie that loads a variable from a txt file. I set in the text field paragraph option the 'center' mode.

Ok, it should work fine, but it doesn't... The text loads fine, but it starts in the left side of the field and not in the center as wanted.

I tried to put HTML center tags in the txt like:

Code:
&text=<center><a href="http://www.link.com">This is my text</a></center>
and:


Code:
&text=<div align=center><a href="http://www.link.com">This is my text</a></div>
Both options didn't work as well.

Is there a way to do that or I'll just have to let the HTML aside and use regular dynamic text fields?

Thanks in advance and sorry for the 'ingrish'

Clickable Text Inside Multiline Text Field
Hi there,

I have a movie with a dynamic multiline text field, and want each line of the text to be clickable. The text is put into the text field from a script, and I am using HTML formatting to make the text clickable, as in

mytextfield = "<a href="http://www.domain.com"> + string + "</a>";

However, I don't actually want my clickable text to go to URLs, I want it to run some ActionScript, but I can't figure out if it is possible. Basically what I want to do is something like this

mytextfield = "<a href="_root.gotoAndPlay(4)"> + string + "</a>";

Maybe I'm going about it the wrong way, but I can't find any advice on how to make clickable text in a text field which triggers an ActionScript command.

Hope you can help - Sam

Picture Inside A Text Field...
Hello,
I am pretty new to flash and I have encountered a small problem. I am trying to insert a picture inside a text field and have them both be together. and then I want to insert a scroll bar from the components menu inside the field, so that when I move the scroll bar up and down, the text moves as well as the picture inside the text field. The only thing is that I don't know how to put the picture inside the text field and make a part of my text so that it moves up and down with the text when scrolled. If you know how to do this, please help me, if you know of any other way to do this, please let me know, Thank you
Bach Dragon

Text Field (inside MC) Won't Display Anything
I have several dynamic text fields inside a MC. They all work except for one. I've tried embedding the font (see image) but it still shows nothing. I've done a trace, to make sure the variable has something in it, which it does. I've rechecked the path name a hundred times. The other fields work! This one doesn't. Here's the actionscript that feeds the text field (this exists on the "aircraft" movie clip" with an onClipEvent(load).

tag.VlarsoDisplay = Math.round(Math.sqrt(((560 - target._x)*(560 - target._x))+ ((300 - target._y)*(300 - target._y))))/10;

This code all works, and tag.VlarsoDisplay has a value, confirmed with TRACE. The path IS correct. Why on earth won't the value display in it's field?

Tabs Inside A Text Field
I'm NOT talking about the tab index, im talking about adding the ability to put tabs in a text field and then be able to pass it to a php file for a mailer program.

i have no problem storing line breaks or anything like that.

here's some as code im trying


Code:
myText.text = "Hello Gary,

What's Up?";
keyListen = new Object;
keyListen.onKeyDown = function()
{
//if tab is pressed
if (Key.getCode() == 9)
{
myText.text += " ";
}
}
Key.addListener(keyListen);
the problem is not passing the tabs to php. the problem is keeping focus on the text field and putting the edit cursor in the right place.

i only want this to work when focus is set on the text field. you have to click outside the text field to exit focus.

if someone knows how to diable tab from changing focus that would be helpful!

thanks

Pop-up Link Inside Text-field.
Hi! Is it possible to make a pop-up link inside a textfield i flash?

I've got this guestbook which loads the text using php. But it quickly fills up... so I want to have a link at the bottom of the textfield opening a pop-up window containing old posts. I tried using a javascript pop-up function, but it wouldn't work.

Is this possible?

HELP: Button Inside Text Field?
Good morning guys

I've got a text field where I load text and pic thumbs dynamicly from actionScript...

I've got the code which is working that when I click the thumb it will appear bigger pic next to the text field.
The problem is that I've got the stage sise small and I would like to open the big picture in new swf...

Code:
myTextBox.htmlText = "<a href="asfunction:imageLink,image1_large.jpg"><img src='thumbs/image1_small.jpg'></a><b>Prodám-</b> na MITSUBISHI PAJERO 2.8TD INTERCOOLER, 1999, : přední náprava 2,900Kč, zadní náprava s uzávěrkou 5,900Kč, <b>P</b>řevodovka 9,900Kč a jiné...<br><br><br><br><br>"+"<a href="asfunction:imageLink,image2_large.swf"><img src='thumbs/image2_small.jpg'></a><b>Prodam-</B> na JEEP R6V laděné výfukové svody na Off-Road 2.900Kč";
//
this.createEmptyMovieClip("container", 0);
container._x = 350;
container._y = myTextBox._y;
var activeImg:String = "";
//
function imageLink(largeImg:String) {
if (activeImg != largeImg) {
activeImg = largeImg;
container.loadMovie("largeImages/"+largeImg);
}
}
I am trying to do something like this???

Code:
function imageLink(largeImg:String) {
if (activeImg != largeImg) {
activeImg = largeImg;
}
}

function openNew (imageLink) {
getURL("flashimg/bazar/","_blank");
}
oh well.. and it is still not working...

Pop-up Link Inside Text-field.
Hi! Is it possible to make a pop-up link inside a textfield i flash?

I've got this guestbook which loads the text using php. But it quickly fills up... so I want to have a link at the bottom of the textfield opening a pop-up window containing old posts. I tried using a javascript pop-up function, but it wouldn't work.

Is this possible?

Forcing Text To Fit Inside A Field
Hi,
I have an input text field, and a dynamic text field. When the user inputs more characters than will fit in the dynamic field, I would like the text to autosize so it will fit in the field. For example, if the user inputs 20 characters, but the field will only show 10 of them at normal size, how can I get the text to resize so that all 20 characters will display in the dynamic text field?

Thank you!

Buttons Inside The A Scroll Text Field
I want a scroll box that has buttons that can change from frame to frame. I have a list of 30 titles of poems and I don't want to put them all the page but be able to scroll down and select a title. Can someone help?

Position Of Certain Character Inside Text Field
Hallo everyone
I have TF align right (has to be) that's fed from outsource text file.(subject to change) I'm trying to find what is x position of first character so i can properly position TF in respect of other thinks.
-using MX
any thoughts would be appreciated. G

Having HTML Content Inside A Text Field
how can i have html content inside a flash file, particulalry inside text field? i can't use xml, since i don't know how, and since school doesn't want to use xml...

can anyone help?

Dynamic Text Field Clip Inside Another ?
i have a dynamic text field called tCaption. it has an instance name of tr_txtCap. i pull text out of an XML file and it works great. so now i though i might like to animate this field. so i create a new mc called tCaption_scroller. - i drag in my tCaption symbol and give it a new instance name of tr_txtCap_Scroll then i animate the field to scroll (slide) across the screen. however, the dynamic text never gets inside this clip. when i do a trace on the variable it shows that it's working - am i just not referencing this correctly?

i make my clip here:
mc_TrCap = mc_Main.attachMovie("tCaption_Scroller","TrCap",0) ;

then i update the text for it here:
mc_TrCap.tr_txtCap_Scroll.htmlText = Small_Img[CurrentImageId].XMLData.childNodes[2].firstChild.nodeValue;

i trace it here: (which works)trace(mcTrCap.tr_txtCap_Scroll.htmlText + "is what you're looking for");

if i replace the tCaption_Scroller with tCaption and then change the instance name to match the tCaption instance - it works...it just doesn't scroll

GetURL Tag Inside A Dynamic Text Field
hey -

this is a little question -
does any one know how to put a mailto hyperlink or something similar in the dynamic text field? when you type your string in the code for the text field, how do you make the text a mailto? I can't seem to figure it out..!

thank you for any ideas!!
maw

Duplicate A Movieclip That Has A Text Field Inside
hey there

i have a movie clip with a text field in it (as a child in it)

when i duplicate the movie clip using a loop I output the loop variable in the text (1,2,3.........)

but half way duplicating i need 2 rotate my movieclip 90 degrees & here goes the problem :

my text field 4 some reason stops appearing

when i removed the line that rotates the movieclip it worked in alla duplicates.

what can i do ???

PS: a thought came 2 me right now: maybe i should mk the duplicates 1st then rotate the ones i wanna rotate.

I'll try it & C what happens

thx 4 ur help & 4 my thought
bye

Finding A Text Field Inside A Button?
I've created a SWF that contains a button. Inside of that button, I placed a Dynamic Text area using the text tool in flash.

Now in actionscript, I'm trying to find that text field by iterating over the children of the button, but unfortunately, I can't seem to figure out how.

The button itself is coming through as a SimpleButton class, which is not a DisplayObjectContainer, and therefore has no children.

Additionally, the button doesn't have a named property where the text field is.

Any ideas where the text field exists and how i can get to it?

Thanks!

Dynamic Text Field Inside Button
Hey guys,

I could have sworn I did this before but now I can't seem to get it to work.

I am loading some text from an xml file and I can get it to display within a dynamic text field. I need to create just a simple link that when you rollover it the text color changes.

I have tried to put the dynamic text field inside the but and set the up and down stated but i lose the text being loaded in dynamically. Here is what I am doing in a nutshell.

load my text from xml
I have a dynamic text field named d_Txt (if I leave this outside the button it works fine)
I have put the text field into a button named my_btn

then on the up state I have the d_txt with a specific color and then in the over state i have placed the d_txt field with a different color.

In theory I thought this should work, but it doesn't. I have also tried place the dynamic text field inside a movie clip and then adding onRollOver and onRollOut to the movie clip to change the text but that doesn't seem to work either.

Can anyone help me out? Thanks!

Linking Inside The Dynamic Text Field
Hello,

Does anyone know if this scenario is possible?

i load text inside the dynamic text field, I have links in the text that I want to load new text files inside the same text field ( and of course I want my scroller to work with the new text)

Anyone know if this is possible, and if there is a tutorial for this?

Thanks so much in advance

Diana

Page 2 - Forcing Text To Fit Inside A Field
Ok, I had forgotten to place the default y positions on the buttons, so when I did that and then reapplied the "SignTextColor._y += 0.6;" in the if statement on the first key frame, it worked fine. BUT it is back to being jumpy just on that part...how would I make that specific part of the if statement also not show until it is completed.

Here is my full script that appears on that key frame:

mySignColor = new Color(_root.Sign);
StreetType = "";
myTxtFmt = new TextFormat();
myTxtFmt.size = 57;
myTxtFmt.font = "_sans";
function resizeText(newSentance) {
trace(myTxtFmt.getTextExtent(newSentance).width+" : "+SignTextColor._width);
if (myTxtFmt.getTextExtent(newSentance).width+10>SignTextColor._width) {
myTxtFmt.size -= 1;
SignTextColor._y += 0.6;
} else {
SignText = newSentance;
SignTextColor.setTextFormat(myTxtFmt);
delete _root.onEnterFrame;
}
}


Thanks!

Wtf? Text Field And GetFocus Issues -- Code Inside
Below is a script I've been struggling with for a little while. I have a set of text fields, one of them is called 'letter' -- as you can see, you're supposed to enter a variation of $50,000.00 into the text field...

the only problem is that the selection is not recognizing the letter text field as it should. When traced selection returns [object object] instead of letter.

Any ideas what's wrong?


Code:
onClipEvent (mouseUp) {
var selected = Selection.getFocus();
if (selected != _root.letter) {
if ((letter != "$50,000.00") and (letter != "$50,000") and (letter != "50,000.00") and (letter != "50,000") and (letter != "50000") and (letter != "$50000.00") and (letter != "$50000") and (letter != "50000.00")) {
trace (selection);
gotoAndStop (15);
} else {
gotoAndStop (1);
}
}
}

Start Cursor Inside Input Text Field
I have two input text fields (username and password), and would like the cursor to be inside the username field when the movie is loaded, without having to click it first.

Is this possible?

Thanks for any advice

Copyright © 2005-08 www.BigResource.com, All rights reserved