Linking From Dynamic Textfields
I have a textfield containing various names that i wish to convert into links:
textfield="link1
link2
link3";
I want these fields to be regular text links, like in HTML, but loading seperate MC's into a given target.
Is this even possible? would i need to use different scripting to acheive this?
help!!!!!!
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-24-2001, 01:42 PM
View Complete Forum Thread with Replies
Sponsored Links:
Linking Textfields
Text flows from one tf to another, as a desktop publishing app.
Has anyone written a class to do this or done it with AS?
I'm not necessarily looking for a solution, just ideas about how to go about it.
View Replies !
View Related
Linking Textfields (like Quark Xpress Etc)
Hi all,
I'm working on an app in which I'm loading HTML into a textfield. The textfield is visually a page in a book. Now what I want to do is create m,ultiple textfields and link them in such a way that if the text is to long for one textfield, it continues in another textfield. But I'm not sure how I would go about doing that. I thought of working with the autosize feature and splitting to HTML into array parts on every after which I keep on feeding the textfield and measuring it untill it has reached the max size. But isn't there another way? Maybe with scroll? Just wondering what your ideas on this would be...
Cheers
View Replies !
View Related
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?"
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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?
View Replies !
View Related
Dynamic Textfields ...
Hi, thanks for viewing this thread,
Created an e-mail textfiled (var-name = Email).
-
Is it possible to tell a button to only accept an entry when certain characters appear in that textfield? Here is what I'm about trying to do:
code: on (release) {
if (Email eq "" || Email eq "undefined") {
_parent.Status = "PLEASE ENTER YOUR E-MAIL ADDRESS.";
} else if (/* Email does not contain characters "@" and "." */) {
_parent.Status = "PLEASE ENTER A VALID E-MAIL ADDRESS";
} else if /* +++ FURTHER SCRIPT +++ */
Thanks for your advice!
aut.
View Replies !
View Related
Tab To Dynamic TextFields
Is it possible to tab to a dynamic TextField? I've failed miserably to do so today.
Tabbing to input text fields works but it ignores the dynamic TextFields. I need to tab to them in order for screen readers to read them. I've set tabEnabled, tabIndex, the AccessibilityProperties but can't for the life of me find a way to tab to dynamic TextFields.
Any help would be greatly appreciated.
Thanks
Bob
View Replies !
View Related
[AS2 OOP] - Dynamic MCs Or TextFields
Hi,
as you'll see with the following snippet of code, I'm rather new to OOP for Flash.
I've been trying to dynamically create a textField with no luck.
Code:
//mcPath:MovieClip is a parameter passed to the class' constructor
var myArray:Array = new Array("one", "two", "three");
for (var i=0; i>myArray.length; i++) {var eval("myMc_" + i):MovieClip = mcPath.createTextField("tempText" + i, mcPath.getNextHighestDepth(), 9, 30, 552, 0);
}
The problem is that I get an error: (Syntax error)
Any help would be very much appreciated. Thanks
ps. I did look around, but couldn't find anything that could be of help to my problem. I'm sorry if this issue has already been dealt in the pass.
View Replies !
View Related
Dynamic Textfields
I was wondering...
Can you somehow have a text dynamically loaded into textfields in separate columns?
Like if you had paragraph 1 on the right, and paragraph 2 on the left, but they actually load one text file or xml ?
if I read this I wouldn't understand it myself so I'll have to post a picture if you think it'd help.
ciao
View Replies !
View Related
Dynamic Textfields.
Hi all,
I have lite bit of a problem.
What i want to do is to use an dynamic text field like a Iframe, like in html.
Reason for this is that i whant to load an text file with a bunch of variables in to the text field. Some of these variables is html links to other text files(also with a bunch of variables). I want to be able to click the links and the new text file is loaded in the dynamic text field, insteed of the original text file.
I hope i didn't make my self to un clear.
Best regards fredrik
View Replies !
View Related
Dynamic Textfields
Hey
I have a function called addMenuText that is supposed to add ilnks, like a menu. So far i have this.
Code:
public function addMenuTxt() {
var _menuItem:Array = new Array("WEB", "DIGITAL ART", "3D MODELING", "IDENTITY", "PRINT");
for (var i=0; i<_menuItem.length; i++) {
var item = _menuItem[i];
trace(item);
}
trace("-------------------------------------");
trace("/////////////ADD MENU TEXT///////////");
trace("-------------------------------------");
}
How do i put the content from the Array into som dynamics textfields and make them a button?
View Replies !
View Related
Placing Dynamic Textfields
I'm wondering how I can give a dynamic textfield his place in my movie by setting it's _x and _y property. It seems like it ain't possible to do this. Or am I just looking in the wrong direction?
I would really appreciate your help on this subject.
View Replies !
View Related
Adding Dynamic Textfields
Hi
I've set up the following script on a mc to add two sets of two dynamic textfields (simply using single digit numbers), all of the four getting their info from external txt files:
onClipEvent (enterFrame) {
_root.right = (Number(righttestcheck)+Number(righttestcheck3));
_root.wrong = (Number(_root.wrongtestcheck))+(Number(_root.wrong testcheck3));
}
Check this out for weird - the _root.right section is duff. In the setup above (without _root. statements for the two variables), it won't do the addition, the 'right' or result textbox simply remains '0'. If the _root. pointers are added, it returns a NaN error.
And to top it all off, the _root.wrong part works just fine.
I've checked the paths, the combinations of variables, etc and nothing works. Is there a specific set up for more than one onClipEvent on a mc, maybe.
Anyone have any ideas? If you need the files, please just ask.
I'm going mad.
View Replies !
View Related
Addressing Dynamic TextFields?
So I am using this function to generate a row of movieClip instances to serve a navigational button on my site:
function makeButtons(){
nav._visible=0
var Button_array = _level0.one.buttons.split(",");
Button_length = Button_array.length;
xposition=80
for (i=0; i<Button_length; i++) {
duplicateMovieClip (nav, "nav" add i, i);
setProperty ("nav" add i, _x, xposition);
set ("nav" add i add ".Button", Button_array[i]);
--> set ("nav" add i add "_width", Button_array[i].length * 8);
--> xposition = xposition + (((Button_array[i].length) * 8) + 10);
}
}
the "-->"'s in the above quote are not part of the code. Those are the lines I wan to call attention to.
The first sets the width of the clip based on the length of the string stored in the Button_array; these strings are all navigational choices.
The second attempts to maintain even spacing by examining each string and mulitplying it by an average pixel value.
This is all irrelevant in a way, since it has been pointed out to me in this very forum that examining the string is not the correct wat to do what I want to do.
It seems instead that I want to examine the .textWidth property of the textField object which inhabits each duplicated movie clip and has an instance name of "field" in the original.
When I place this code directly on the movieClip to be duplicated:
trace (this.field.textWidth);
I get the values I need, but I can't seem to reference them correctly from within the function described above. It is defined on the first frame of the same movie which the button duplication takes place.
It seems to me that if I could solve the addressing problem, and replace the call for this value:
Button_array[i].length
with one that corresponded instead to the textWidth property of the intance a hand, I'd be closer to the edge of the woods, on the way out.
I know I am kind of retrofitting strategies here, and I should point out that I have already been steered toward using the textField.autoSize method, though I do not
yet know how to get it to work for what I am trying to do.
?
Thanks for listening
View Replies !
View Related
Dynamic Naming Of Textfields
I am trying to set up a dynamic tab order. This requires that textfields in a source movieclip are named dynamically (that is with increasing numbers) as the source movieclip is copied into the main movie. How can I do that?
View Replies !
View Related
Problem With Dynamic Textfields
Well in my main swf (the main site) i have this mc (called container) in which I load other swfs (to minimalise loading time).
Now these swfs have some dynamic textfields in them, that work just fine (show the text) when i test the swfs.
In the actions layer of these swfs i have code like : textbox ="texthere";
But... when i load the swfs in the main site, the textfields do not show at all.
I've tried changing the code in the swfs to _root.container.textbox ="test"; and I have even tried to put this exact code in the actionslayer of the main site, but nothing works. The text just won't show.
Thats about the best i can explain...
Does anyone of you have any idea what the problem might be?
Thanks for your time
View Replies !
View Related
Printing Dynamic Textfields?
Hi
I am workong on an app that parses in XML data in 6 languages. I need to be able to print out portions of this data. As I don't know the number of pages to print out, because this will vary from user to user and language to language, I am testing ways of achieving the printout. I have a few issues so far:
1) How can I add dynamic #p markers?
I don't think this is possible, I have tried attaching MCs with a #p marker embedded but I only want one print dialog box coming up for the user. I am using the printasbitmap(movie,"bmovie") command and can only target one MC.
2) How can I measure page overlap?
I have autosize textfields that I am populating from the XML, however I can't work out how to obtain the 'chunk' of data that I will need to be moved to the next page. Because of the multilingual aspect I can't rely on character counts. I will need to determine exactly how many lines I can fit on each page. I have experimented with textfield heights, but this doesn't give me a way of targeting the data to move to the next page.
Any help would be greatly appreciated.
Thanks
Wayne
View Replies !
View Related
Limitations With Dynamic Textfields?
Hi,
I set up a whole website and then i realized that small fonts couldn't be read in small resolutions. So I changed the text blocks into dynamic text fields (with different variable names) and then they just won't appear (other parts of the symbol.
Is there any limitation under masks? is it because they are nestled in various other movieclips?
What kind of limitations do they have?
info: they are used inside buttons nestled in movieclips.
View Replies !
View Related
Info In Dynamic Textfields
flash mx
i have two arrays and a dynamic textfield
Code:
arrayA = new Array(3);
arrayA[0] = "a";
arrayA[1] = "b";
arrayA[2] = "c";
arrayB = new Array(3);
arrayB[0] = "d";
arrayB[1] = "e";
arrayB[2] = "f";
and with a click of a button, i want to have "this" display in the dynamic textfield:
Quote:
arrayA[0]=a&arrayA[1]=b&arrayA[2]=c&arrayB[0]=d&arrayB[1]=e&arrayB[2]=f
here is the code that i am using, but it's only displaying part of the information that i want
the dynamic textfield is the clipboard
Code:
on (release)
{
for(i=0;i<2;i++)
{
clipboard = clipboard + "arrayA[" + i + "]=" + arrayA[i] + "&";
}
for(i=0;i<2;i++)
{
clipboard = clipboard + "arrayB[" + i + "]=" + arrayB[i] + "&";
}
}
and here is what the code is displaying:
Quote:
arrayA[0]=&arrayA[1]=&arrayA[2]=&arrayB[0]=&arrayB[1]=&arrayB[2]=&
it's not dispalying the string that's stored in the array element
if anyone knows how i can fix that, please help me...
thank you!!!
View Replies !
View Related
Spacing Dynamic Textfields. Why Not?
Hi there,
I would have liked to be able to space the text in a dynamic textbox. This, however, isn't possible. Why? What's so different between 'leading' and 'kerning (/spacing)'? Every other text property is adjustable (even dynamicaly now, in MX) BUT the spacing. And I think this is an important property when working with text on a screen.
What do you think my fellow flashers?
cYa.
View Replies !
View Related
Not All Dynamic Textfields Load
Does anyone have an idea why Some of my sites dynamic text fields load from the external text files and some don't.
On the site the 'about', 'contact', 'calendar', and 'notes' sections are all loaded fron external text files. The calendar and notes sections are fine but the other two are blank. I have no problem when testing these from my HD. I have checked and checked again the script in the movie to be sure of spelling and everything correct. I have the text files in the same location as the movie.
If you would like to take a look here is the link: Study Buddy
thanks,
chosenson
View Replies !
View Related
Dynamic Textfields = Godsend
My text looks so much more crisper now that I use dynamic text-fields more often, kinda like a flash side-effect (the text doesnt anti-alias when using dynamic textfields), just wanted to thank oldnewbie for helping me with the custom scrollbar, aswell i want to thank whoever pointed out that nifty trick with dynamic textfields, tho i did notice that dynamic textfields did that in the past, i never thought to actually use it to my advangtage, good sh!#
http://cgnation.netfirms.com/Flash/d...mscroller.html
View Replies !
View Related
Pictures In Dynamic Textfields?
Is there any way to get pictures to show in a dynamictextfield that I used to make a actionscripted scrollpane?
I want to have a few pictures along with the choosen text I have. If ye want to look at the page then go to:
http://home.swipnet.se/Zazi/Artifacts/
View Replies !
View Related
Formatting Dynamic Textfields With Css
Hi there, ive made an xml driven navigation menu for our website, im just in the final stages of formatting it and was trying to give the new .css support a go.
The buttons are generated and then this function was used to format them:
Code:
function FormatNewClip (i, x, y, Clip, style, buttonText)
{
Clip.trackAsMenu = true;
Clip.createTextField ("name", i, x, y, 1, 1);
Clip.name.autoSize = true;
Clip.name.type = "dynamic";
Clip.name.embedFonts = true;
Clip.name.setNewTextFormat (style);
Clip.name.text = buttonText;
}
That's all good.
I try to throw in .css styling and it all seems to go pete tong - the buttons aren't getting formatted. I've just been trying inline styling to see if i could get it to work:
Code:
function FormatSubClip (i, x, y, Sub, buttonText)
{
Sub.trackAsMenu = true;
Sub.createTextField ("name", i, x, y, 1, 1);
Sub.name.html = true;
Sub.name.autoSize = true;
Sub.name.type = "dynamic";
Sub.name.embedFonts = true;
SubStyle = new TextField.StyleSheet();
SubStyle.setStyle("a:link", {color: "#ff0000"});
Sub.name.styleSheet = SubStyle;
Sub.name.text.htmlText = "<a> + buttonText + "</a>";
}
I might be being ridiculous (it is monday morning!) if you can help then i'd be much obliged.
Cheers guys,
James
View Replies !
View Related
Dynamic Textfields And Fonts
hi,
i'm in the middle of a thing involving text loaded dynamically from xml files on which i apply a TextFormat()...
i need to apply bold on some part of it but the fake bold from flash doesn't work on the font i use and i was wondering if there was a way to apply another font (eg: the bold version of my font previously used) in the text...
View Replies !
View Related
Dynamic Textfields Not Generating ? Help
Hi guys im expecting this following code to give me 5 rows of username firstname familyname
But instead i just get 5 rows with just
familyname
username and firstname do not appear in each row..does anyone have any idea why this is happening..im sure im making some silly mistake bu ti cant see it Thanks in advance..appreciate it
the code is
Code:
mcMain= _root;
var depth:Number;
var nX:Number = 50;
var nY:Number = 100;
for(var i:Number=0; i<5;i++){
depth = mcMain.getNextHighestDepth();
mcMain.createTextField("username"+i,depth,nX,nY,0,0);
mcMain.createTextField("firstname"+i,depth,nX+40,nY,0,0);
mcMain.createTextField("familyname"+i,depth,nX+60,nY,0,0);
mcMain["username"+i].autoSize = "left";
mcMain["firstname"+i].autoSize = "left";
mcMain["familyname"+i].autoSize = "left";
mcMain["username"+i].text = "username";
mcMain["firstname"+i].text = "firstname";
mcMain["familyname"+i].text = "familyname";
trace(depth);
nY+=50;
}
View Replies !
View Related
Populating Dynamic Textfields
Hi, im using this code to create dynamic text fields on my stage and populate them from an array.
Code:
for (i=1;i<Number(_root.myvars.total)+1;i++){
myarray=_root.myvars["player"+i]
myarray=myarray.split(",");
_root.createTextField("mytext"+i,i,300,200+(i*10),300,100);
_root["mytext"+i].multiline = true;
_root["mytext"+i].wordWrap = false;
_root["mytext"+i].border = false;
myformat = new TextFormat();
myformat.color = 0x000000;
myformat.font = "eurostile";
myformat.size = 10
myformat.bold = true
myformat.leading = 5
_root["mytext"+i].text = myarray[4];
_root["mytext"+i].setTextFormat(myformat);
}
however, i want to have these inserted to a movie clip inserted on my stage, how should i adjust accordingly?
View Replies !
View Related
Array Of Dynamic Textfields?
Hi all,
I'm wondering if there's a way to do this...
I have seven values from an XML file that I'd like to display in seven dynamic textfields. I'd also like to do some processing on the text in those fields based on certain user input.
I was hoping that I could name my dynamic textfields things like myText[0] and then go through my XML data and do something like this:
myText[0] = myXML[0].attributes.name;
myText[1] = myXML[1].attributes.name;
(or using a For loop)
and so on but that doesn't seem to work.
Is there a way to do something like this without resorting to hard-coded dynamic textfieldnames and iterating through them by explicitly?
Thanks!
View Replies !
View Related
[F8] Keyed Dynamic Textfields
I'm having a tough time setting the text in a dynamic text field that rests inside of a symbol that I'm moving around with key frames. I've tried everything from text_field.text to using the variable tracer. I've used globals, hand offs, just about everything and the result is always the same, a blank field. Oddly enough, when I output textfield.text it says it has the text I want it to.
Any thoughts?
View Replies !
View Related
[F8] Equality In Dynamic TextFields
Hey all, I'm trying to equate (==) two dynamic textfields and having some difficulty.
CODE:
for(i=0; i<37; i++) {
if(this["o"+i] == this.cal_mc.lrgNum) {
this["o"+i].textColor = 0xBAFF0A;
} else {
this["o"+i].textColor = 0xFFFFFF;
}
}
Am I even close?
View Replies !
View Related
[f8]dynamic Textfields And Css Styles -
Hi guys, I have not used actionscript with css styling before and have encountered what I would have thought is a simple problem that I would really apprecaite some helping resolving.
Basically, I have a movieclip in the library (named: content_mc) that contains another movieclip that contains a dynamic textbox that is named category_txt and is set to allow html content. I want to attach and duplicate this whole movieclip a set amount of times depending on a variable number which will eventually be pulled in using an .xml file. Once the movieclip has been attached and duplicated I want to be able to apply a stylesheet to each instance of the dynamic textfields found within each duplicate of the attached movieclip and then pass dynamic html formatted content to them also. I am loading my stylesheet from an external source and have checked styles are formatted correctly and that I have embedded fonts into my dynamic textfields too, nothing works.
Obviously, the attach and duplicate bit was no problem but I just can't find the right way to apply the stylesheets to each dynamic textfield. I have attempted many different variations on the following code, but just can't seem to get it to work. I am thinking it may have something to do with allowing the timing of each element that is needed or a problem with my loop etc?
Code:
stop();
var loopNumber:Number = 5;//(will be changed to a dynamic variable in .xml file eventually
var newStyleSheet:TextField.StyleSheet = new TextField.StyleSheet();
newStyleSheet.load("test.css");
for (var i = 1; i<loopNumber+1; i++) {
this.attachMovie("content_mc","content_mc"+i,i,{_x:2, _y:115*i-115});
this["content_mc"+i].contentLoader_mc.loadMovie("assets/graphics/contentBar.png");
this["content_mc"+i].photoLoader_mc.loadMovie("assets/expertPhotos/photo"+i+".jpg");
// PROBLEMS START FROM HERE DOWN!
this["content_mc"+i].categoryTxtHolder_mc.category_txt.styleSheet = newStyleSheet;
this["content_mc"+i].categoryTxtHolder_mc.category_txt.htmlText = "<p >test has worked </p>";
//will be changed to a
dynamic variable from within a .xml file eventually!
}
Thanks in advance and all the best,
vreb
View Replies !
View Related
Dynamic Textfields In Flash
Hi,
Currently I am working on jet2holidays.com and the main banner on the page is now flash, but was previously static with a dynamic price control which would read and display the best price of a certain holiday.
We have had to change it to flash to display multiple promos but I was wondering if there was a way to display these prices dynamically giving the best price. And secondly if there was a way we could display different prices per scene?
The back end is in .net sql.
Thanks,
gecko2.
View Replies !
View Related
Dynamic Resizing Of TextFields
Thought this problem would be discussed already, but I didn't find it. What's bothering me is that I have a textField which I need to resize dynamically in AS. As this is done with the tF._width and _height the text is stretched. Not ok.
The TF is part of a text editor and the format varies inside (different sizes, colors etc) so saving and readding the textFormat is not an option. But this is such a general problem there must be a simple answer, or?
I realised the same problem occurs when resizing a tf on the stage, but I solved that by using Text Tool to resize. Doing it with AS remains a problem however. Any ideas?
View Replies !
View Related
XML Nodes Into Dynamic Textfields.
Ok.. here is my issue..
I am building a vertical scrolling thumbnail bar(panel_mc)..... Inside panel_mc, I have thumbnails that load into movieclips via xml...
image_mcl.loadClip(thumbnails[k], "panel_mc.p"+k);
The thumbs load into sequential clips named p1, p2, p3, and so on. To the right of these thumbs I have dynamic text fields that I want to hold the titles of the artwork. This is also via xml.
Here is the xml loop:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
bigpic = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
bigpic[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
thumbnails_fn(i);
loadText(i);
}
}
}
I thought i could use the same process as I used for the thumbs... by naming the text fields t0, t1, t2, t3 and so on.
This is where i'm completely stuck... I am an actionscript rookie.
function loadText(k) {
panel_mc.tk.text = description[k];
}
How do i pass k to the text field name?....
I have it rigged right now.. like this. There has got to be a better way.
function loadText() {
panel_mc.t0.text = description[0];
panel_mc.t1.text = description[1];
panel_mc.t2.text = description[2];
panel_mc.t3.text = description[3];
panel_mc.t4.text = description[4];
panel_mc.t5.text = description[5]
panel_mc.t6.text = description[6]
panel_mc.t7.text = description[7]
panel_mc.t8.text = description[8]
panel_mc.t9.text = description[9]
panel_mc.t10.text = description[10]
panel_mc.t11.text = description[11]
panel_mc.t12.text = description[12]
panel_mc.t13.text = description[13]
panel_mc.t14.text = description[14]
}
I would appreciate some help.
Thanks for your time....
illebas
View Replies !
View Related
Loop For Dynamic TextFields
Hi,
Trying to create text fields... 10 rows, 4 in each row.
This doesn't throw an error...
for(var i:Number=0; i<contentArray.length; i++){
for(var j:Number=1; j<5; j++){ this.createTextField("textField"+i+j,i+j,i*30,j*30 ,100,30);
}
}
But Debug > Objects shows that it only creates 4 across on the last j loop:
Target="_level0.textField01"
Target="_level0.textField11"
Target="_level0.textField21"
Target="_level0.textField31"
Target="_level0.textField41"
Target="_level0.textField51"
Target="_level0.textField61"
Target="_level0.textField71"
Target="_level0.textField81"
Target="_level0.textField91"
Target="_level0.textField92"
Target="_level0.textField93"
Target="_level0.textField94"
Stupidity... or ???
thx.
View Replies !
View Related
Dynamic TextFields And Performance
I'm building a site with multiple swfs and I started looking into a solution to avoid embedding commonly used fonts in each swf. So I exported them in their own swf, and then imported this using the Font class. Which works beautifully. And I understand most browsers will cache the swf once its loaded once, which will avoid having to continually reload those fonts.
But I'm having trouble with the TextFields. I previously had created my Dynamic TextFields manually on the stage (manually embedding the fonts), and populated them via ActionScript. I couldn't figure out any way to make this new solution work with that, so I deleted them all from the stage and instead created them with ActionScript, which allows me to embed these runtime-imported fonts.
This all works great, but for some reason it bogs down the performance. Scrolling a text field with a large amount of text or doing anything else (resizing the window, etc.) becomes extremely slow.
Everything worked fine before, when I was manually embedding the fonts, but I don't want to switch back to that because reloading the fonts in every swf just isn't an option. Any ideas?
View Replies !
View Related
Masking Dynamic TextFields?
Hey guys,
I read around the forums and google, and all I could find was to embed the fonts...but I am trying to dynamically mask some dynamic text, and its all janky...the mask messes up. When I change it to static text, it works perfect..
Any ideas? ive embedded the fonts and everything.
Thanks!
View Replies !
View Related
My Dynamic Textfields Won't DELETE
A weird problem from what I hear but still a problem. 2 of my external swf's use dynamic text fields, they call into my index fine but when the code says delete that movie all but the dynamic text fields are deleted. The links that have these text fields are the Cart and Contact Us.
Heres the link to check this out. www.skufedup.com/test
View Replies !
View Related
Dynamic Instantiation Of TextFields
A lot of questions here are way beyond me, so I hope you don't mind my asking some very basic questions on this forum.
I've searched through my books and still can't work out how to do this ...
I have a bundle of objects on a Sprite DisplayObjectContainer ("backDrop"). I want to attach a TextField to each of those objects, containing the name of the object, so I can visually monitor them as I sort and shuffle things. I'd like to generate each Text Field using a for-loop but I am stumbling on:
1. How to name each new Text Field.
I can generate the name I want as a variable (var textBoxName:String = "txt"+backDrop.getChildAt(i).name;), but can't apply that name when I try to define the TextBox. "var textBoxName:TextField = new TextField();" it doesn't work.
2. How to instantiate the new Text Field into each object.
I want to place each new Text Field into the object at layer i of my backDrop DisplayObjectContainer, and have the new Text Box show the name of that object. I can't work out the correct code to instantiate the new Text Box into the correct object (all Sprites and MCs). The approach I've bene taking has been: "backDrop.[What goes in here?].addChildAt(textBoxName,0);".
Some basic help would be very ... well ... helpful.
Cheers
Dougal
Edited: 11/23/2008 at 04:58:46 PM by _dxw_
View Replies !
View Related
Multiple Dynamic Textfields.
Hi there,
I am trying to show i (i can be any number) textfields.
I created this actionscript for 1 textfield:
var myTextField:TextField = new TextField();
addChild(myTextField);
myTextField.text = "TextField 1";
myTextField.width = 250;
myTextField.x = 0;
myTextField.y = 0;
myTextField.selectable = false;
myTextField.border = true;
myTextField.autoSize = TextFieldAutoSize.LEFT;
var myFormat:TextFormat = new TextFormat();
myFormat.color = 0x000000;
myFormat.size = 24;
myFormat.font = "Verdana";
myTextField.setTextFormat(myFormat);
But I have no idea how to make this code dynamic so that I can call ie:
myTextField1.setTextFormat(myFormat);
myTextField2.setTextFormat(myFormat);
myTextField3.setTextFormat(myFormat);
...
myTextField.setTextFormat(myFormat);
I tried this:
var i:int = 0;
var myTextField[ i ]:TextField = new TextField();
addChild(myTextField[ i ]);
But this is not working :(
Thanks Peter.
Edited: 12/05/2008 at 04:52:38 AM by pninos
View Replies !
View Related
Put Text Into Dynamic Textfields
How should I do this?
I've got a movieclip that is duplicated x times. In that movieclip I've got a dynamic textfield that I want to change the contain to a unique name for each duplicated mc. How should this be done?
The mc's are named meny1, meny2 and so on ("meny"+i blablabla.. I think you get it...)
View Replies !
View Related
Help Needed With Dynamic Textfields
Hi all,
i have used this code to make a textfield, but would like to know how to change it into a function so i can re-create the textfields anywhere i like and just change the value of tData to an other string.Im using 2004pro and actionScript2
//--------------------------------------------------------------------
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 = "INTERACTIVE PORTFOLIO";
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);
};
//------------------------------------------------------------
any help would be welcome
firstSteps
View Replies !
View Related
Problems With Dynamic Textfields
Hi can any one explain to me how to embed fonts as for some reason i can get the font im using to show up
Here is the script i used to create the textfields:
//--------------------------------------------- textfields------------------
var sGreenFormat:TextFormat = new TextFormat("kroeger 06_56", 8, 0x7FDC09);
var sWhiteFormat:TextFormat = new TextFormat("kroeger 06_56", 8, 0xFFFFFF);
var sGreyFormat:TextFormat = new TextFormat("kroeger 06_56", 8, 0x9A9A9A);
MovieClip.prototype.create_text = function(sTextName, newDepth,TFormat, SizeMC, nX, nY, nWidth, nHeight) {
TFormat = (TFormat == undefined) ? tfFormatter : TFormat;
SizeMC = (SizeMC == undefined) ? mcDisplayBackground : SizeMC;
newDepth = (newDepth == undefined) ? 0 : newDepth;
nX = (nX == undefined) ? 3 : nX;
nY = (nY == undefined) ? -1.5 : nY;
nWidth = (nWidth == undefined) ? SizeMC._width: nWidth;
nHeight = (nHeight == undefined) ? SizeMC._height+1 : nHeight;
trace("Creating new text: tData"+newDepth+", "+nX+", "+nY+", "+nWidth+", "+nHeight);
this.createTextField("tData"+newDepth, newDepth, nX, nY, nWidth, nHeight);
this["tData"+newDepth].text = sTextName;
this["tData"+newDepth].selectable = false;
this["tData"+newDepth].multiline = false;
this["tData"+newDepth].wordWrap = false;
this["tData"+newDepth].setTextFormat(TFormat);
};
this.create_text("Interactive Portfolio", 0, sGreenFormat ,mcDisplayBackground, mcDisplayBackground._x+3, mcDisplayBackground._y-1);
mcMenu.create_text("Menu", 1, sGreenFormat, mytest, undefined, -2);
stop();
//------------------------------------------------------------------
as you can see from the 2 images i have put up with the fonts active on my system e.g font_on the text is ok but with the fonts turned of e.g fonts_off i get a different text even thou the fonts are done addressed in my script.
any help would be welcome on this
firstSteps
View Replies !
View Related
Trace Dynamic Textfields
How can you trace a dynamic textfield. I have a bunch of them inside movieclips.
You can trace the name of a movie clip when you use code like this.
Code:
btn.onRollOver = function() {
trace(this._name);
};
btn is a variable with the path to all my dynamicaly made movieclips. But inside each of these dynamic movieclips is dynamicly created textfields with instance names. But I need a way to trace them how can this be done.
I tried this but did not work.
Code:
btn.onRollOver = function() {
trace(this.text._name);
};
View Replies !
View Related
My Dynamic Textfields Won't DELETE
A weird problem from what I hear but still a problem. 2 of my external swf's use dynamic text fields, they call into my index fine but when the code says delete that movie all but the dynamic text fields are deleted. The links that have these text fields are the Cart and Contact Us.
Heres the link to check this out. www.skufedup.com/test
View Replies !
View Related
Help Needed With Dynamic Textfields
Hi all,
i have used this code to make a textfield, but would like to know how to change it into a function so i can re-create the textfields anywhere i like and just change the value of tData to an other string.Im using 2004pro and actionScript2
//--------------------------------------------------------------------
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 = "INTERACTIVE PORTFOLIO";
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);
};
//------------------------------------------------------------
any help would be welcome
firstSteps
View Replies !
View Related
Problems With Dynamic Textfields
Hi can any one explain to me how to embed fonts as for some reason i can get the font im using to show up
Here is the script i used to create the textfields:
//--------------------------------------------- textfields------------------
var sGreenFormat:TextFormat = new TextFormat("kroeger 06_56", 8, 0x7FDC09);
var sWhiteFormat:TextFormat = new TextFormat("kroeger 06_56", 8, 0xFFFFFF);
var sGreyFormat:TextFormat = new TextFormat("kroeger 06_56", 8, 0x9A9A9A);
MovieClip.prototype.create_text = function(sTextName, newDepth,TFormat, SizeMC, nX, nY, nWidth, nHeight) {
TFormat = (TFormat == undefined) ? tfFormatter : TFormat;
SizeMC = (SizeMC == undefined) ? mcDisplayBackground : SizeMC;
newDepth = (newDepth == undefined) ? 0 : newDepth;
nX = (nX == undefined) ? 3 : nX;
nY = (nY == undefined) ? -1.5 : nY;
nWidth = (nWidth == undefined) ? SizeMC._width: nWidth;
nHeight = (nHeight == undefined) ? SizeMC._height+1 : nHeight;
trace("Creating new text: tData"+newDepth+", "+nX+", "+nY+", "+nWidth+", "+nHeight);
this.createTextField("tData"+newDepth, newDepth, nX, nY, nWidth, nHeight);
this["tData"+newDepth].text = sTextName;
this["tData"+newDepth].selectable = false;
this["tData"+newDepth].multiline = false;
this["tData"+newDepth].wordWrap = false;
this["tData"+newDepth].setTextFormat(TFormat);
};
this.create_text("Interactive Portfolio", 0, sGreenFormat ,mcDisplayBackground, mcDisplayBackground._x+3, mcDisplayBackground._y-1);
mcMenu.create_text("Menu", 1, sGreenFormat, mytest, undefined, -2);
stop();
//------------------------------------------------------------------
as you can see from the 2 images i have put up with the fonts active on my system e.g font_on the text is ok but with the fonts turned of e.g fonts_off i get a different text even thou the fonts are done addressed in my script.
any help would be welcome on this
firstSteps
View Replies !
View Related
|