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




Can Textfields Be Nested?



Anyone know if text fields can be nested, and if so, can it be done with code? Thanks!



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 10-05-2005, 01:31 AM


View Complete Forum Thread with Replies

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

Flex Nested Arraycollections And Nested Repeaters
I can't figure out how to get a dataProvider from a nested ArrayCollection. I'll try to provide as much code as possible without dumping my whole project in. If I miss something critical, let me know.

Here is the concept. Clients have Projects. Projects have Images. I want to show this relationship in a form. Displaying the list of Images for each Project is where I'm stumbling.

This is what it looks like in xml.


Code:
<data>

<client name="clientName">

<project name="project1">
<image name="image_1.jpg" />
<image name="image_2.jpg" />
<image name="image_3.jpg" />
<image name="image_4.jpg" />
</project>

<project name="project2">
<image name="image_1.jpg" />
<image name="image_2.jpg" />
</project>

</client></data>
Now, when I load the .xml in, I have custom classes for Clients, ClientList, Project, ProjectList, ImageList and I push all the xml data into that structure. Basically each of the list classes contains a 'list:ArrayCollection' value that contains the various items in that list as well as the functions to add and remove items in the list. The lists are what I use as dataProviders in the form.

Each Client object has a ProjectList that contains all the Projects for that Client. In turn, each Project has an ImageList that contains all the images for that project.

The populateForm below is triggered when a combobox changes. It receives the event with a client attached.


Code:
private function populateForm(event:Event):void{
//selectedClient becomes the
var selectedClient:Object = event.target.selectedItem;
/*this is easy enough. I already gave each client a name value and this displays it to the textfield in my form.*/
clientName.text == selectedClient.name;

/* this is also working. I'm using the 'list:ArrayCollection' of that client's projects as the dataprovider for the first repeater in my form */
projectRepeater.dataProvider = selectedClient.projects.list;

//imageRepeater.dataProvider = ?????

//skipping ahead to my mxml
<mx:Form>
<mx:FormItem>
<mx:VBox>
<mx:Repeater id="projectRepeater">
<mx:Panel width="500" title="{projectRepeater.currentItem.name}">
<mx:VBox width="100%">
<mx:Repeater id="imageRepeater">
<mx:List labelField="name" dataProvider="{????}"/>
</mx:Repeater>
</mx:VBox>

</mx:Panel>
</mx:Repeater>
</mx:VBox>
</mx:FormItem>
</mx:Form>
How do I set an appropriate dataProvider for the imageRepeater? The projectRepeater makes sense because I can layout all projects for each client. But the images are nested. How can I target them?

Referencing A Nested, Nested Movie Clip
Here's the setup.

let's say you have a movie clip called "parent" on the root timeline.
On frame 1 of the parent clip, you have another clip called "childA"
On frame 2 of the parent clip, you have a clip called "childB"

so, only childA is on frame 1, and only childB is on frame 2

also, let's say that both childA and childB each have a local function named "Add"

using dot syntax, you can call those functions from the root timeline:

_root.parent.childA.add(); or _root.parent.childB.add();

however, Flash only seems to be aware of those children that exist on the currently selected frame of the parent. In other words, if the current frame in the parent mc is 1, you can use parent.childA.add(); but not parent.childB.add();

Is there any way to be able to reference a child movie clip in a parent movie clip when the child is not on the currently selected timeline?

I can't put all the child clips on every frame, because I need to be able to print the entire parent movie clip (multiple frames, so each child can only exist in their own frames).

Thanks in advance for your help or insight!

Cheers!

Nested Shapes Vs. Nested Sprites In AS 3.0
Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.

var container:Shape = new Shape();


When I change the below from a Sprite to a Shape I get this error:

"Call to a possibly undefined method addChild through a reference with static type flash.display:Shape."


var container:Sprite = new Sprite();
container.graphics.lineStyle(0,0xFF6600);
container.graphics.beginFill(0xFF3300);
container.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
container.graphics.lineTo(100, 0); // move to left 65 x and 0 y
container.graphics.lineTo(100, 100); // from 65 x to 20 y
container.graphics.lineTo(0,100); // 0 x to 20 y

this.addChild(container);
container.x = 140;
container.y = 140;


var box_1:Sprite = new Sprite();
box_1.graphics.lineStyle(0,0xFFFFCC);
box_1.graphics.beginFill(0xFFFF00);
box_1.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_1.graphics.lineTo(80, 0); // move to left 65 x and 0 y
box_1.graphics.lineTo(80, 80); // from 65 x to 20 y
box_1.graphics.lineTo(0,80); // 0 x to 20 y

container.addChild(box_1);
box_1.x = 10;
box_1.y = 10;

var box_2:Sprite = new Sprite();
box_2.graphics.lineStyle(0,0x92E9FE);
box_2.graphics.beginFill(0x92E9FE);
box_2.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_2.graphics.lineTo(60, 0); // move to left 65 x and 0 y
box_2.graphics.lineTo(60, 60); // from 65 x to 20 y
box_2.graphics.lineTo(0,60); // 0 x to 20 y

box_1.addChild(box_2);
box_2.x = 10;
box_2.y = 10;

Thanks,
Eric

How To Play Second Nested Mc After First Nested Mc Finishes?
Hi all,

I am very new to action script - I am sure there is a stupidly simple way to do this:

I have an mc named logoclip. Within logoclip, I have one mc (instance: logointro) nested in frame 1(label: logoin) and one mc (instance: logogrowth) nested in frame 2 (label:logogrow). After the first mc finishes I want the second mc on frame 2 to play. The first mc is tweened with actionscript with the final tween finishing after 132 frames.

I'm not sure what the best way is to do this. Any suggestions?

Cheers

Nested Shapes Vs. Nested Sprites In AS 3.0
Nested Shapes vs. Nested Sprites in AS 3.0

Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.

var container:Shape = new Shape();


When I change the below from a Sprite to a Shape I get this error:

"Call to a possibly undefined method addChild through a reference with static type flash.display:Shape."


var container:Sprite = new Sprite();
container.graphics.lineStyle(0,0xFF6600);
container.graphics.beginFill(0xFF3300);
container.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
container.graphics.lineTo(100, 0); // move to left 65 x and 0 y
container.graphics.lineTo(100, 100); // from 65 x to 20 y
container.graphics.lineTo(0,100); // 0 x to 20 y

this.addChild(container);
container.x = 140;
container.y = 140;


var box_1:Sprite = new Sprite();
box_1.graphics.lineStyle(0,0xFFFFCC);
box_1.graphics.beginFill(0xFFFF00);
box_1.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_1.graphics.lineTo(80, 0); // move to left 65 x and 0 y
box_1.graphics.lineTo(80, 80); // from 65 x to 20 y
box_1.graphics.lineTo(0,80); // 0 x to 20 y

container.addChild(box_1);
box_1.x = 10;
box_1.y = 10;

var box_2:Sprite = new Sprite();
box_2.graphics.lineStyle(0,0x92E9FE);
box_2.graphics.beginFill(0x92E9FE);
box_2.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_2.graphics.lineTo(60, 0); // move to left 65 x and 0 y
box_2.graphics.lineTo(60, 60); // from 65 x to 20 y
box_2.graphics.lineTo(0,60); // 0 x to 20 y

box_1.addChild(box_2);
box_2.x = 10;
box_2.y = 10;

Thanks,
Eric





























Edited: 05/20/2008 at 07:46:30 AM by clem_c_rok

Nested Shapes Vs. Nested Sprites In AS 3.0
Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.

var container:Shape = new Shape();


When I change the below from a Sprite to a Shape I get this error:

"Call to a possibly undefined method addChild through a reference with static type flash.display:Shape."


var container:Sprite = new Sprite();
container.graphics.lineStyle(0,0xFF6600);
container.graphics.beginFill(0xFF3300);
container.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
container.graphics.lineTo(100, 0); // move to left 65 x and 0 y
container.graphics.lineTo(100, 100); // from 65 x to 20 y
container.graphics.lineTo(0,100); // 0 x to 20 y

this.addChild(container);
container.x = 140;
container.y = 140;


var box_1:Sprite = new Sprite();
box_1.graphics.lineStyle(0,0xFFFFCC);
box_1.graphics.beginFill(0xFFFF00);
box_1.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_1.graphics.lineTo(80, 0); // move to left 65 x and 0 y
box_1.graphics.lineTo(80, 80); // from 65 x to 20 y
box_1.graphics.lineTo(0,80); // 0 x to 20 y

container.addChild(box_1);
box_1.x = 10;
box_1.y = 10;

var box_2:Sprite = new Sprite();
box_2.graphics.lineStyle(0,0x92E9FE);
box_2.graphics.beginFill(0x92E9FE);
box_2.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_2.graphics.lineTo(60, 0); // move to left 65 x and 0 y
box_2.graphics.lineTo(60, 60); // from 65 x to 20 y
box_2.graphics.lineTo(0,60); // 0 x to 20 y

box_1.addChild(box_2);
box_2.x = 10;
box_2.y = 10;

Thanks,
Eric

Nested Shapes Vs. Nested Sprites In AS 3.0
Hello,
    I'm trying to learn Actionscript 3.0 from the ground up.      I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.

var container:Shape = new Shape();   


When I change the below from a Sprite to a Shape I get this error:

1061: Call to a possibly undefined method addChild through a reference with static type flash.display:Shape.

Setting The Depth Of A Nested Object Higher Than That Of A Non-nested Object
As the title says, i would like to have an object which is nested beneath another objects depth set higher than that of one the is NOT nested. Is this possible if so how, may be real easy and im just over-looking it but...... help! please

Can't Add To My Textfields In The Right Way (MX)
I'm making a little "payment plan calculator". It should add a number to a textfield-variable (CarPrice) and put the result into another textfield (Result).

But when I write like this,:

on (release) {
CarPrice = 1100
Result = CarPrice + 475;
}

Then the Result-textfield will only look like this: 1100475 !
I want it to calculate it to: 1575

Note that this works fine for me:

on (release) {
CarPrice = 1100
Result = CarPrice * 2;
}

I can't see what's wrong!
Thanks in advance!

Help With Textfields, Pls...
Hi there!

I have set a textfield area on the scene, named it, and I'm filling it with text from a file. I would like to know, how can I replace specific words in that textfield, with certain rectangular movieclips, that have the same dimensions in pixels, like the words replaced. For now, it doesn't matter what those MC do, let's say they are a button.
How cand I find the precise coordonates of a word?!?

Any ideas? I'm using Flash MX, and I don't have much actionscripting experience...

Thank You!

Textfields On The Fly
afternoon

here is my problem

i am creating textfields on the fly, moving them about and changing the formatting. this works fine when i test the movie it is all being done in. unfortunately, the movie they are held in "interface.swf" is loaded into _level1 of another movie.

When i come to test it from this base movie, the text fields have noe content. i can hover over them and get the text select mouse pointer, but not see what's there. the variables are being loaded okay, according to the debugger...

any ideas?

Textfields
Is it possible to get the pixel-position of a character within a textfield?

Textfields
I'm having a problem with my textfields. I'm using two textfields "A" and "B" to create an array. The user inputs a number into "A" and another number into "B" and then hits a button which then generates an array between the two numbers entered. It works fine in most cases. BUT, if the number in "A" is for example "2" and the number in "B" is "10" then there is no results. It seems that the number "10" is being interpreted as a "1" and so on.... Any suggestions?? Thanks.

CSS And Textfields
I would like to apply a stylesheets to a textfield and have two columns in the textfield. In the left colum there are supposed to be pictures and in the right column text. But I can not figure out how to do it. Here is what I have.


ActionScript Code:
stop();

//----------------------- <MCL> ------------------------ //
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
// --------------------- </MCL> ------------------------- //
var myLV:LoadVars = new LoadVars();
myLV.load("txt/2006-03-20.txt");
myLV.onLoad = function(success:Boolean) {
    if (success) {
        tPress.htmlText = myLV.info;
    } else {
        tPress.text = "Fehler beim Laden des Dokumentes";
    }
};

var styles:TextField.StyleSheet = new TextField.StyleSheet();
styles.onLoad = function(success:Boolean):Void {
    if (success) {
        // display style names.
        tPress.styleSheet = styles;
    } else {
        trace("Error loading CSS file.");
    }
};
styles.load("css/stylesheet1.css");



this.btNext.onRelease = function() {
    this._parent.gotoAndStop("2006-03-08");
};


stylesheet1.css:


Code:
.mainText {
color: #000000;
font-size: 10px;
}

.float {
float: left;
}

And here is the loaded text:


Code:
info=<b>headline blah blah</b><br><br>

<a href="img/2006-03-20/pict3118.jpg" target="_blank"><img src="img/2006-03-20/pict3118_150x160.jpg" width="150" height="160" class="float" alt="blah" /></a><p class="mainText">sadfsadfasdfl lskdjf lksj dflksduj flskdjf lskdjf lsdfkjsld kfjsldfj slakdfj sldfkj sldfkjsd flkjsfdkl sadflkjs fdlkjd flksjdf lksjdflskajdflksjadf lskajfdlsakjdf lskjdf lsadjf lasdjfk sladfjk </p>
<a href="img/2006-03-20/pict3130.jpg" target="_blank"><img src="img/2006-03-20/pict3130_150x160.jpg" width="150" height="160" style="float:right;" alt="sdlkfhj sakldfjh laskdjf lsadkfj sadlkfj " /></a><p>jlds föksajdflkö sjdflksödj fklasjdf lasjkdf sadlkfj saldkfj sladfjks ldfjsldkfjasldkjf lasdkjflskdjf lsakjd flskajd flaskjdflsakjd flskadjflskajdflska dfls akdjflsk adflksjad flkj asdflkjasdflköj sadflökjsad flkjasdfljksad fhsladfuls adkfklsdjf lskhd flshdlfsdhf sadhfs ladfhsad fhksadf sdfsa dhfshadf sadfhk sadhf </p><a href="img/2006-03-20/pict3122.jpg" target="_blank"><img src="img/2006-03-20/pict3122_150x180.jpg" width="150" height="180" style="float:left;" alt=" sildfu soidfuosdifu sodifuosadiuf osiadfuoiasdf" /></a><p>sadf sdfjklsdf lskajd flkasjdf lkasjdflkjas dkfjlaskdjfl kasdjflkasjdfjkasldlfjklasjdfksajdkfl lsadkhfjlsakdfhsladfjkshdfksadföjsadf</p>
Unfortunately when the text extends the image vertically it wrapps aournd and the text continues at the left hand side of the text field. It pisses me off. I spent so much time trying to work it out.

TextFields
I am having a really wierd problem. I am in a class that has inherited from another class, that has inherited from a MovieClip object. So I want to create a new text box. So I use the following code:


Code:
public function onEnterFrame()
{
this.createTextField("Xtxt", this.getNextHighestDepth(), 0, 0, 50, 50);
Xtxt.text = this._x;
Xtxt.multiline = true;
Xtxt.border = true;
}
this gives me the following errors:

**Error** /Volumes/Sulabh/Sites/isegs/trunk/global_flash/flashlines2/XRuler_obj.as: Line 16: There is no property with the name 'Xtxt'.
Xtxt.multiline = true;

**Error** /Volumes/Sulabh/Sites/isegs/trunk/global_flash/flashlines2/XRuler_obj.as: Line 17: There is no property with the name 'Xtxt'.
Xtxt.border = true;

Total ActionScript Errors: 2 Reported Errors: 2

XRuler Constructor is called
YRuler Constructor is called


I know this code should work. and I can't figure out why it isn't? Any suggestions would be good, I have no idea.

TextFields
Is there a way to *select all* the contents of a textField when it receives focus? I can't find a thing in the documentation...

Textfields
how do i change a input textfield into a dynamic textfield with actionscript. And vice versa

How Many TextFields?
Does anyone have an idea on this? I'm looking at creating a vertically scrolling list, with sprites containing several text fields; and am wondering if anyone know's the approximate limit of the player?





























Edited: 08/19/2008 at 05:45:32 PM by cayennecode

Textfields
I am tring to create textfields on the fly that wrap the text they contain. I am using the following code but it is not working well. The text within the textfield is low and some of it is cut off.(Easy to see if I put a border around the textfield.) What's my bext solution to create a textfield which perfectly fits the text it contains.

var caption="someText";

thumbTitleTextFormat=new TextFormat();
thumbTitleTextFormat.font="exportedArialFont";
thumbTitleTextFormat.align="center";
thumbTitleTextFormat.size=20;
thumbTitleTextFormat.color=0xFFFFFF;

createTextField("thumbTitle_txt",13,0,0,0,0);
thumbTitle_txt.setNewTextFormat(thumbTitleTextForm at);
thumbTitle_txt.autosize="center";
thumbTitle_txt.embedFonts=true;

thumbTitle_txt._width=thumbTitleTextFormat.getText Extent(caption).width;
thumbTitle_txt._height=thumbTitleTextFormat.getTex tExtent(caption).height;
thumbTitle_txt.text=caption;

For...in For TextFields
Hey all - was working with the MC prototype function found here.

I was trying to get it to work for textfields as well.

E.g., I have a MC on my stage in which I dynamically create MCs from an XML file - I want to be able to have that function list those as well.

Thanks

TextFields
Hey guys,

I want to convert a textfield, containing a few words, to a movieclip.

Can this be done in actionscript 3, if so, how?

I need to convert it so i can tween the text alpha and so on.

TextFields
Despite the fact that a trace shows that I have created a textfield, no text is being rendered to the screen. How can I correct this?

     var clip_mc:MovieClip = createEmptyMovieClip("name0_mc",4);
     clip_mc._x = 20;
     clip_mc._y = 20;
     clip_mc._width = 100;
     clip_mc._height = 100;
     clip_mc.createTextField("name_txt",1,0,0,30,15);
     clip_mc.name_txt.text="My Text";
     trace(clip_mc.name_txt.text);
     trace(clip_mc._x);
     trace(clip_mc._y);
     trace(clip_mc.name_txt._width);
     trace(clip_mc.name_txt._height);

TextFields - Is It Possible To...
have 4 text fields on the stage. salary_txt, percent_txt, dollar_txt, total_txt (1 on top, 2 below that and 1 below that).

- onload, salary is set to 50000 (and therefore total_txt displays 50000).
- I go ahead and add 3% to (percent_txt).
- dollar_txt should now display $1500 & total_txt should now display $51500

Then if I decide I want to increase the total, but this time using a dollar value, I want to be able to select the value in the field ($1500) and change that to lets say...... $4000...

- percent_txt should now display 0.08 (or 8.0 if you convert)
- total_txt should now display $54000.

Is that possible? This is what I have so far:

------------------------------------

salary_txt.text = 50000;

percent_txt.onChanged = dollar_txt.onChanged = function(){
var dollarValue = Number(dollar_txt.text)
var percentValue = Number(percent_txt.text)
total_txt.text = dollarValue*percentValue;
}

total_txt.onChanged = function(){
var dollarValue = Number(dollar_txt.text)
var totalValue = Number(total_txt.text)

//round to 2 decimal places
percent_txt.text = int((totalValue/dollarValue)*100) / 100
}

Textfields
can someone please tell me how to change the backcolor of textfields and buttons in an html form?

Duplicate MC/Different TextFields
Hello all,

I have a movieclip(a1) that has a text box in it (sectionname). I'm trying to duplicate the movieclip (a1, a2, a3, etc...) and have a different title in the different textboxes (Our Company, Services, etc...). Duplicating the movie isn't a problem, it's getting the textboxes to have different names. Here's what I've got...



Code:
onClipEvent (load) {
// number of movieclips
num = 4;
// loop to duplicate movieclips
for (i=2; i<=num; i++) {
this.a1.duplicateMovieClip("a"+i, i);
//loop to name each movieclip in it's textfeild
if (i=2) {
this["a"+i].sectionname = "Solutions";
} else if (i=3) {
this["a"+i].sectionname = "Services";
} else if (i=4) {
this["a"+i].sectionname = "Contact Us";
}
a = this["a"+i];
a._x = a1._x+(a1._width*(i-1));
}
}
As it is now, the movie freezes when I try to test it. Anyone seeing what I'm doing wrong?

Thanks for your time.

Textfields Variables?
Is texfields the only way to create Variables in flash???

MX Dynamic TextFields
I'm using an external text file variable to load text into a dynamic textfield in flash MX. I have a new scrollbar UI Component working with the text field. But there seems no way to get the HTML tags in the external text file working. Any ideas! I want to keep the text content for my textfields in separate files. Do I have to stop using the "oh-so-useful " scrollbar component?"

Help With Textfields Needed Bad
hi !
i have a big problem that i don't really understand !
i'm trying to place links on text in a textfield, i've already tried several ways but it just doesn't seem to work. i've ended up by doing somethinf like this :

Code:
set(_root.type1.type1MC add ":titrenewsA", titre_news);
set(_root.type1.type1MC add ":url", link);
creating a button instance in the type1MC movie clipand with that buton i add the folowing action :

Code:
on (release){
getURL(url);
}
normally it should launch the url saved but nothing happens my button isn't even recognized (no cursor changed on mouse over)
if anybody understands could they help please thanks very much !

Three Input Textfields
I'm working on a stand alone program where the user needs to input information into 3 different input text fields correctly inorder to advance. Upon entering the frame with the three textfields the focus needs to be set to the first one (lastname) where the user will type in "Jones"; then they need to TAB to the next field (firstname) and type "Kristie"; and then TAB to the last (Middle) and type "A". While "Tabbing" to the next field i need to have the program check the text box they are leaving to make sure the correct information is in it, if not it needs to clear the text field so the user can correctly enter the info.

So far i have:
On the frame:

lastname.tabindex = 1;
firstname.tabindex = 2;
middle.tabindex = 3;
Selection.setFocus(lastname);

However I can't tab to the next 2 fields.

Can anyone give me some guidance on how to make all this work?

Creating Textfields On The Fly: MX
Ola,

OK - I have a text file which contains several variables:

var 1 = Number of submenu items
var 2 = submenu1 [name]
var 3 = submenu2
var 4 = submenu3...etc etc

In this example, var 1 would be a numerical value of 3, reflecting the fact there's 3 submenus.

NOW .... Here's the bit I can't do.

I want to create textfields to hold the variables 2 - x, but would like var 1 to dictate how many textfields need to be created (on the fly).

Anybody know how this can be achieved?

Thanx

HTML In Textfields?
When I assign HTML code to a dynamic textfield, why doesn't it format anything that sets align="center"? I'm doing this in MX. Can handle HTML formatting such as align (left, right, center)? Do <tables> work as well?

I know when I initially created the dynamic textfield, and set it to handle HTML that it was by default set to left justified. Does this mean everything that comes in will be left justified? If not, how can I make the textfield respond to my HTML formatting properties?

Thanks....

Wmode & Textfields
Hi guys!
here's my prob. I have put a flash movie in a html page. I've set the wmode to transparent. In this movie there's a form with some input fields. The cursor in those fields results to be hidden... I mean... if I click in those fields the cursor doesn't show up! The only way to make it work properly is to set the wmode paramenter to normal. Now... I'd need to have this movie with transparent background. Now I wonder whether I can have the wmode set to transparent and the cursor working properly as well! can anyone help me? Thanks guys!

Dynamic Textfields?
I am currently making a personal website and I want it to include a news section. It's a pain to upload the flash movie every time something is changed, so I was looking for an alternitive. I know there is a way to create an external file that can be loaded into the movie, which solves my problem. However, I don't know how to do this correctly. I've done this one time, but every time I tried to use html in the file, it wouldn't load. I tried selecting and deselecting the html option in the textfield options in flash, but still no text!

---
Version:
-Flash 5

Questions:
-How do I go about making a text field that can contain loaded text ( including basic html ) from an external file.
-What specific coding will I need to include in the external file.
---

Any help will be greatly appreciated, thanks.

Sorry if I'm the 50,000 person to ask about this, oh well

Help With Links And Textfields
Okay, I have some dynamic text. And I'm trying to put a link within the dynamic text.

For instance the Dynamic Text field contains:

"If you'd like to contact me please click here or feel free to contact me at asweetguy86@yahoo.com ."

How would I go about making "click here" a link to my contact form?

I'd appreciate the help as soon as possible this is the last hurdle I must cross and I can upload my site to the net. And then I will need some opinions.

Remove Textfields
i created some textfields using


Code:
function createNTexts(gfSons) {
for (var i = 1; i<=gfSons; i++) {
_root.createTextField("myText"+i, i, 254, (i+4)*30, 100, 19);
_root["myText"+i].border = true;
_root["myText"+i].type = "input";
}
}


works fine.. now i wanna delete the same texfields in the next frame.... i tried this... but isnt working


Code:
function deleteNTexts(gfSons) {
for (var i = 1; i<=gfSons; i++) {
temp = "myText"+i;
//trace(temp);
temp.removeTextField();
}
}

WHY??
thanx
aLi

AttachMovie And Textfields
The following function should display the loaded data in the textfields of the attached movieClip. The ASP file returns the required data, but is not displayed in the textfields. Even if I try to directly set the text in the textfield, it is not displayed.
Here's the function:

//************************************************** ******************
//Functie viewOrder (ID)
//optioneel orderID meesturen
//************************************************** ******************
viewOrder = function (ID){
_root.attachMovie("viewOrder",view,0);
//viewOrder._x = 127; // Set position of viewOrder Screen
//viewOrder._y = 120;
view.campagneNaam.text = "testing 123";
order = new LoadVars();
if(ID){
order.ID = ID;
}else{
order.ID = 49;
}
order.sendAndLoad("flashvieworder.asp",order,"POST ");
order.onLoad = function (success){
//Fill textfields with collected data...
//viewOrder.campagneNaam.text = order.CampagneNaam;
view.userName.text = user.userName;
view.campagneNaam.text = "testing 123"; //order.CampagneNaam;
view.StartDatum.text = order.StartDatum;
view.EindDatum.text = order.EindDatum;
view.Totaal.text = order.Totaal;
}
}
//************************************************** ******************

Does anyone know why the text isn't displayed?

How Much Text Can Textfields Contain?
I've found out that textfields cannot contain endless amounts of text. Does anybody know the limit of text it can contain? I find nothing about this limitation in any flash-manual.

greetings
Dave Lenz

Selecting Textfields With AS
Heey,

I forgot the script to select an input-textfield so the user doesn't have to click on it with the mouse.

Greetz,

Please Help....textfields & Scrollbars
I've posted here before without a response so I'm hoping some one can help me on here now. I also posted this in the newbie section hoping someone with reply. I have two questions that I need help on so I can complete my website. First, I'm looking for a code to put in my actionscript so I can make my buttons continuely scroll up or down till I release the button. Second, I have a textfield on my site right when you go to the site that comes up with the news and all that but I have buttons also on my page and I want every time a button is clicked in opens that buttons information in the textfied sort of like using inline frames in html. I hope some one can explain this well and tell me what to do cause I'm lost otherwise and I really like my site idea and I can't finish it with out this...Please help.

Please Help....textfields & Scrollbars
I've posted here before without a response so I'm hoping some one can help me on here now. I also posted this in the actionscript section hoping someone with reply. I have two questions that I need help on so I can complete my website. First, I'm looking for a code to put in my actionscript so I can make my buttons continuely scroll up or down till I release the button. Second, I have a textfield on my site right when you go to the site that comes up with the news and all that but I have buttons also on my page and I want every time a button is clicked in opens that buttons information in the textfied sort of like using inline frames in html. I hope some one can explain this well and tell me what to do cause I'm lost otherwise and I really like my site idea and I can't finish it with out this...Please help.

Textfields Are A Pain
Hello.
I've noticed that when you draw a textfield and type in it, it is all good. However, lets say you type in a word "test". Then yo resize this textbox, the word "test" is stretched and/or scaled.

It seem you have to draw your box, size it to how you want it, THEN, type in it. This is a pain though, maybe my technique is off, I don't know. Any help/technique would be greatly appreciated. Thank you.

Autoresizing Textfields
Hi!

Is there some way to control the sizing of a textfield so that it only expands at the bottom? Or is there a way to set a maxwidth when using autoSize? Pls hlp!

MX2004 - Textfields
ok i have a text field.. how do i make it so when the user hits enter after typing in there email adress..it emails it out to another email.
plz help!
thx!

Smart Textfields
I need some advice.

I use MAC and Version 5.

How do I write code to tell a movie clip to be invisible if a text field is left blank.

Thanks

Creating Textfields
I have a movieclip named DispMenu on a scene. In the first frame of the scene, I am creating several textfields. Now, I want the textfields to be created within that movieclip, how do I do that?

_root.DispMenu.createTextField(handle, i, 10, i * 20, 120, 20);

That is the line as I have it now. But best as I can tell, that isn't creating them inside the movie.

Rotating Textfields
Hi all,

I just can't rotate an textfield. The textfield gets lost all the time.

code:

createTextField("text1", 2, 400, 335, 146, 16);
text1._rotation=270;
text1.type="input";
text1.border=true;
text1.borderColor=(0x00AA00);
text1.html=true;
text1.textColor=(0x00AA00);
text1.htmlText="<u>Help</u>";

code end

Thanks for any help,
Cheers,
-----va

Dynamic Textfields Help
I am relatively fresh to ActionScript since all my work so far has been done in the "graphic" part of the flash. I would like to know if it is possible to create more than 1 dynamic text box with createTextField command and followed by setTextFormat? If I tried to do it in a row Flash will display only the last one text.

I could not find this in the manual and don't know how to solve this problem. Help is appreciated! here is the code i used so far

//--------------------------------------------------------------------

MovieClip.prototype.create_text=function(sTextName ){
var nWidth:Number = mcDisplayBackground._width;
var nHeight:Number = mcDisplayBackground._height+1;
var nX:Number = mcDisplayBackground._x+3;
var nY:Number = mcDisplayBackground._y-1.5;
this.createTextField("tData", this.getNextHighestDepth(), nX, nY, nWidth, nHeight);
tData.text = sTextName;
tData.selectable = false;
tData.multiline = false;
tData.wordWrap = false;
var tfFormatter:TextFormat = new TextFormat();
tfFormatter.font = "kroeger 05_56";
tfFormatter.size = 8;
tfFormatter.color = 0x7fdc09;
tData.setTextFormat(tfFormatter);
}
create_text("INTERACTIVE PORTFOLIO");


//--------------------------------------------------------------------

agent _toto

An Array Of Textfields, How?
Hello:



Is it possible to make an array of textfields and access the .text in a for loop. eg.
code:
for (i=0; i< 50; i++)
{
textField[i].text = array[i];
}


at least something easier than repeating 50 lines of myTestField1.text = "etc"
myTextField2.text = "etc etc"
and so on ....

TIA

Having An '&' In Dynamic Textfields
Excuse me,

I am getting dynamic information pulled in from a txt file which contain multiple variables, so the variable name has to start with the '&' for each variable in the txt file. But is there a way I can have an '&' pulled in from the txt file into the flash's dynamic text box without flash thinking it's the start of another variable?

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