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




Rotating A Dynamic Text Field?



I'm trying to rotate a dynamic text field when a button is clicked. When clicked I want text to load in the box from an external text file and the text field to rotate. Is that possible? Any help would be great.

Thanks



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-18-2004, 04:03 PM


View Complete Forum Thread with Replies

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

Rotating Dynamic Field Doesn't Displays Text
Hello everyone title contains question .Even i tried putting that feild in a movieclip but no good luck.Thanks in advance

Rotating Dynamic Text Field With System Fonts
Hello All.

I'm trying to rotate a dynamic text field that is useing system font.
Any ideas ?
I put it into a movieClip and cache it AsBitmap, but the result was the same...i.e the text dissapear.
I don't want to embed a font because the applications is to be on Chinese also and the file size will be very big.
Thanks in advance.
S +++





























Edited: 12/21/2006 at 10:00:00 AM by shimontornia

Rotating Text In A Dynamic Text Field
I have an array of names that I need to have rotate into a Dyanamic Text field, one by one. After every three names from the array have been inserted, I need to display a static line of text.

My data comes from an XML document. I have managed to load the XML document, create an array from the data and I have ramdomized/shuffled the array. I can use trace to output the desired result, but I do not know how to add this to the text field and rotate.

Here is my AS:


Code:
artist_xml = new XML();
artist_xml.ignoreWhite = true;
artist_xml.onLoad = function(sucess) {
if (sucess) {
processArtist(artist_xml);
}
};
artist_xml.load('artist.xml');
function processArtist(xmlDoc_xml) {
var len = xmlDoc_xml.firstChild.childNodes.length;
var artistArray = new Array();
for (var n = 0; n<len; n++) {
artistArray.push(xmlDoc_xml.firstChild.childNodes[n].firstChild.firstChild.nodeValue);
}
Array.prototype.shuffle = function() {
for (var n = 0; n<len; n++) {
var rand = Math.floor(Math.random()*len);
var temp = this[n];
this[n] = this[rand];
this[rand] = temp;
}
};
artistArray.shuffle();
var numberOfArtists:Number = artistArray.length;
for (var i:Number = 0; i<numberOfArtists; ++i) {
trace("Bob Plays "+artistArray[i]);
// check if we are at a 3rd, 6th, etc artist
if (i%3 == 2) {
// since i starts at 0, the 3rd element is 2 (2%3 = 2), the 6th 5 (5%2 = 2) etc
trace("Bob Plays Everything");
}
//This is the point where I am stuck. My text field has an instance name of artist_txt.
artist_txt.text = //something goes here;
}
}
Any help?

Thanks...

Rotating A Text Field
Hi There
Is it a well knowen fact that you can not rotate text fields ?
static or dynamic nor by tweening or code ?
Is there any other way to do it?
thanx

Rotating A Dynamically Loaded Text Field
Hello,

please help, below is the code i have for my dynamically loaded text field, if i comment out the rotation on the text field, it appears on the screen as it should, however, when i uncomment the rotation the text field disappears, any ideas on where i am going wrong. any help is gratefully recieved. many thanks in advance :D









Attach Code

var picTextOne_txt:TextField = new TextField();
var picTextFormat:TextFormat = new TextFormat();

picTextFormat.font = "Bradley Hand ITC";
picTextFormat.color = 0x000000;
picTextFormat.size = 30;
picTextFormat.bold = true;

addChild(picTextOne_txt);
picTextOne_txt.visible = false;
picTextOne_txt.x = 200;
picTextOne_txt.y = 500;
picTextOne_txt.rotation = -10;
picTextOne_txt.text = "Tyne Bridge";
picTextOne_txt.autoSize = TextFieldAutoSize.CENTER;
picTextOne_txt.setTextFormat(picTextFormat);

Trying To Pass Text From Form Text Field To A Flash Dynamic Text Field
Hi, I was hoping someone might enlighten me as to how/if I can do this...

Currently I'm using javascript which works fine to pass text from textfield A to textfield B:


Code:
window.onload=function()
{
document.forms.form1.shirtText.value=document.forms.form1.KitGroupID_16_TextOption_38.value
}
Is there a way to pass the textfield A text to a dynamic text input (flash) as I'd like to use the font embedding flash offers. I can make it work when loading a value from a txt file but I'm not sure how to access the value identified above as KitGroupID_16_TextOption_38 and make it appear in a dynamic input box. Eventually I might want to have 3 font choices for the user but I'd like to just see if I can get this working properly first.

Your help/advice would be greatly appreciated,

-Scott

Calculating Input Text Field To Dynamic Field (easy Action Script)
hi. i'm trying to learn action script and i need help with this bit. i'm trying to use action script to calculate my brothers ages based on my own.

using flash MX. i have an input field called "my_age" and two dynamic fields called "eli_age" and "jacob_age". eli is 4 years younger and jacob is 6 years younger. i want to be able to enter my age in the "my_age" input field and then click a button that will calculate their respective ages.

here's the fla if i haven't been clear.

thanks for any/all help,
josh

Getting MySQL Field Data Into Dynamic Text Field In Flash
Hi, im having some trouble as to how to retreive data from a mySQL database field and putting the values into a dynamic text field in Flash... im quite new to this so any help will be appreciated! thanks.

[F8] MySQL Field Value Into Dynamic Text Field In Flash
Hi, im having trouble as to how to retreive a value in a field of a MySQL database and putting it into a dynamic text field in flash... i have no idea as how to do this... any help? thanks

Asp Database Field Loaded Into Dynamic Text Field -HELP
Hi all,
after much trial and error and still having troubles i thought i would ask people that maybe know what there doing.
Im using Flash 8 pro, and have placed textarea component on stage and gave it an instantce name, need to pull a single record from a record database using asp.

This is my approach but if there is an even easier way let me know.

I have created the following pages.
webpage.asp (end result web page that shows the text field to user)
script.asp( asp script that sends data back/forth to flash

i used the FlashVars param to pass a variable into the flash movie.
variable is named auto_num. im using this to then pass it back out of flash to filter the recordset.

then on the flash movie.swf. all on root level. i have the following code

var text_value; //(this is the value sent back from asp page string)
//not sure if i needed to declare it but did anyways.

var_sender = new LoadVars();
myData = new LoadVars();

var_sender.auto_number = auto_num //(auto_num is loaded flashvars param)

myData.onLoad = function() {
my_text_1.text = this.text_value
};
myData.sendAndLoad("http://www.********.com/script.asp", myData ,"POST");

on the script page i have a record set that filters for form variable named auto_number. all of code is in asp. I call a response.write to write the text_value back to the flash movie.

here is the heart of the script.asp code. not showing the record set filtering stuff.

<% Dim text_value
text_value = "text_value="&(Recordset1.Fields.Item("long_des"). Value)

response.write(text_value)
%>

but i get undefined and can never get the variables to load into the flash movie. i want to export as flash player 6 or 7. what am i doing wrong here?

So in a nutshell, i have an asp page that shows a record and would like to display the long description field of that record in a flash dynamic text box.

I can make it work by passing the entire long description from record set within the flashvars param but that seems like a real clunky way to do it pasing that much text within the flashvars param.

Does anyone know of simple database connectivity kits that extend flash for the semi-programmer guys?

Rotating Dynamic Text
I've got an MC with a dynamic text field. I'm using actionscript to slowly rotate this MC on the movie stage. Problem is, the whole thing rotates except for the dynamic text filed. The field is contained as an MC within the rotating MC, so I figured it would rotate like the rest of the pieces. But it doesn't - the text field works (when the rotation is full circle you can glimpse the dynamic text field for a second, then it goes away as the "window" moves over it).

What could be wrong here?

Rotating Dynamic Text
Well im trying to make a text effects engine, but ive run into the problem where you cannot rotate dynamic text, and if you try it just goes blank :/

Ive seen many dynamic text effects before so clearly there must be some sort of work around...?

Any help would be greatly apreciated.

Rotating Dynamic Text
Is there is any way to rotate dynamic text(with the text inside)?

Rotating A Dynamic Text Box ?
I made a clock in a dynamic text box and can move it around the stage freely. But the second i try to rotate it 90 degrees CW or any direction for that matter, it does not play in the swf. Otherwise it plays fine.
Is there a script out there to do this or am I just missing a step. :

Rotating Dynamic Text
So what I want to do is have text that loads diagonally rather than a vertical textbox. I've tried rotating (but transforming then entering the # of degrees) but then the text won't show up when I test it. I know it works with static text - is there any way I can do it with dynamic, though?-

Rotating Dynamic Text?
Hi- I'm new to this so probably missing something obvious, apologies. Kirupa taught me all I know...

Ok- so I'm trying to make a dynamic text field which is rotated to 45 degrees.

I found the livedocs explanation

(http://livedocs.macromedia.com/flash...=00001808.html)

and I've tried to make it work, but I cannot.

My code is

stop();
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "verd";
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160, 120);
my_txt.wordWrap = true;
my_txt.embedFonts = true;
my_txt.text = "Hello world";
my_txt.setTextFormat(my_fmt);
my_txt._rotation = 45;

where 'verd' is a font symbol in my library.

Is there a linkage stage I'm missing?

Any help would be greatly appreciated.

cheers!

N

Rotating Dynamic Text
So what I want to do is have text that loads diagonally rather than a vertical textbox. I've tried rotating (but transforming then entering the # of degrees) but then the text won't show up when I test it. I know it works with static text - is there any way I can do it with dynamic, though?-

Input Text Field To Dynamic Text Field
Ok, I have an input text field with a variable name of "enter", and a dynamic text field with a variable name of "display". I also have a button on the stage. I want it so that when you press the button, it checks what the user has put into the input text field, and if it is valid it will display a certain message in the dynamic text field.
For example:
If the user types in "hydrogen" and then clicks the button, I want the dynamic text field to display the letter H. Likewise, if the user types in "oxygen" and then clicks the button, I want the dynamic text field to display the letter O. And finally, if the user types in something that is not specified in the code, it will just display "Not Valid".
I tried doing this with an on(release) action and then some if statements, but nomatter what I typed in it would always display H. I'm probably overlooking something simple, but nonetheless, I need help. Thanks

Input Text Field Into Dynamic Text Field
Hey guys,

I'm really new to AS 3.0. I would like to transmit information from an input text field into a dynamic text field once a submit button is clicked.

Any help would be greatly appreciated.

I'm using CS3 AS 3.0. Thanks!

Rotating Dynamic Text Boxes
In Flash 5:

Is it possible to rotate dynamic text boxes. It seems that when I rotate the box the ability to push text dynamicly into the box stops, unless I enbed the font (which I would like to avoid)

Thanks in advance, Ben

Dynamic Text - Scaling And Rotating
Dynamic Text - Scaling and Rotating. I know that it is a limitation of flash .. the scaling and rotating a dynamic text box. 'Device Type' fonts make the text disappear when scaled/rotated. My project is to take external data to dynamically populate a textbox, that textbox must then be scaled and rotated to keep the illusion that the text rests on a piece of paper that is moving on the screen. If anyone has a solution, please respond.

ARGH Rotating Dynamic Text
I am trying to create chart with dynamically loaded values. for the labels at the bottom of the chart the text will be quite long.

everytime i try to rotate these dynamic text boxes the dynamic information doesn't appear - it only shows up if the text boxes are horiziontal?

what can i do?

Rotating A Dynamic Text, Can't Get It To Work.
Hey folks,

I have a little problem here, that I keep banging my head on for a few units now. It's fairly simple: rotate a dynamic text. Think of somekind of a quirky menu structure, with a circle in the middle and leaf-like menu items around it. I would like to rotate those, then it will look like a nifty flower-menu. Anyway, I cannot get the rotation to work. I've wandered around on the forums and Google already, and all point to the same thing. Embed a font, attach it and then rotate it. Well, I embedded the font 'Arial' in my library, linked it and called it 'Embed'. Then I create a TextFormat in AS3, use the name 'Embed', link it to my TextField and set the property embedFonts to true. All this goes fine, until I use that property. In the beginning you can still see my menu (only when it's not rotated, otherwise it disappears) and it's text, if I set embedFonts to true the text disappears. What am I forgetting or doing wrong, and is there perhaps an easier option? Thanks for your time and input, it'll be greatly appreciated.

- lwmxynedtodth

Rotating Dynamic Text Box In Actionscript
I have created a dynamic textbox using actionscript, and am trying to rotate it:

_root.axis.createTextField("labelY", -1, -1, -16, 10, 20);
_root.axis.labelY.embedFonts = true;
_root.axis.labelY.text = labelY;
_root.axis.labelY.setTextFormat(labelYFormat);
_root.axis.labelY._rotation = 90;

When i run this, the text disappears, and when I remove the rotation line it still does not appear. I'm sure it has something to do with the embedFonts method, because when I remove this line along with the rotation line, it displys. IO'm pulling my hair out here!!!

A computer always does what you tell it to, but rarely does what you want it to.....

Rotating Dynamic Text Fields
I need to rotate a couple of dynamic text fields, but every time I try, the text just disappears. I have tried putting the text fields inside a movie clip and rotating that - both manually on the stage and with actionscript - but the same thing happens. I'm sure this must be possible - what am I missing???
Thanks!

Rotating A Movie Clip That Contains Dynamic Text.
I have a movie clip that is a circle which, in turn has movie clips around the edge.

Each of these movies clips contains a dynamic text field.

When I try and set the _rotation value of the circle clip in the main movie, the dynamic text boxes will only display their text when they are at 0 degrees (at the top of the circle in this instance).

Is this a "feature" in flash or am I doing something wrong?

Thanks in advance for any help.

Andrew.

Problem With Xml, Ampersands, And Rotating Dynamic Text
hello! i've been coming here forever! excellent site. the best! here is my question...

i am pulling in a bit of text from xml with an ampersand in it ("John & Marilyn"). currently, its in the xml as & (but i've tried a number of things). now if i change the dynamic text field to html, it will display the ampersand properly but once i rotate it, it will not display anything. long story short, i need to...

- read in an ampersand from xml
- display it in a rotated in a dynamic text field

any thoughts?

Unique Rotating Dynamic Text Disappering Problem
Hello-after reading through several flash forums, I understand that I need to embed a font into my text fields for them to appear after a rotate. My problem is that I need to give users the option to change the font, and no code that I have tried allows you to change that font and still have the font appear....has anyone tried this? or have a workaround?

[AS2] Changing Text In Dynamic Text Field With Dynamic Instance Name
I dont know what I am missing here but what I want to do is change the text inside a dynamic text field via actionscript. the code I am using runs in a loop within a function. Trace is outputting the correct values.


PHP Code:



    for(i=0; i<=4; i++) {
        if(_root["order_"+ q][i] == 0) {
            ["order_"+ i]text = "First";
            trace("first");
        } else if (_root["order_"+ q][i] == 1) {
            ["order_"+ i]text = "Second";
            trace("Second");
        } else if (_root["order_"+ q][i] == 2) {
            ["order_"+ i]text = "Third";
            trace("Third");
        } else if (_root["order_"+ q][i] == 3) {
            ["order_"+ i]text = "Fourth";
            trace("Fourth");
        } else if (_root["order_"+ q][i] == 4) {
            ["order_"+ i]text = "Fifth";
            trace("Fifth");
        }
    } 




basically I want to do this -


PHP Code:



order_0.text = "First"; 




So how can I change this line to work as expected?


PHP Code:



["order_"+ i]text = "First"; 





EDIT- The instance names for the dynamic text fields are set
Thanks

Loaded Text File Wont Show All Of The Text In Dynamic Text Field
When I load an external text file into flash and display the string in a dynamic text box, not all of the text will show in the text box; and using scroll button to scroll the text doesnt help.

The text that is in the text file is as follows, and as far as I can see there is no reason why all this text shouldnt show in the dynamic text field; by the way all my targets are correct, I know that for fact.


message=Code: Cheat:
BEEPSAGONER Deactivate the censor beeps
DRACULASTEABAGS 50 lives
DUTCHOVENS Frying pan mode
XFYHIJERPWAL IELWZS Debug mode
BOVRILBULLETHOLE Shoot all objects
EASY Easy mode
VERYEASY Very easy mode
SPUNKJOCKEY New death animation
SEXYMANN Birdy & Squirrel scene

Code: Unlock chapter:
PRINCEALBERT Barn Boys
CLAMPIRATE Bats Tower
ANCHOVYBAY Slopranos
MONKEYSCHIN Uga Buga
SPANIELSEARS Spooky
BEELZEBUBSBUM It's War
CHOCOLATESTARFISH The Heist
WELDERSBENCH All chapters and scenes

Code: Unlock Multiplayer character:
WELLYTOP Conker
EASTEREGGSRUS Neo Conker
BILLYMILLROUNDABOUT Gregg the Grim Reaper
CHINDITVICTORY Weasel Henchmen
EATBOX Cavemen
RUSTYSHERIFFSBADGE Sergeant and Tediz Leader
BEEFCURTAINS Zombies and Villagers

Is It Possible To Change A Text Field From Dynamic Text To Static Text At Runtime?
The reason is because the dynamic text appears to be taking up about 90 % of the CPU usuage and I dont know any other way to reduce the CPU usage.

The text areas pull in lots of data from text files which slows down the program.

Any ideas?

Dynamic Text Field Receiving Dynamic Variables...
or something like that . . .

This is my problem: I'm generating _global variables via XML. Each variable represents different types of copy, of varying lengths. For Example:

_global.introduction = xmlDoc_xml.firstChild.firstChild.nodeValue;
_global.body = xmlDoc_xml.firstChild.firstChild.firstChild.nodeVa lue;
_global.summary = xmlDoc_xml.firstChild.firstChild.firstChild.firstC hild.nodeValue;

I want to create ONE text field, with scrolling, that will act as a template to house all types of content. I've assigned a variable that equals "content" to this text field. . . My problem is, I can't get the text field variable (content) to dynamically swap for the global variable (_global.introduction) in order to display the proper content.

This seems simple, but something's not working for me. Any thoughts? . . . BIG thanks in advance!

Dynamic Text Field And Dynamic Xml Field
Good evening,

After days of debugging, I find myself cornered by identifying the absence of content in a dynamic xml field.

I am trying to build a function that will move the playhead to a new frame "waiting" when the field is undefined. When the field is populated, the playhead will move to an active frame "vote".

I have attempted several variations on the following code and nothing has worked as of yet.

if (_root.mc_xml.b1v.text=="") {
trace("waiting");
} else if {
trace("vote");
}

// never got it to print anything but vote

There are five possible strings that can dynamically populate b1v from the xml: "Aye", "Nay", "Abstain", "Absent", "NP".

When the vote is complete the xml nodes and their children disappear and flash sees the xml text field as undefined.

What is the correct AS to target or check for null or undefined?

is null
=null
!=null
=undefined
is undefined
!=undefined

I just need a boolean answer. Please someone release me from this loop.


Thanks

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

How To Break Up Text When Calling Text Into A Dynamic Text Field
I am calling test in from a .txt and was wonding if there was a way to have a page with a bunch of information and have it obly call an indevidual paragraph or sentance depending on what i want it to ask.


ThnX

Load Text From A Text File Into A Dynamic Text Field
I'm trying to load text from a text file into a dynamic text field. The text field is on the "blog" page of the website. When I test my movie, the first time I go to the blog page, the text from the external text file (AND the CSS styles) show up fine. But when I click from the blog page to go to the "profit calculator" or "contact" pages and THEN click to go BACK to the blog page, the blog page animates back in, and right as the animation ends, the text on the blog page suddenly disappears and won't come back. PLEASE help me figure this out!

Button Function - Load Text File To Dynamic Text Field
Hey again,

okay straight into it. I have a few button named b1 b2 b3 and so on. Now these buttons i want to load a text file into a dynamic text field called myText. Now the text files which will be loaded contain html tags, so i want to have that property set.

Now current I have home.text loading into myText automically on swf loading. But when I click any of the buttons the text file won't change over.

Now my menu is seperate to the body. I have 3 swf files, one called base.swf, nav.swf and body.swf. Base.swf loads nav and body onto it.

here is what i have as the script.

Frame1 - body.swf

_root.onData = function(){
myText.html = true;
myText.htmltext = _root.myInfo;
}

loadVariables("home.txt", _root);
loadMovie("scratchy.swf", logo);


Frame1 - nav.swf - gigsbut (button)
on (release) {
loadVariables("gigs.txt", _root.body);
}


can anyone help point out where I am going wrong. I have a feeling I am not targeting the text field right from the button. If you could help point me in the right direction rather then give me the answer that would be good as I would learn better from that. Thanks

Wolfie

PS - Let me know if you want or need more info. Am happy to post it up.

Using Buttons To Change The Text File A Dynamic Text Field Loads?
I have a text field that loads text from a text document which works great for the news section of my site. However, is there a way I can keep that same text field and change it's content based on what button is pressed? For instance, if someone is viewing the "news" section of my site, and then they click on the "links" button, can I unload news.txt and load links.txt into that text field?

Dynamic Text Field Loads Text, Font Not Showing Properly
I have a flash 8 movie in which there is a dynamic text field loading data from the server. The data loads beautifully and appears in a text field formatted as html.

This html-formatted text field uses a stylesheet as well which works great for everything except the font. Using Flash, I have specified a font of DIN-Medium for the dynamic text box on my stage and yet the text that appears when I publish to my hosting provider appears to be Times New Roman. WTF?

My stylesheet does not specify any font family.

Can anyone tell me how I might get the dynamic text box to show the text using the DIN font? Do I need to export the font in the library of my flash movie or something?

Here's my actionscript:

PHP Code:




stop();

import TextField.StyleSheet;
var myStyleSheet:StyleSheet = new StyleSheet();
myStyleSheet.onLoad = function(success:Boolean) {
    if (success) {
//        trace("Styles loaded:");
    } else {
//        trace("Error loading CSS");
    }
};
myStyleSheet.load("styles.css");
txtFilmNews.html = true;
txtFilmNews.styleSheet = myStyleSheet;
txtFilmNews.width = 295;
txtFilmNews.autoSize = true;
txtFilmNews.selectable = false;

var lvFilmNews:LoadVars = new LoadVars();
lvFilmNews.onLoad = function(success) {
    if (success) {
        txtFilmNews.htmlText = lvFilmNews.html;
    } else {
        trace('load failure!');
    }
}
lvFilmNews.load('getHTML.php?q=filmNews');







Here is my stylesheet:

Code:

p {
color: #53301A;
font-size: 12px;
margin-bottom: 0px;
padding-bottom: 0px;
border:none;
}

.title {
font-size: 15px;
text-transform: uppercase;
color: #D06F1A;
font-weight:bold;
}

a {
color: #D06F1A;
font-weight:bold;
}
a:hover {
color: #53301A;
}

Is It Possible To Skew A Dynamic Text Field To Create A Text Percentage Preloader
Hi there.. is it possible to skew a dynamic text field? Im trying to create a preloader with a text percentage... and i want it skewed so that it looks like the font is italic a bit..?

thanks..

Resizing Dynamic Text Field & Maintaining Text Font Properties
I have created a dynamic text field and have specified the height and width in the property inspector. The font is set at Verdana, 12, multiline. After searching these forums I also clicked the Character button and set it to embed font outlines for all characters.

My problem is that when I try to type or paste text into the field it is stretched to fit the field dimensions. I just want to preserve the Verdana 12.

Any help is greatly appreciated.

Dynamic Text Field Loads Text, Font Not Showing Properly
I have a flash 8 movie in which there is a dynamic text field loading data from the server. The data loads beautifully and appears in a text field formatted as html.

This html-formatted text field uses a stylesheet as well which works great for everything except the font. Using Flash, I have specified a font of DIN-Medium for the dynamic text box on my stage and yet the text that appears when I publish to my hosting provider appears to be Times New Roman. WTF?

My stylesheet does not specify any font family.

Can anyone tell me how I might get the dynamic text box to show the text using the DIN font? Do I need to export the font in the library of my flash movie or something?









Attach Code

//Here's my actionscript:
stop();

import TextField.StyleSheet;
var myStyleSheet:StyleSheet = new StyleSheet();
myStyleSheet.onLoad = function(success:Boolean) {
if (success) {
// trace("Styles loaded:");
} else {
// trace("Error loading CSS");
}
};
myStyleSheet.load("styles.css");
txtFilmNews.html = true;
txtFilmNews.styleSheet = myStyleSheet;
txtFilmNews.width = 295;
txtFilmNews.autoSize = true;
txtFilmNews.selectable = false;

var lvFilmNews:LoadVars = new LoadVars();
lvFilmNews.onLoad = function(success) {
if (success) {
txtFilmNews.htmlText = lvFilmNews.html;
} else {
trace('load failure!');
}
}
lvFilmNews.load('getHTML.php?q=filmNews');

//Here is my stylesheet:
p {
color: #53301A;
font-size: 12px;
margin-bottom: 0px;
padding-bottom: 0px;
border:none;
}

.title {
font-size: 15px;
text-transform: uppercase;
color: #D06F1A;
font-weight:bold;
}

a {
color: #D06F1A;
font-weight:bold;
}
a:hover {
color: #53301A;
}

Help With Dynamic Text Field Being Populated From A Button On Same Stage Using Text Files...
I am using the following code:

var ImportsText = "Imports";
Imports.addEventListener(MouseEvent.CLICK,doClick);
function doClick(evt:MouseEvent):void {
List.text = ImportsText;
}

This will generate the word Imports on my List.text dynamic text field.

I have a list of 30 things that need to go in the place of the word imports, one each per line.

Is there a way for me to create a text file and load it instead?

So I have button1 which loads the text from the text file text1.txt and puts it in Last.text
and so button2 loads the text from the text file text2.txt and it is put in last.text

and so on.

Would like the text files to be able to have some formating that is translated to the Last.text


I am very new to AS3.0 so please bar with me. I think I am almost understanding what I need to do but I need a push in the right direction.


Thanks allot in advance.

Tamer Z

Dynamic Text Field: Swap Text With Diff Variable In Same Ext. File
I'm using the recommended


Code:
loadText = new LoadVars();
loadText.load(_global.text_url2);
loadText.onLoad = function(success) {
if(success){}

etc..
which is working well. I just want to attach an action to buttons which will switch the text for different variables in the same text file, in a single text box named archivetitle.

ie.

Code:
archivetitle.text = this.title1;
when button one is pressed



Code:
archivetitle.text = this.title2;
when button two is pressed.


Basically, how do i access an already loaded text object to refresh to a new variable? Thanks!

Dynamic Text Field: Swap Text With Diff Variable In Same Ext. File
I'm using the recommended


Code:
loadText = new LoadVars();
loadText.load(_global.text_url2);
loadText.onLoad = function(success) {
if(success){}

etc..
which is working well. I just want to attach an action to buttons which will switch the text for different variables in the same text file, in a single text box named archivetitle.

ie.

Code:
archivetitle.text = this.title1;
when button one is pressed



Code:
archivetitle.text = this.title2;
when button two is pressed.


Basically, how do i access an already loaded text object to refresh to a new variable? Thanks!

Select Text File From Dropdown List, Content To Show In Swf Dynamic Text Field
I have a php page where there is a form with a dropdown list of all text files in my site. The name of the dropdown is $filename.

The action script in my swf is this:
loadVariablesNum("<?PHP echo $filename; ?>", 0);

but I get nothing. It displays correctly when I replace
<?PHP echo $filename; ?> with the actual value of $filename, for example:
loadVariablesNum("ui_websites.txt", 0);

Any ideas what I'm doing wrong?

Loading External Text File Into Flash Using Links From Dynamic Text Field Link?
I am using a dynamic text field to load in .txt files with html tags. I have a couple "click here" type links that I would like to use to load a different .txt document into the same dynamic text field instead of a url link like it does default. Is this possible? I'm sure I could put a button over the text since its not long enough to need a scrollbar but I would like a more dynamic and flexible way to do this if its possible.

Thanks

Dynamic Length Of Dynamic Of Text Field?
is it possible to set the length of a dynamic text field so that the text flowed into it fits perfectly.
I need this so that I can get the _width of the movie clip it sits in.

help appreciated guys.

Making Dynamic Text Field Var, More Dynamic?
i want to do something for the var in a dynamic textfield like:
eval("_root.tfield" + _parent.this_num)

but its not working... is there any way to do something like this?

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