Loading Text
flash mx
how can i load a text file into a flash movie???
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-24-2003, 09:47 AM
View Complete Forum Thread with Replies
Sponsored Links:
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
View Replies !
View Related
Help Problems Loading External Text And Loading The Movie Into The Explorer
Hola a todos!
I have some troubles with my movies. I'll explain.
(Sorry for my poor English - I'm Spanish!)
I'm developing a website for a Real State Agency in Spain. My idea is make it enterely with Flash, but It's the first time I face Flash. I've found in the tutorials of kirupa.com the greatest help! But, still that, I need more help!
My first problem comes when loading the .swf into the explorer. I made a simple .html file that calls the .swf file to be loaded. The explorer says it's loaded, but I have to press the "Reload" button to see the movie. Can you say me why?!!!!
My second problem... well. I'll need a few minuts to explain it!
I have created a main scene. Inside the main scene I load the movies of the different sections of the site. This new movies loaded onto the main movie contain texts from external .txt files. There's no problem with the texts that are just a few words, as in the section "Acerca de". But when I need a bar to show the whole text I find that the bar doesn't work in the first time that the movie is loaded, and you have to click again in the section to access the whole text, I mean, to make the bar work. Have I explain myself?
Well. I think you should visit the site to see my problems.
Is this: http://www.wk-inmobiliaria.com/FLASH
This website is, of course, incomplete. I'm still working on it.
Could someone help me????
---- Help me Obi Wan: You're my only hope!!!!
Thanks a Lot.
Raul.
View Replies !
View Related
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
View Replies !
View Related
Dynamic Loading Text File Not Loading Correctly
I am loading info from a text file (noticeBoard.txt) using the following code;
sourceTXT = "noticeBoard/noticeBoard.txt";
nodeSource = new LoadVars();
nodeSource.onload = gotoAndStop(printText);
nodeSource.load(sourceTXT);
Then writing it into a textfield when the timeline moves to the 'printText' frame.
The swf is working when I load my html page (notice.htm), with all my values being displayed. If I then navigate away from this page to one where I write more info to the text file and then return to notice.htm the latest info in the text file does not show in my swf. Even if I refresh the html page the new info does not appear until I shut my browser window then reopen it.
Does anyone have any suggestions to why this info is not coming in on the fly?
Thanks
View Replies !
View Related
Loading Ext. Text Into Scrolling Text Box. Problem With Text? Help Please?
Hi,
I am hoping someone can help me. I am loading an external text file into a scrolling text box. I was able to get my box and buttons, scroll bar, etc to work correctly. However, I am having two other problems that I cannot figure out.
1) My text file that I am loading is several lines long (320 or so), however, when I test my movie only the first 20 lines of the text shows up. How can I make all of my text show up? I will be adding to this text file over time and adding updates to it. So the text will gradually have more lines added over time.
2) The 20 lines of text that is showing up is all double-spaced, while the text in my text file is single spaced. How do I make my text show up single spaced? I checked the paragraph settings of my text box and everything is set to zero. What can I do fix this?
I am using Flash 5.0 and I created my text in Metapad.
Thanks in advance to anyone who can help me out.
View Replies !
View Related
Loading Pictures From A File Like Loading Text..how To Do It?
I don't know if this is possible...but I'll ask it anyway.
I know how to load text into a flash movie from a text file, (the load variables function), but is it possible to load an external picture file, like a jpg or a gif in the same way without using the flash program?
If it's possible, can someone please tell me how it is done?
Thanks,
JRL
http://www.xtranix.com
View Replies !
View Related
Dynamically Loading MP3 ... Loading Details In Text Box ...
Hi, I am loading an MP3 dynamically in Flash ... but am having problems get'n the bytesLoaded to show in my text box. I've tried changing it round heaps ... pullin apart others ... what's the trick?
I'm an intermediate user and have double checked all the basic's ...
What am I missing?
wanna see me coding? Here:
Code:
mySounda = new Sound();
mySounda.loadSound("Track2.mp3",false);
loadBytes = Math.round(mySounda.getBytesLoaded()/ 1024);
loadTotal = Math.round(mySounda.getBytesTotal()/ 1024);
percent = Math.round((loadBytes / loadTotal)* 100);
textd = percent + "% Loaded";
mySounda.onLoad = function(success){
mySounda.start(0,1);
textd = mySounda.id3.TIT2;
playing=true;
}
And all I get in the text box is: "100% Loaded"
Even when I do a streaming view.
Anyone?
View Replies !
View Related
Loading A Html-tagged Text File Into A Text Field...it's Just Not Working For Me...
hi,
i'm trying to load news.txt into a textfield using loadvars.
news.txt:
-----------------------------------
&news=<p font face="Verdana" size="12"><b>Recent Achievements:</b><br>Congratula etc. etc.
the as:
----------------------------------
loadnews = new LoadVars();
loadnews.load("flash/news.txt");
loadnews.onLoad = function(success) {
newstext = loadnews.news;
trace(newstext);
gotoAndStop(2);
}
the trace is showing that newstext is the text out of news.txt ... in the frame 2 that the onLoad function refers to is a textfield (multiline, with the html as true) which is supposed to display the newstext variable.
If i set newstext to something else ... eg: newstext = "some text" then it works fine ...
what's going on???
Cheers,
Ben
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
Loading External Text File Into Text Area (flashMX)
Hi,
I am trying to load text from an external text file into a textarea in FlashMX. I am able to set the contents of the textarea by using a string ("test thingy"), but I was wondering if anybody could point me in the right direction on hoe to include text from an external file.
Used to set string:
scroller.text="test thingy";
Thanks a bunch,
Niklas Wahlberg
View Replies !
View Related
Loading HTML/Text From External Simple Text File…
To all the Flash Gurus:
Basically how do you do the above? I've gotten very small snipets of text to load from an external text file, but there was probably at maximum 50 characters. This is even after a long load time and a very fast connection (T1/off of the HD).
I'm trying to get this to work so that I don't have to update the flash files to update the text - or rather so that someone else can update them w/o me acting as a middle man except for special occasions. The best example, I think, of what I'm trying to do is www.spartamusic.com
Thanks-
Davin
View Replies !
View Related
Problem With Loading External Text Into Text Ticker In Flash
hello everyone ...
So i've created a text ticker that loads text from an external text file ... when i test it as a scene it works fine ( it's embedded onto a movie symbol ) -but when i go to the main stage and place a copy of that movie onto the main stage and run the test of the main stage the thing does not work - loos like it gets stuck somewhere in toe first few frames of the ticker for some reason and does not show the text ... any ideas ?
I've tried placing the text file online and reffer to it as a http link , still same problem ...
thank u
s.
View Replies !
View Related
Loading Text Into Dynamic Text Field With Full Justify - Can It Be Done
Hi!
Trying to load in text into a dynamic text field that is html formatted and "full" justify the text.
Cant seem to full justfiy the text.
"full justify": spreads text out to fill up a whole line by automatically setting the spacing between words.
1)
I have tried using html formatting to align the text: <p align="justify"></p>
justify isnt accepted by flash
2)
set the text field in flash to full justify
works fine if text inputted into the dynamic text field before compiling
But if text is loaded in, then the formatting is lost.
Anyone got any ideas how to do this?
I'm thinking of using php's GD lib to create a jpg using text retrieved from a database with the text fully formatted in the jpg image and loading in the jpg image, but then I lose my html formatting.
any other solutions? or have I overlooked something here?
cheers
xiang
View Replies !
View Related
Loading Text From A Database Into A Text File Inside A Movieclip
Okay. I have a movie clip with two frames. Inside frame 1 is a text box named "home_copy". The mc in which this textbox resides is given an instance name of "copy". Frame 2 has a different text box (we'll worry about this after solving probelm 1.)
So I'm using loadVariables so that the site is compatible with old browsers.
The PHP file I'm grabbing has this at the end:
Code:
&home_copy=Welcome to EROS. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. etc.
So how do I get my php source code to go into the text box, "home_copy", which is embedded into a movieclip, named "copy".
thanks
View Replies !
View Related
If(percentage.text => '0%'){ LoadText.text = 'Loading Juicy Overflows';
I would like my preloader to load various phrases using loadText.text =''; based on the percentage loaded...
The phrases should be locked to the percentage of loading. For example:
0-24% "loading frogs"
25-49% "loading paddles"
50-74% "loading trucks"
75-99% "loading good times"
100% "complete"
My code is below:
I was trying to use something like this...
Code:
if(percentage.text => '0%'){
loadText.text = 'Loading Juicy Overflows';
existing code:
Code:
stop();
//
//file to be loaded:
var loadFile:String = "flash/flav_o_rama.swf";
//list of MCs on the stage and order they should be tweened in:
var blend_sound:Sound = new Sound(this);
blend_sound.attachSound("blend");
var slot_sound:Sound = new Sound(this);
slot_sound.attachSound("slot");
var mcList:Array = new Array('blender', 'plusSign', 'slotMachine');
//
import mx.transitions.Tween;
import mx.transitions.easing.*;
//
var isloaded:Boolean = false;
var animationDone:Boolean = false;
var listCount:Number = 0;
var text:Number = 0;
percentage.text = '0%';
//
//hide stuff for later fade in:
for (var i:Number = 0; i<mcList.length; i++) {
this[mcList[i]]._alpha = 0;
}
//loadText
if(percentage.text => '0%'){
loadText.text = 'Loading Juicy Overflows';
} else if(percentage.text => '25%'){
loadText.text = 'Loading Luck';
}
//
tweenIn();
function tweenIn():Void {
if(mcList[listCount] == 'blender'){
//loadText.text = 'Loading Juicy Overflows';
blend_sound.start();
} else if(mcList[listCount] == 'slotMachine'){
//loadText.text = 'Loading Luck';
slot_sound.start();
}
this[mcList[listCount]]._alpha = 100;
new Tween(this[mcList[listCount]], '_xscale', Bounce.easeOut, 0, 100, 12, false);
var twn:Tween = new Tween(this[mcList[listCount]], '_yscale', Bounce.easeOut, 0, 100, 12, false);
twn.onMotionFinished = function():Void {
listCount++;
if (mcList[listCount]) {
tweenIn();
} else {
animationDone = true;
}
};
}
//
this.onEnterFrame = function():Void {
if (isloaded && animationDone) {
for (var i:Number = 0; i<mcList.length; i++) {
this[mcList[i]]._alpha -= 8;
}
percentage._alpha = loadText._alpha -= 8;
if (percentage._alpha<0) {
loadContainer.play();
for (var i:Number = 0; i<mcList.length; i++) {
this[mcList[i]].swapDepths(this.getNextHighestDepth());
this[mcList[i]].removeMovieClip();
}
delete this.onEnterFrame;
}
}
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//LOADING OF MOVIE:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//we'll load the movie into "loadloadContainer":
this.createEmptyMovieClip('loadContainer', this.getNextHighestDepth());
var loadListener:Object = new Object();
loadListener.onLoadComplete = function() {
//trace("onLoadComplete called");
};
loadListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number):Void {
percentage.text = Math.round(100*(loadedBytes/totalBytes))+"%";
};
loadListener.onLoadInit = function(target:MovieClip) {
percentage.text = '100%';
loadText.text = 'Loading Complete';
isloaded = true;
//trace("finished download");
};
var movLoader:MovieClipLoader = new MovieClipLoader();
movLoader.loadClip(loadFile, loadContainer);
movLoader.addListener(loadListener);
View Replies !
View Related
Loading Text Files With Hyperlinks Into Dynamic Text Field
I am using Flash 8 and loading external text files in dynamic text fields on my webage. These texts contain html links (<a href="page.html" target="_blank">Click Here</a> and I have "render as HTML" on and "selectable" off in my dynamic text field. Also, I am loading a CSS file. Not only do I not have a hand cursor, but I do not even have any of the text from that piece of html code down. What is going on with this? Please respond asap, as I have been struggling with this for a day now. Here is the Actionscript for loading the CSS:
var flash_css = new TextField.StyleSheet();
flash_css.load("styles.css");
flash_css.onLoad = function(success:Boolean) {
if (success) {
zloc_txt.styleSheet = flash_css;
} else {
trace("Error loading CSS file.");
}
};
var zloc_lv:LoadVars = new LoadVars();
zloc_lv.load("zloc.txt");
zloc_lv.onLoad = function(success:Boolean) {
if (success) {
zloc_txt.text = this.content;
} else {
trace("unable to load text file.");
}
};
zloc_txt.html = true;
zloc_txt.editable = false;
_global.styles.TextArea.setStyle("backgroundColor" , "transparent");
_global.styles.TextArea.setStyle("border styles" , "solid");
Here is a sample of the text file code:
&content=<span class="headline">Northwest Arkansas Locations</span>
121 Main St.
Russellville, AK 77801
(626) 111-1111<br />
<html><a href="
View Replies !
View Related
Loading Text Files With Hyperlinks Into Dynamic Text Field
Describes the mood or content of the topic posted 11-22-06 04:41 PM
I am using Flash 8 and loading external text files in dynamic text fields on my webage. These texts contain html links (<a href="page.html" target="_blank">Click Here</a> and I have "render as HTML" on and "selectable" off in my dynamic text field. Also, I am loading a CSS file. Not only do I not have a hand cursor, but I do not even have any of the text from that piece of html code down. What is going on with this? Please respond asap, as I have been struggling with this for a day now. Here is the Actionscript for loading the CSS:
var flash_css = new TextField.StyleSheet();
flash_css.load("styles.css");
flash_css.onLoad = function(success:Boolean) {
if (success) {
zloc_txt.styleSheet = flash_css;
} else {
trace("Error loading CSS file.");
}
};
var zloc_lv:LoadVars = new LoadVars();
zloc_lv.load("zloc.txt");
zloc_lv.onLoad = function(success:Boolean) {
if (success) {
zloc_txt.text = this.content;
} else {
trace("unable to load text file.");
}
};
zloc_txt.html = true;
zloc_txt.editable = false;
_global.styles.TextArea.setStyle("backgroundColor" , "transparent");
_global.styles.TextArea.setStyle("border styles" , "solid");
Here is a sample of the text file code:
&content=<span class="headline">Northwest Arkansas Locations</span>
121 Main St.
Russellville, AK 77801
(626) 111-1111<br />
<html><a href="
View Replies !
View Related
Loading Text Files With Hyperlinks Into Dynamic Text Field
Describes the mood or content of the topic posted 11-22-06 04:41 PM
I am using Flash 8 and loading external text files in dynamic text fields on my webage. These texts contain html links (<a href="page.html" target="_blank">Click Here</a> and I have "render as HTML" on and "selectable" off in my dynamic text field. Also, I am loading a CSS file. Not only do I not have a hand cursor, but I do not even have any of the text from that piece of html code down. What is going on with this? Please respond asap, as I have been struggling with this for a day now. Here is the Actionscript for loading the CSS:
var flash_css = new TextField.StyleSheet();
flash_css.load("styles.css");
flash_css.onLoad = function(success:Boolean) {
if (success) {
zloc_txt.styleSheet = flash_css;
} else {
trace("Error loading CSS file.");
}
};
var zloc_lv:LoadVars = new LoadVars();
zloc_lv.load("zloc.txt");
zloc_lv.onLoad = function(success:Boolean) {
if (success) {
zloc_txt.text = this.content;
} else {
trace("unable to load text file.");
}
};
zloc_txt.html = true;
zloc_txt.editable = false;
_global.styles.TextArea.setStyle("backgroundColor" , "transparent");
_global.styles.TextArea.setStyle("border styles" , "solid");
Here is a sample of the text file code:
&content=<span class="headline">Northwest Arkansas Locations</span>
121 Main St.
Russellville, AK 77801
(626) 111-1111<br />
<html><a href="
View Replies !
View Related
Dynamic Text - Loading Additional Lines Within Text Block
Hi. I'm trying to write an actionscript that will load additional lines within a dynamic text block (i.e. new text that loads below text that already sits within the text block). Here is where I am so far (a script from a kirupa tutorial):
::::::::::
on (release) {
loadText = new loadVars();
loadText.load("sp_001.txt");
loadText.onLoad = function(doit) {
if (doit) {
textBox.html = true;
textBox.htmlText = this.spText add existing;
}
};
}
::::::::::::::
Logically, I know what to do but am lacking the skills to script it. It seems I need to define how long I want the list and then if/else. Any help is appreciated. Thanks.
View Replies !
View Related
Loading Text Into Mulitple Fields From A Single Text File
Hi there. I am trying, and failing(so no soucre) to make text load dynamically into multiple fields.
I am trying essentially to load text using only one text document- into several fields. This is so I can run a very primitive cms system in flash. (all the fields need to call different portions of the text.
If anyone understands what I mean and how it could be done, it would be great
View Replies !
View Related
Problem Loading Text Into Rotated Dynamic Text Field
Hi there
With help from Stratification, I've sorted out my previous problem, but alas it grew into a more insidious and tedious mire. Especially, I am sure, for people who know what theyre doing: I'm still rather daunted by Actionscript.
SO, I'm trying to load a text file, one.txt, into a dynamic text field. Simple enough, but this time I wanted to have the field rotated to a specific angle, and this requirement defeats my meagre knowledge. I've got a rotated dynamic text field, but I can only fill it with text typed into the actionscript (I don't know the term for this) as opposed to loaded from an external text file.
Strat kindly gave me the following code:
stop();
loadText = new LoadVars();
loadText.onData = function(src:String) {
if(src != undefined){
my_txt.text = src;
}
else{
trace("Woops, didn't load");
}
}
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;
//If this text is what we see then something didn't happen correctly.
my_txt.text = "Not Loaded";
my_txt.setTextFormat(my_fmt);
my_txt._rotation = 45;
//Now that everything is set up, load our text
loadText.load("one.txt");
But when I try it, the "Not Loaded" text appears, so something went wrong, and it's beyond me to see what.
If anybody can offer any help I'd really appreciate it.
Cheers!
N
View Replies !
View Related
If(percentage.text => '0%'){ LoadText.text = 'Loading Juicy Overflows';
I would like my preloader to load various phrases using loadText.text =''; based on the percentage loaded...
The phrases should be locked to the percentage of loading. For example:
0-24% "loading frogs"
25-49% "loading paddles"
50-74% "loading trucks"
75-99% "loading good times"
100% "complete"
My code is below:
I was trying to use something like this...
Code:
if(percentage.text => '0%'){
loadText.text = 'Loading Juicy Overflows';
existing code:
Code:
stop();
//
//file to be loaded:
var loadFile:String = "flash/flav_o_rama.swf";
//list of MCs on the stage and order they should be tweened in:
var blend_sound:Sound = new Sound(this);
blend_sound.attachSound("blend");
var slot_sound:Sound = new Sound(this);
slot_sound.attachSound("slot");
var mcList:Array = new Array('blender', 'plusSign', 'slotMachine');
//
import mx.transitions.Tween;
import mx.transitions.easing.*;
//
var isloaded:Boolean = false;
var animationDone:Boolean = false;
var listCount:Number = 0;
var text:Number = 0;
percentage.text = '0%';
//
//hide stuff for later fade in:
for (var i:Number = 0; i<mcList.length; i++) {
this[mcList[i]]._alpha = 0;
}
//loadText
if(percentage.text => '0%'){
loadText.text = 'Loading Juicy Overflows';
} else if(percentage.text => '25%'){
loadText.text = 'Loading Luck';
}
//
tweenIn();
function tweenIn():Void {
if(mcList[listCount] == 'blender'){
//loadText.text = 'Loading Juicy Overflows';
blend_sound.start();
} else if(mcList[listCount] == 'slotMachine'){
//loadText.text = 'Loading Luck';
slot_sound.start();
}
this[mcList[listCount]]._alpha = 100;
new Tween(this[mcList[listCount]], '_xscale', Bounce.easeOut, 0, 100, 12, false);
var twn:Tween = new Tween(this[mcList[listCount]], '_yscale', Bounce.easeOut, 0, 100, 12, false);
twn.onMotionFinished = function():Void {
listCount++;
if (mcList[listCount]) {
tweenIn();
} else {
animationDone = true;
}
};
}
//
this.onEnterFrame = function():Void {
if (isloaded && animationDone) {
for (var i:Number = 0; i<mcList.length; i++) {
this[mcList[i]]._alpha -= 8;
}
percentage._alpha = loadText._alpha -= 8;
if (percentage._alpha<0) {
loadContainer.play();
for (var i:Number = 0; i<mcList.length; i++) {
this[mcList[i]].swapDepths(this.getNextHighestDepth());
this[mcList[i]].removeMovieClip();
}
delete this.onEnterFrame;
}
}
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//LOADING OF MOVIE:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//we'll load the movie into "loadloadContainer":
this.createEmptyMovieClip('loadContainer', this.getNextHighestDepth());
var loadListener:Object = new Object();
loadListener.onLoadComplete = function() {
//trace("onLoadComplete called");
};
loadListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number):Void {
percentage.text = Math.round(100*(loadedBytes/totalBytes))+"%";
};
loadListener.onLoadInit = function(target:MovieClip) {
percentage.text = '100%';
loadText.text = 'Loading Complete';
isloaded = true;
//trace("finished download");
};
var movLoader:MovieClipLoader = new MovieClipLoader();
movLoader.loadClip(loadFile, loadContainer);
movLoader.addListener(loadListener);
shillin22
View Public Profile
Send a private message to shillin22
Find More Posts by shillin22
Add shillin22 to Your Buddy List
« Previous Thread | Next Thread »
var mqlimit = 0; vBulletin Message
Cancel Changes
Quick Reply The following errors occurred when this message was submitted
Okay
View Replies !
View Related
Loading Different Text Files Into A Single Dynamic Text Box... Help
Still suffering a serious confusion here...
I have one dynamic text box and two buttons... and two remote .txt files....
All I want to do is be able to click "info" button.. and have the text from "info.txt" load into the single dynamic text box... and click the "bio" button and have "bio.txt" load into the dynamic box instead.
This may seem so simple.. but other posters talk "variables" etc... and dont really xplain the simple bit!!! so could someone please give me a simple answer!!!
Im stuck.. and Ive only had this one day...!!!
littledannyp™
View Replies !
View Related
Loading Dynamic Text: Can't Get It Justified As A Block Text
Hi again,
I'm doing a Flash MC which loads some dynamic text from a .txt source file.
I want it to be justified as a block text when displayed in my Flash movie, but after selecting text dialog and the "justify" button in the text properties, the resulting movie does not justify the text at all. However, it does justify to the left, right or center if selected. Strange...any solution to this?
Thank you!
Manare
View Replies !
View Related
Loading Text From Text File And Then Scrolling It Using Components?
Helloo.
Can anyone please help me.
I want to dynamicaly load text into flash, probably from a txt file. Then I want to be able to set up my file so the text field is scrolable using the 'scrollbar' component.
Can anyone please help? Everytime I do it my text field wont scroll, even though I'm sure there is more text than can be seen?
Can anyone help with a .fla?
Cheers SHACK.
p.shackleton@brahm.com
View Replies !
View Related
Loading Dynamic Text Thru External Text Files
Okay, i've looked at the dynamic text questions but am still having a little trouble. I can make dynamic text load if the dynamic text is on the main timeline, but what if it's embeded into a movieClip?
On my main timeline, i have a layer called actions. On a particular frame, i have the following:
loadVariablesNum("about.txt", 0);
A few frames down, i have a movie clip called "placeHolder" that slides in. This movie clip contains a dynamic textbox with both an instance and variable name of "aboutText".
The text file about.txt reads as follows:
aboutText=This is a test
When i test run my movie and it gets to the part where the variable should load, my placeHolder comes across the screen, but the dynamic text box reads:
_level0.instance18.aboutText
I changed something (don't remember what), and it made the actual text from the file show up in a new browser window!!!
How do i get my text to load into the movie clip?
if you need to see the fla and text file, post a request for the files with e-mail address..
Is there a way to attach files here?
View Replies !
View Related
Problem Loading External Text Into Text Field.
I've never ever had problems doing this before untill now.
Currently my home.fla has set up two scenes. ( preloader and second )
in the first frame of the second there is a dynamic text field with 'news' as the var. And in the first frame of actions layer
Code:
loadVariablesNum("news.txt", 0);
news.txt is
Code:
&news=Todays new is trying to get this thing to work!
I've also tried
Code:
news=Todays new is trying to get this thing to work!
Thanks in advance if anyone knows what is going on with this!
View Replies !
View Related
Loading External Text Without Variable Name In Text File
i need to be able to load text from a file and put it in a dynamic text box but i cannot modify the text file to put in a variable name
ie the text file cannot contain variablename=1234
but rather must simply contain 1234
Is it possible to load some text without a variable name indicated in the file using flash mx 2004 and, if so, how would one do this?
View Replies !
View Related
Loading Values From A Text File Into Dynamic Text Box
Hello,
I'm using the as code to load a text file and trying to set it as the value for texboxes;
Code:
loadVariables("data.txt","");
date_text.text = date1;
title_text.text = title1;
entry_text.text = entry1;
the textfile is;
&title1=Welcome to my Flash Blog
&date1=13th November 2005
&entry1=This is the first entry in my blog. This is sample entry and all the data.
The as code has all the correct names of the dynamic text boxes, also it works fine if i put the names of the varibles from the text file as the var propertie of the tex boxes, but i dont want to use this method.
im sure its a silly little error, but been searching for a solution for over an hour with no luck
View Replies !
View Related
Dynamically Loading Text & Graphis Into Scrollable Text Box - Possible?
Hi,
Somebody wants me to design into a site a feature that will enable them to upload text & graphics into an section of their site.
I know you can use Macromedia's “Contribute” for a similar sort of thing, but i did'nt want to go to the expense of employing that. I would be able to load in simple text file with no problem but is it possible to load in both text & graphics into a scrollable text field?
Any help or tuts much appreciated.
View Replies !
View Related
Loading Dynamic Text Into A Text Field In A Movieclip
Hi:
I have multiple dynamic text fields in a movieclip called "dragwindow"
On the main scene, first frame... i have the code
loadVariablesNum("todaysrates.txt", 0);
it doesnt load the text when I test the movie but when I put the dynamic text fields on the main scene it does load the text. i dont know what to do.. help please
View Replies !
View Related
Loading Text Into Text Fields From An External File…
I have a file supplied to me with a couple of text boxes in it.
My friends would like to easily update the content of these boxes by using an external text file.
I have tryed tests with the "loadVariables" property, but can't seem to get any text to load at all. I have a text file called "Content.txt" and the dynamic text box has an instance name of text1 (original I know) and a variable name of myText.
The beginning of my text document starts of with "myText = "…
The line of code I was using was
loadVariables("Content.txt", text1);
this produced no result… does anyone have any suggestions for this problem?
Cheers.
Joel
View Replies !
View Related
Loading Text Files Info Text Fields On AS3
Hey guys, I am following some examples from Flash CS3 Help files and some portions of the ActionScript 3.0 Cookbook on TextFields. Here's the code I currently have on my first frame of the timeline. When I test the file, I get "TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set htmlText() at textFields_fla::MainTimeline/textFields_fla::frame1()"
What's wrong?
Attach Code
import flash.display.Sprite;
import flash.events.*;
import flash.net.*;
var source:String = "html.txt";
var dataFormat:String = URLLoaderDataFormat.TEXT;
var loader:URLLoader = new URLLoader();
loader.dataFormat = dataFormat;
var request:URLRequest = new URLRequest(source);
loader.load(request);
var myT:TextField = new TextField();
myT.autoSize = TextFieldAutoSize.LEFT;
myT.width = 300;
myT.wordWrap = true;
myT.htmlText = loader.data;
addChild(myT);
View Replies !
View Related
Making Some Text In Color When Loading From External Text
i was wondering, is there a way to make it so like say i loaded external text file to display text on my page that said:
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
Could i make the "2/04/04" part like red and the rest of the text black so like i can make:
2/05/04
Today i became a god, tomarrow i will eat a twinkie.
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
and make the dates red and the reg text black?
View Replies !
View Related
Loading Random/dynamic Text Into A Text Field
Hey everyone,
Could someone please help me work this problem out: When a user enters the website, it will pull text from some location (possibly an XML file) and load it into a text field. The trick is that I want it to randomly load a different chunk of text in each time the user opens the site. There are about 25 different small pieces of text I want to randomly load.
I'm thinking of using XML to store the 25 different text sentences, but am open to other ideas.
Thanks so much!
View Replies !
View Related
Dynamic Text Issues When Loading From Text File
I've got a dynamic text block that loads text from a text file in the same directory as the flash file. The dynamic text area is scrollable, renders the text as html, and applies the stylesheet that i load externally correctly. For a scroll bar i used the UIScrollbar in Flash MX 2004 V 7.2
If i test out the movie clip on it's own it loads fine and all the text shows up in the text area. However, if I load the movie clip into a time line, where it is animated, in other words, if i have a motion tween on it, all of the text shows up in the area, but the scroll bar won't scroll down far enough to read it all. The only way to see all of the text is to highlight it and drag down.
I've tried calling the scrollPane.refreshPane() action after the motion tween but nothing seems to work to get the scroll bar to go all the way down to the last line of text.
I'm pretty sure this is another bug that has probably been worked out somewhere else, and I just can't find the solution online.
Any ideas?
Thanks,
Nate
View Replies !
View Related
Loading Multiple Text Into Dynamic Text Field
I have several checkboxes that I would like to display their values in a dynamic text field, adding to what is previously there instead of replacing it. I also need the value to disappear from the text field if the checkbox is unchecked.
So far, I have (on each checkbox):
Code:
on(click) {
_root.textfield.text = this.label;
}
On the first frame of my form, I have the following for those checkboxes:
Code:
_root.checkbox.addListener();
What step do I need to take next?
View Replies !
View Related
Help: How To Change/hide Text While External Text Is Loading
Hi. I'm not an actionscript person and I got this from someone else on the forum a while back but I can't seem to find the original post. I was wondering what I would have to change in order to get rid of this text (_level0.scrolltext.filltext) that shows up while the external text file is loading. It looks really unprofessional.
Here is the code and I'm assuming its the last line of code that's doing it but again I really have no idea:
Code:
stop();
var loadtext:LoadVars = new LoadVars();
loadtext.load("home.txt");
scrolling = function ()
{
var scrollht:Number = scrolltrack._height;
var boxht:Number = scrollbox._height;
var scrollarea:Number = scrollht-boxht;
var ms:Number = filltext.maxscroll;
var scale:Number = (ms-1)/scrollarea;
var ypos:Number = scrolltrack._y;
var textpos:Number = filltext.scroll;
var left:Number = scrolltrack._x;
var top:Number = scrolltrack._y;
var right:Number = scrolltrack._x;
var bottom:Number = (scrolltrack._y+(scrollht-boxht));
var ymove:Number = 0;
var textmove:Number = 0;
scrollbox._y = ypos;
scrollbox.onPress = function()
{
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function()
{
ymove = (ypos-this._y);
textmove = (Math.round(ymove*scale));
filltext.scroll = textpos - textmove;
};
scrollbox.onMouseUp = function()
{
stopDrag();
delete this.onMouseMove;
ypos = this._y;
textpos = filltext.scroll;
};
};
if (ms==1)
{
scrollbox._visible = false;
scrolltrack._visible = false;
}
else
{
scrollbox._visible = true;
scrolltrack._visible = true;
}
};
loadtext.onLoad = function (success)
{
if (success)
{
filltext=loadtext.filltext;
scrolling();
}
else
{
trace ("not loaded");
}
};
View Replies !
View Related
AS 2 Loading Simple Text W/ XML? Title, Date And Text.
Ive read a few XML tutorials and I'm having trouble with this. Basically, I want my flash file to load the most recent news article. The 3 values of each article is title, date and info. I want to write all these up in an XML file, just to keep all the articles archived (in case someone wants to see "ALL NEWS", which Ill then load through a simple html page).
For example.
<article0>
<title>Alien found on mars</title>
<date>June 12, 2020</date>
<info>Blah blah blah. see them at http://www.kirupa.com.</info>
<article0>
<article1>
<title>Rubber bands of death</title>
<date>June 19, 2020</date>
<info>Woosh!</info>
<article1>
And I'd have 3 dynamic textboxes to load the title, date and info. And it would take it from the most recent article, in this case article1.
Any help is appreciated, no clue where to start. Thanks.
View Replies !
View Related
Dynamicly Loading Text From Dynamicaly Loaded Text
I believe that is how i would phrase what im trying to do.
Here is the situation.
I have two data boxes. In one box i have dynamicly loaded text w/ scroller listing various items. In the other box i want those listed items to appear w/ scroller. How can i make it, so that, by clicking the items in box one, the text in box two appears. Almost a tellTarget type of thing. If i were using buttons i know how to do it. But since im using text, i cant figure out how to place the action script.
Any help or advice would be appreciated...
Thanx in advance..
View Replies !
View Related
Making Some Text In Color When Loading From External Text
i was wondering, is there a way to make it so like say i loaded external text file to display text on my page that said:
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
Could i make the "2/04/04" part like red and the rest of the text black so like i can make:
2/05/04
Today i became a god, tomarrow i will eat a twinkie.
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
and make the dates red and the reg text black?
View Replies !
View Related
|