Dynamic Text - Text Possition
Hi There
I've used the tutorial on here 'Loading Text from External Sources', which works great. The problem I'm having is, that if you scroll the text in one external file, if you click on a button to go to another file the text starts off to where u last scrolled to, when I want it to start at the beginning. The code behind the buttons is as follows:
on (release) {
loadText = new loadVars();
loadText.load("TEXT2.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}
Does anyone know how I can do this???
Thanks x
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 02-18-2004, 12:52 PM
View Complete Forum Thread with Replies
Sponsored Links:
Dynamic Text - Text Possition
Hi There
I've used the tutorial on here 'Loading Text from External Sources', which works great. The problem I'm having is, that if you scroll the text in one external file, if you click on a button to go to another file the text starts off to where u last scrolled to, when I want it to start at the beginning. The code behind the buttons is as follows:
on (release) {
loadText = new loadVars();
loadText.load("TEXT2.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}
Does anyone know how I can do this???
Thanks x
View Replies !
View Related
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
View Replies !
View Related
Trasfering Text From One Dynamic Text Box To A Input Text Box On A Differnt Page?
Ok so I have a text box set up which receives the date on a callendar which you click on. On another page (a seperate html file) I have an input text box for receiveing this text.
I've been trying to do this using various methods using getURL, but, I can't get it to work. This is becoming tedious especially as I'm not able to test it without having to reupload the files.
If someone could please inform me on how I should do this I'd be vary greatful.
If you need any further information I'll reply as soon as possible.
View Replies !
View Related
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!
View Replies !
View Related
Dynamic Text Box / Xml Content - Text Is Too Close To Border Of Text Box
Hi,
If you take a look at my flash movie you will see that I have draggable movie clips, which contain dynamic text fields. These text fields contain text drawn in from a simple xml document.
The problem I have is that the text in the text fields is hedged right next to the border of the autosized text box. This makes them look untidy and in the worst case difficult to read. I wonder how I can add some margin to the left and right of the text to fill in some space.
http://www.nottingham.ac.uk/home/ccz...AndDrop3.1.swf
http://www.nottingham.ac.uk/home/ccz...AndDrop3.1.fla
(you also need the xml doc at : http://www.nottingham.ac.uk/home/ccz...scriptions.xml )
The code which formats the text boxes is:
with (main["dragAct"+i].dragActText) {
text = actText[i+1];
background = true;
backgroundColor = "0xe2e2e2";
setTextFormat(myFormat);
autoSize = "center";
border = true;
borderColor = "0x666699";
}
my text formatting looks like this, and you can see that I have tried to use leftMargin / rightMargin but these properties don't seem to work:
var myFormat:TextFormat = new TextFormat("Tahoma", 12);
myFormat.leftMargin = 20;
myFormat.rightMargin = 20;
myFormat.bold = true;
Any suggestions most welcome.
Thanks
View Replies !
View Related
Getting A Dynamic Text Box's Text From HTML-formatted Text?
Hey! You recognize me yet? I've got (hopefully) one last question for a while. Could somebody please tell me how do to get the text value of a text box with text that's formatted as HTML? ( it was formatted similar to "textBox.htmlText = "...";")
I tried "myVariable = textBox.htmlText", but it just gave me the formatting garbage it's using (<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT>) without the actual text that my users see. I also tried "myVariable = textBox.text;", but it returned a blank variable.
Many thanks, me Flash bruthas
Furry
View Replies !
View Related
How To Add Text To Dynamic Text Field Where Text Cursor Is. Please Help
Hello,
How do you, if possible, can add text to a dynamic text field on where the text cursor.
Example:
| = text cursor
by pressing a button I want to add "How are you?" where the cursor is
____________________________________________
Hello
|
Bye
____________________________________________
Results:
____________________________________________
Hello
How are you?|
Bye
____________________________________________
Please Help!
Thank you in advance!
View Replies !
View Related
Jumping To Areas Of Dynamic Text, Printing Dynamic Text
hello,
I have a movie clip that loads a .txt file into a dynamic text field. Due to the amount of content in the file a scroller bar is needed in order to view all of it. I want to create buttons that jump to different areas of the dynamic text for easier navigation so the user can go directly to various sections instead of having to use the scroller all the time. What kind of coding would I need to put on the buttons and within the .txt file at the areas I want to jump to?
Also, I would like to give the user the option to print everything within the dynamic text field only, not the surrounding elements in my movie clip. Is that possible?
thanks!
View Replies !
View Related
Dynamic Text Not Loading On Server . . . Other Dynamic Text Issues
ok - here's the url
http://www.rongilcreast.com/Test_Site/main.html
when I 'test movie' in Flash, the text comes in. But not now that it's online . . .
2nd problem. I want to add a scrollbar to the textbox, but when I drag the scrollbar onto the textbox, it doesn't snap-to the text box and resize itself.
all the files are here:
http://www.rongilcreast.com/Test_Site/main.fla
http://www.rongilcreast.com/Test_Site/main.swf
http://www.rongilcreast.com/Test_Site/Index.txt
whatamIdoin'wrong?
tia . . .
View Replies !
View Related
[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
View Replies !
View Related
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
View Replies !
View Related
Dynamic Text Box Jumping To A Section Of Text File Based On Date Stamp
I am VERY new to Flash MX (version 6) and need some help.
I want to build a text file with different messages that are listed/identified by a date stamp, and then have a flash program to display these messages based on whatever the current date is.
Is this possible? How do I build the text file? Do I need separate text files for each message? What ActionScript code do I use to identify the current date, and then display the appropriate message with the current date.
Any help, tutorial or guidance is appreciated. Thanks!
View Replies !
View Related
Dynamic Text From MySQL Problem. Multiline + HTML-rendered Text Wanted...
Hi.
I'm in the process of writing a guestbook using Flash, PHP and a MySQL database. A large part of the Flash-code, is fully functional, but there is one strange problem.
The text i'm echo'ing from the PHP document into Flash, doesnt wrap correctly in my textfield. I've set the textfield to multiline and I've pressed the "Render as HTML"-tab. But the text is displayed with HTML-tags and stays on one line.
This is how it looks: http://www.riminalitet.org/guestbook.swf The buttons below the field are "Next"- and "Back"-buttons for the submissions...(It's danish )
I've experienced that it works if I use
instead of <br> in my HTML-formatted code. But I'd like to use <b>BOLD</b> as well. And if I urlencode my output-code from PHP, nothing changes. Still one line with HTML-tags...
The textfield is embedded in a scrollPane. I'm targeting this field in my LoadVars function. Can this has something to do with the problem?
Should I use the ScrollBar component in stead of the scrollPane to retrieve dynamic text? (This would be a little bugging, since my goal is to display the text nicely with some graphics around it).
Hope some of you guys can help me with this. Bye now...
View Replies !
View Related
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
View Replies !
View Related
2 Problems: 1. EmbedFonts Makes Text Disappear, 2. Dynamic Text Vertical Position
I have the following code:
--------------------------------------------------------------------------------
this.createTextField ("imageText",2,95,0,390,96);
imageText.multiline = true;
imageText.wordWrap = true;
imageText.autoSize = true;
//imageText.embedFonts = true;
imageText.html = true;
imageText.htmlText = text; // variable loaded earlier in script....
imageText.selectable = true;
imageTextFormat = new TextFormat();
imageTextFormat.color = 0xCA9E1D;
imageTextFormat.size = 16;
imageTextFormat.font = "Sabon RomanSC";
imageText.setTextFormat(imageTextFormat);
//imageText.embedFonts = true;
trace(imageText.text);
--------------------------------------------------------------------------------
The problem:
If I uncomment either of the imageText.embedFonts lines, my text will disappear... but the trace(imageText.text); will still return the correct contents. It's as though embedFonts causes the textField to disappear.
Possibly related, (but maybe not), is the fact that the vertical positioning of the font is off. Even though I create the textField at Y = 0, the text writes somewhere around Y = 10. I suspect this is something else, but I thought I'd add it just in case.
Any help with either (or both) problems would be fabulous. Thanks,
Drew
View Replies !
View Related
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.
View Replies !
View Related
Dynamic Text Box Doesn't Update From External Text/html File
here is my code for a dynamic text box which is reading html from an external text file...problem is the text shows, but when I update it, it doesn't change...unless I empty the cache...I even tried some other suggestions on here such as adding a random # to the end of the file:
ran = math.round(math.random()*1000+1);
LoadVariables("./home.txt?ran="+ran,"")
If(home ne "")
here is a link to the fla file if you want to look at the whole thing:
http://mcc.larrychendesign.com/resou...ntitledmcc.zip
View Replies !
View Related
Dynamic Text Box Doesn't Update From External Text/html File
here is my code for a dynamic text box which is reading html from an external text file...problem is the text shows, but when I update it, it doesn't change...unless I empty the cache...I even tried some other suggestions on here such as adding a random # to the end of the file:
ran = math.round(math.random()*1000+1);
LoadVariables("./home.txt?ran="+ran,"")
If(home ne "")
here is a link to the fla file if you want to look at the whole thing:
http://mcc.larrychendesign.com/resou...ntitledmcc.zip
View Replies !
View Related
Embed Jpeg In Dynamic Text Using External Text File Html
so I have a website and I am using dynamic html enabled multi-line wrap text boxes and am sourcing the context to fill the dynamic text boxes via text files which contain html...
here are links to my .fla file and .txt file....
http://mcc.larrychendesign.com/untitledmcc.fla
http://mcc.larrychendesign.com/home.txt
I am using flash mx 2004 pro and am exporting/publishing in flash player 7 and actionscript 2.0...
I can't seem to get jpeg's to load, but I can get all the other supported html tags to work...I am using the <img src='untitled.jpeg'> but no image....they are NOT progressive jpegs...but they won't load...why not? I thought embedding non-progressive jpeg images are allowed in flash if publishing in flash player 7 and above and authoring in flash mx 2004 or above...what gives?
any help would be greatly appreciated! and I did stipulate the width and height to try that as well, but it didn't work...this did work back in the day, but I don't remember what I did...
View Replies !
View Related
Embed Jpeg In Dynamic Text Using External Text File Html
so I have a website and I am using dynamic html enabled multi-line wrap text boxes and am sourcing the context to fill the dynamic text boxes via text files which contain html...
here are links to my .fla file and .txt file....
http://mcc.larrychendesign.com/untitledmcc.fla
http://mcc.larrychendesign.com/home.txt
I am using flash mx 2004 pro and am exporting/publishing in flash player 7 and actionscript 2.0...
I can't seem to get jpeg's to load, but I can get all the other supported html tags to work...I am using the <img src='untitled.jpeg'> but no image....they are NOT progressive jpegs...but they won't load...why not? I thought embedding non-progressive jpeg images are allowed in flash if publishing in flash player 7 and above and authoring in flash mx 2004 or above...what gives?
any help would be greatly appreciated! and I did stipulate the width and height to try that as well, but it didn't work...this did work back in the day, but I don't remember what I did...
View Replies !
View Related
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?
View Replies !
View Related
[F8] Dynamic Text Controlled Diff From Static Text? (alpha Question)
hi! i'm trying to fade in a movieclip with text but am running into some problems. the movieclip contains 4 dynamic text boxes which will serve as buttons and 1 static text with a title. however, the tween function is currently only fading in the static text and not the dynamic text boxes.
the main part that i'm talking about starts from "function scaleUp()" and down, but i posted what i have so far for context. with the posted code, the static text will fade in with the tween, but the dynamic text just plops there.
thanks for your help OH, and if you would also like to help, i want to have the 4 dynamic texts fade in one after another; i'm not sure whether or not to use an array or for script....and either way, i'm not really sure how to script that, so if you could help me with that too, that'd be awesome. thanks!
PHP Code:
// place background at 0% alpha
var fadeIn:MovieClip = _root.attachMovie("bg", "bg_mc", 0);
bg_mc._alpha = 0;
// import flash tweens
import mx.transitions.Tween;
import mx.transitions.easing.*;
// on enterframe, tween alpha to 100% and on complete, start centerline function
fadeIn.onEnterFrame = function() {
var bgFadeIn:Tween = new Tween(bg_mc, "_alpha", Strong.easeOut, 0, 100, 2, true);
setTimeout (centerLine, 750)
delete this.onEnterFrame;
};
// places center line (invisible)
function centerLine() {
var introLine:MovieClip = _root.attachMovie("line", "line_mc", 1);
line_mc._x = 450;
line_mc._y = 300;
line_mc._visible = false;
lineTween();
}
// makes line visible and tween out (changing _width)
// on complete, begins scaleUp function
function lineTween() {
line_mc._visible = true;
line_mc._alpha = 50;
var tween:Tween = new Tween(line_mc, "_width", Strong.easeOut, 0, 901, .75, true);
tween.onMotionFinished = function() {
scaleUp();
}
}
// changes _height of rectangle to make box and start fadeText function
function scaleUp() {
var upTween:Tween = new Tween(line_mc, "_height", Strong.easeOut, 1, 200, 1.2, true);
upTween.onMotionFinished = function() {
var placeText:MovieClip = _root.attachMovie("text", "text_mc", 2);
text_mc._x = 0;
text_mc._y = 200;
text_mc._alpha = 0;
text_mc.text0.text = "about";
text_mc.text1.text = "portfolio";
text_mc.text2.text = "photos";
text_mc.text3.text = "contact";
fadeText();
}
}
function fadeText() {
var textTween:Tween = new Tween(text_mc, "_alpha", Strong.easeOut, 0, 100, 3, true);
}
View Replies !
View Related
[F8] Displaying HTML Entities In Dynamic Text From External Text Files
I'm pulling content for a dynamic HTML formatted text box from a series of client-editable text files using LoadVars.
Flash 8 allows for the use of HTML entites in HTML text, and my client's text includes copyright and trademark symbols.
If I load some HTML text from within a script, the text box displays entities fine (like &174 to display a ® trademark symbol).
However, when using LoadVars to load the text from an external text file, I can't use ampersands in the text file, because the LoadVars interprets them as indicating the start of another variable.
I tried using Unicode, for example u00ae. Again, this works fine when the text is drawn from within a script, but when the loadVars displays it from the text file, it just displays the Unicode as a literal string. Other HTML formatting in the text files, such as bold or italic, displays fine.
Does anyone know a workaround for this (short of converting all 80 of my text files to XML)?
View Replies !
View Related
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;
}
View Replies !
View Related
Embed Jpeg In Dynamic Text Using External Text File Html
so I have a website and I am using dynamic html enabled multi-line wrap text boxes and am sourcing the context to fill the dynamic text boxes via text files which contain html...
here are links to my .fla file and .txt file....
http://mcc.larrychendesign.com/untitledmcc.fla
http://mcc.larrychendesign.com/home.txt
I am using flash mx 2004 pro and am exporting/publishing in flash player 7 and actionscript 2.0...
I can't seem to get jpeg's to load, but I can get all the other supported html tags to work...I am using the <img src='untitled.jpeg'> but no image....they are NOT progressive jpegs...but they won't load...why not? I thought embedding non-progressive jpeg images are allowed in flash if publishing in flash player 7 and above and authoring in flash mx 2004 or above...what gives?
any help would be greatly appreciated! and I did stipulate the width and height to try that as well, but it didn't work...this did work back in the day, but I don't remember what I did...
View Replies !
View Related
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.
View Replies !
View Related
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;
}
View Replies !
View Related
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
View Replies !
View Related
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!
View Replies !
View Related
[flash8] Trouble Highlighting Specific Areas Of Text In A Dynamic Text Box
Hi all, I'm currently trying to work out a method to highlight specific areas of text within a dynamic text field at runtime.
The method I've been toying with so far has been the use of CSS highlighting, but have not seemed to have any luck thusfar. What I'm attempting to do is to illustrate, to students, sections within a passage of text pertaining to correct methods of source referencing (source in terms of bibilographical references), and so am essentially trying to change the background colour of sections of text specified at runtime.
Here's some code I've thrown together to test the CSS theory:
PHP Code:
var highlightstyle = 'span.highlight { background-color:yellow }';var txt = '<p><span class="highlight">highlighted text</span> non highlighted text<span class="highlight"> more highlighted text</span></p>';txtbox.html = true;txtbox.styleSheet = highlightstyle;txtbox.htmlText = txt;
however it don't work...and here I was thinking this would be a fairly easy affair
Any ideas?
View Replies !
View Related
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!
View Replies !
View Related
How To Add Text To A Dynamic Text Feidl In A Movie Clip Added Through Actionscript?
ok I've never been able to get this to work so I've always just found a way around it. But I really need to get this to work in this project.
I need to get dynamic text to change in a movie clip Where you are adding the movie clip through actionscript (its not on the stage, you are adding to trhough createEmptyMovieClip). I can change dnamic text in a movieclip that is already onthe stage and thats usually how I get around this, but I really need to add it through createEmptyMovieClip this time.
The follow doesn't seem to work and I've searched everywhere all they all say this is how you do it but I can't get it to work...
///////////////////////////////////////////////////////////
//create an Empty movie clip
var CountLayer:MovieClip = home.createEmptyMovieClip('CountLayer', 5);
//add the movie clip to the empty movie clip just created
CountLayer.attachMovie('ScoreCount_mc', 'ScoreCount_mc', 0, {_x:400, _y:400});
//test variable
var test:Number;
test = 0;
//Add text to the dynamic text in the movie clip
ScoreCount_mc.Score_txt.text = test.toString();
////////////////////////////////////////////////////////////////////
The above never seems to add anything to the dynamic text feild. So if anyone know whats going on here or the right way to do it please help.
Thanks.
View Replies !
View Related
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?
View Replies !
View Related
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
View Replies !
View Related
Asfunction - How To Load Dynamic Text With Dynamic Text? [F8]
Hello dear helpers !!!
I'm trying to get external, dynamically loaded text to load different text files into a text box. I've figured out that I need asfunction to do it through calling a function in the movie and passing it variables, although i haven't been able to write this function at all... would anyone mind giving me a hand???
thanks sooo much!!
p.s. I've managed to get this working by creating a toggle function, so at the moment I have 25 text boxes and a show/ hide function, but that's very buggy.
View Replies !
View Related
Resising A Dynamic Text Field Depending On The Amount Of Text...
Hi all...
I have a flash movie reading a xml file...
i m getting a list of questions and their respective answers...i d like to load those answers into a Mc that contains a dynamic text field ...
the question is:
how can i "resize" (add lines) my dynamic text field depending on the amout of text - i tried getting maxscroll and resizing but that only makes it bigger and doesnt add any additional lines like i d like it to...
thanx 4 ur help
View Replies !
View Related
URGENT Positioning Dynamic Text In Text Scrolling Window
Help!
I have a dynamic, scrolling text field, whose scroll is based on one of the tutorials on Flashkit. In the text I have some links which switch the content of the field via asfunction, but that's unimportant. I wanted to add a functionality similar to html "anchor", so when I switch the contents of the field (for example to read a CV of someone mentioned in the text), and remember windowTxt.scroll and windowTxt.maxscroll properties (where windowTxt is the variable name of the text field, after I finish reading the CV I click the special "back" button, and it loads the old text back and tries to set the windowTxt.scroll & windowTxt.maxscroll back to the state they were before entering the CV. I tried to do it like this:
Code:
_root.windowTxt.scroll = _root.pscroll; // pscroll => previous scroll
_root.windowTxt.maxscroll = _root.pmaxscroll; // previous max scroll
IT DOESN'T WORK! The variables ARE there in the path because trace shows the proper values for all of them, but! The scroll property won't even bother setting itself to the desired value... and the scroll using buttons and the syntax
_root.windowTxt.scroll--;
or
_root.windowTxt.scroll++;
WORKS...
Oh by the way - this is for the projector...
To sum it up - I need to push the dynamic text to a certain value after it's loaded - how to do that? I've no time for experimenting... I've deadline in a few hours and this is the last feature I've to implement, after that it's source merging with a source from a friend's work and betatesting... If I won't make it - I'm screwed. HEEEEEEEEEELP!!! THANKS IN ADVANCE...
View Replies !
View Related
Loss Of Text Formatting When Using Dynamic Text Field & Scroller
Hi all,
Using MX...
Another small problemo im having is when i format text in my dynamic text field and attch the scroller component to it, in preview mode i lose all the text format and it goes to the first text format it encounters and uses that for everything else in the dynamic text box.
Im not actually loading any text into the dynamic text box, im just using it with static text, so i can use the scroller component.(as i understand it, you can only attach the scroller component to a dynamic text box ??)
Why am i losing my text format AND is there a better way to have a scrolling text field when i just want to use static text...???
Thanks guys..hope thats not too confusing
Cheers
View Replies !
View Related
How Can I Use Foreign Language Text On LoadVariables Into Dynamic Text Box Script?
I'm currently using a loadVariables script to load an external text file into a dynamic text box. and I'm trying to use both English and Japanese for this file. But though I set the font for the dynamic text box with fonts such as "Osaka", when I input japanese into the text file, the fonts do not show correctly when the text file is loaded in as a variale. I cannot comprehend why this is, 'cause I used to use the same technique with Flash 5 (English version) on OS 9.2 (English version with Japanese input system KOTOERI installed)
I started having problems when I started using OS X (I'm currently using v10.2.1 English Version) and Flash MX (also English version).
Can anyone help me as to why this is occuring, and how I may be able to solve this problem? Thank you!!
Tetsu
(http://home.earthlink.net/~tetsu928/ENTRANCE.html)
View Replies !
View Related
Dynamic HTML Text Fields Do Not Display Formatted Text?
Flashkit.com,
In Flash MX I am developing a lot of movies using dynamically populated html text fields. When the user does not have a font I used on their machine swapping happens on all dynamic and input fields. Only static fields display the corrent font. I make sure the text field properties are embedding the fonts. Still all of the dynamic html text fields do not display the formatted text. I have .fla samples I can email to anyone.
I have tried these macromedia solutions with NO success:
http://www.macromedia.com/support/fl...t_outlines.htm
http://www.macromedia.com/support/fl...namic_text.htm
http://www.macromedia.com/support/fl...haredfonts.htm
Does anyone have a working sample .fla they can send me?
-Jimmy
View Replies !
View Related
|