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




Dynamic Text Shows Locally But Not On Site?



I have a dynamic text box on the _root level of my movie that loads an external text file. When I test it in Flash (MX2004) locally the text shows up just fine. But when I upload it to the site it doesn't show at all. I'm exporting as Flash 6. I just want to display as html text and not embed font (if possible). Also, there are no masks on the _root level.

Here is the code to load the text:

loadText = new LoadVars();
loadText.load("/text/about.txt");
loadText.onLoad = function() {
textBox.html = true;
textBox.htmlText = this.infoText;
};

Any ideas are welcomed and appreciated.

edit: Yes, I made sure the text file is uploaded to the /text directory!!



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-16-2005, 11:00 AM


View Complete Forum Thread with Replies

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

Dynamic Text Shows Locally But Not On Site?
I have a dynamic text box on the _root level of my movie that loads an external text file. When I test it in Flash (MX2004) locally the text shows up just fine. But when I upload it to the site it doesn't show at all. I'm exporting as Flash 6. I just want to display as html text and not embed font (if possible). Also, there are no masks on the _root level.

Here is the code to load the text:

loadText = new LoadVars();
loadText.load("/text/about.txt");
loadText.onLoad = function() {
textBox.html = true;
textBox.htmlText = this.infoText;
};

Any ideas are welcomed and appreciated.

edit: Yes, I made sure the text file is uploaded to the /text directory!!

Flv Skin Only Shows When Previewing Html Locally
When I import FLV into a flash file then publish to HTML, I have no problem seeing the video (WITH skin controls) in a browser but only when opening the html file directly (ie: double clicking html file in windows explorer). But when I view the html through our file system http:/etc etc (running an apache server) the video plays but there are no controls. I'm guessing something is filtering the controls out for some reason? If so how do I get around this? I've tried using the preset skins and also uploading skin to our server and using an http path, doesn't help.

The bigger picture is that I want video to play in our web pages, without the "click to activate" thing and also so our javascript navigation flyouts display over top of the flash (not beneath). I can get all these things to work for *normal* swf/html files but not flash video. It seems to be a completely different beast... Thought I'd mention this too, as solving the skin problem is just one obstacle on the way to solving this wider objective.

My Quicktime Page Works Locally, But Shows A Broken Link When I Post It Online.?
I don't understand why, but when I launch the html page from my desktop, the quicktime, PANO file seems to work.

When I post them up on the web, it shows a broken link.

The embed code is...

//<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="255"
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" BORDER="4"><PARAM NAME="SRC" VALUE="Studio.pano">
<PARAM NAME="AUTOPLAY" VALUE="TRUE"> <PARAM NAME="CONTROLLER" VALUE="TRUE">
<EMBED SRC="Studio.pano" WIDTH="320" HEIGHT="255" CONTROLLER="TRUE"
PLUGINSPAGE="http://www.apple.com/quicktime/download/"> </OBJECT>

What is going on?


Thanks.

My Dynamic Text Only Shows For Me
Well, I found a tutorial on getting dynamic content to load, and it worked fine for me on FLASH MX 2004. Well, I uploaded it to my site and when I go to show it to people, they say "where is the text?" None of my people can view the text, in fact everyone I asked can't. I don't know if there is a problem in the action script or with the way I am doing things, but damn, whats the deal! Here is my code in its full and I am telling you were it is located.

// staff_header statement
loadText = new LoadVars();
loadText.load("staff_header.txt");
loadText.onLoad = function() {
staff_box.text = this.staff_header;
};

// dapro's profile
loadText = new LoadVars();
loadText.load("staff_dapro.txt");
loadText.onLoad = function() {
dapro_box1.text = this.staff_dapro_nick;
dapro_box2.text = this.staff_dapro_name;
dapro_box3.text = this.staff_dapro_age;
dapro_box4.text = this.staff_dapro_email;
};

Both of these actionscripts are located in the layers of there text boxes. they are on sync with them and everything. Could it be the fact that my text boxes are located in a movie-clip inside of another movie-clip? Please help.

Here is the link to my site http://www.ani-pro.com/layout.php.

Dynamic Text Field In My Custom Component Shows No Text In SWF
Flash MX 2004 on MAC platform (not professional version)
------------------------------------------------------------------------
Hi,

I created a custom component in Flash MX 2004, which has two custom text fields defined by variables and one link defined by a variable also (3 variables total).

When I publish my movie, one of the text fields in each instance of my component on the stage is always empty (the same one) ...does anyone have any idea why?

It doesn't make sense to me that i have it working for one text field and not for the other....I don't THINK that I am doing anything differently between them...?

I have uploaded my small FLA here:

http://www.lucid-life.com/my_component.fla.zip

Can anyone help?......

Thanks,

Cheska

Dynamic Text Field In My Custom Component Shows No Text In SWF
HI,

I created a custom component in Flash MX 2004, which has two custom text fields defined by variables and one link defined by a variable also (3 variables total).

When I publish my movie, one of the text fields in each instance of my component on the stage is always empty (the same one) ...does anyone have any idea why?

It doesn't make sense to me that i have it working for one text field and not for the other....I don't THINK that I am doing anything differently between them...?

I have uploaded my small FLA here:

http://www.lucid-life.com/my_component.fla.zip

thanks in advance of any help..

Cheska

Dynamic Text Shows Randomly
Hello,

I am working on a project that involves PHP, MySQL and Flash. The link between the database and flash i made it with php which generates some xml files. The information in these xml files are shown within some dinamic text fields.
The problem is that they are showed randomly. One time it shows all 3 texts, other time it shows none, other just one text field.
I called trace when i am reading the xml file and the data is correct, so i'm guessing this is a problem in Flash.

Here is the code :

Code:

afisXML = new XML();
afisXML.ignoreWhite = true;
afisXML.onLoad = myLoad;
afisXML.load("http://www.mysite.com/file_that_generates_xml.php");

function myLoad(ok) {
if (ok == true) {
Publish(this.firstChild);
}
}

function Publish(afisXMLNode) {
var linii = new Array();
if (afisXMLNode.nodeName.toUpperCase() == "ANUNT") {
afis = afisXMLNode.firstChild;
var i:Number = 0;
while(afis != null) {
if(afis.nodeName.toUpperCase() == "LINIE") {
linie = afis.firstChild;
if(linie.nodeName.toUpperCase() == "TEXT") {
linii[i] = linie.firstChild.nodeValue;
trace(linii[i]);
}
}
afis = afis.nextSibling;
i++;
}
}
_root.anunt.linia1.alb.alb1_text = linii[0];
_root.anunt.linia1.negru.negru1_text = linii[0];
_root.anunt.linia2.alb.alb2_text = linii[1];
_root.anunt.linia2.negru.negru2_text = linii[1];
_root.anunt.linia3.alb.alb3_text = linii[2];
_root.anunt.linia3.negru.negru3_text = linii[2];
}
if any of you have had this problem or can help, please do so!

Static Text Shows, Dynamic Does Not
I'm working on a flash site where it would take the content from an external text file for content. For some reason I could never get it to work. So I tried just typing text into the dynamic box, and that still didn't show up when previewed. However, if I change the text box type to 'Static Text' then the content I typed in shows up just fine. Ofcourse, I can't import the text if it is set to static text. What's going on!?

(The text box is in 2 movie clips, but I dont see how that could make a difference!)

Dynamic Text Loads Locally But Not On Server?
I have a set of buttons with LoadMovie and LoadVariable scripts on them, which basically load .jpegs into an empty movie clip, and external .txt files into a dynamic text box. (it's a photo gallery of sorts)

i had previously saved the .swf and assets (the jpegs and .txt files) locally in a single folder on my hard-drive. I made a copy of this folder and put it onto a network server.

the weird part is that when i go to publish the .swf from the local folder (the hard-drive version), the buttons and everything work fine and everything loads as it should. the network version however, doesn't seem to behave the same way. the jpgs load, but the .txt files don't!. the version of the folder on the server is an identical copy of the local one. all the files are intact and accounted for. i don't think it's an issue of relative vs. absolute paths in the script either. i've already tried editing the script so that it targets the absolute file path of the .txt document on the server to no avail. i don't understand what the problem is.

on a curious note, after i tried fooling with the network version of the source .fla file that i'm working with for a bit, it caused flash to crash on me. any ideas? I'm running Flash MX 2004 on a Dell.

Dynamic Text Shows Up As BAD QUALITY..from Xml File HELP
in my xml file i got like a array of pics being displayed

with captions in the xml to display for each picture...the captioned titles are in bad font quality..

how can i fix this...
or is there another way ?


THANKS

Dynamic Text Box Input Which Shows An Output?
Hey guys,

I have a uni project where on the first page there is a text box where you have to enter your name.
Then on the next page I want the name entered to show on the page.

How do I do this. Does anybody have a mini fla. file they can email me with it?

b18269@hotmail.com

Is doing my head in as the work must be in 2moz morning.

Any help welcome
Thanks guys.

Dynamic Text Shows In Test Movie But Not Swf...
I've got a shell (lesson01) loading external text into dynamic fields. On the second page, I need to load a swf file which also loads external text.

When I do a Test movie, I can see the dynamic text on all three screens, but when I run the swf file, I don't see the text which is loaded into page2?!

Any ideas? I'm setting the variables in _level0 and have also tried using _root, but it doesn't seem to matter. I've also looked at embedding the characters in the dynamic fields, but that didn't do anything either?!

See the attached sample, lesson01.swf loads lesson01.txt (page 1 and 3 content) and the second frame loads page2.swf which loads page2.txt

Thanks for any help...

Dynamic Text Field Shows Nothing If Rotated
Hi, I need to rotate a Dynamic text field, but when I do it, the text disapear. I used embedFont = true, but nothing happens.
Any sugestions?

Thanks!!

Dynamic Text Shows Up On PC... But Not On Web After Uploading To Server
Hi all,

Here's the problem I'm having. I have two dynamic text boxes in my SWF... one with a variable name of "title" and the other with a var of "body". The action in my Frame 1 says:

loadVariables("about_us.txt",this);

Inside about_us.txt, it begins:

title=About Our Company...


&body=<font color="#B8722D"><a href="staff.shtml"><b><u>Meet Our Staff</u></b></a></font> / <font color="#B8722D"><a href="location_map.shtml"><b><u>Location and Map</u></b></a></font>

<img src="map.jpg">

... etc with more text and HTML formatting.



On my PC, everything shows up (though with some image and scrollbar problems... but that's for another thread ). But once I upload to a server, things seem to randomly break. On one server, only the title showed up, with no body text whatsoever. After trying to use about_us.HTM instead of .TXT, nothing would show up.

However, on another test server, the title and body all showed up, but there was no image (where img src="map.jpg" should be). After refreshing a few times and adjusting some line breaks (I think that's all I did), the image showed up again.... but, of course, only on this test server and not on the real server.

Does anyone know what the issue could be? Why won't this stuff show up correctly online? Thanks much!

Dynamic Text Box Shows _level0.page_text
Can anybody tell me what could be wrong and why do I get this. I have a dynamic text box with instance name and Var set to page_text. Then I have this code:
Code:
this.onEnterFrame = function(){
page_text = "page " + current_page + "/" + total_pages;
}
Before I get current_page and total_pages. If there are more pages, everything works fine and it shows like "page 1/5", but if I have only one page, it shows "_level0.page_text" instead of "page 1/1". current_page and total_pages trace correctly. Any ideas?

External Swf Shows No Graphics - Only Dynamic Text - When Loaded Into Mc
I am trying to load external swf's into a container, in my main timeline, with an intro and outro bit. When the swf loads in, only the dynamic text shows - no animation and no graphics..?

The idea is to use the methods in this tutorial: http://www.kirupa.com/developer/mx2004/transitions2.htm

I have stripped as much as poss out of the movie for the purpose of demonstration and only put actionscript on the first two buttons. They are nested in a mc - and i am wondering if this is the problem...

Any help, as always, will be so great!

Dynamic Text Which Has FFF Font Shows Times New Roman In My Friends System
Hi

Dynamic text which has FFF font shows times new roman in my friends system

Can Any one help me out

A Button That When Clicked, A Number Shows Up In A Dynamic Text Field And Each Additi
i need help on something probably simple for you guys... all i need is a button that when clicked, a number shows up in a dynamic text field and each additional time the button is clicked, the number incrementally goes up...

thats it...
anybody know what the actionscript would look like...?

much appreciated..
thanks
adam

Same Movie Works Locally On Mac But Not From Site
Hi All,

I created a flash movie on Mac OSX, with Flash MX. It plays fine if I run it from a page or directly from a local drive in a browser. When I upload it to the web server however, it only works on Windows. On Mac it just stops on the first frame and sits there. Ive tried all browsers, all have the Flash 6 plugin. I also tried exporting the movie as Flash 5 and 6, both got the same results. Here is the page with the movie:

http://home.earthlink.net/~mmacie/curstep.html

If you are on a Mac, you will probably only see a grey page with a dark grey bar and nothing else. If you are on Windows, you will see the 3 animated steps and titles which scroll as you roll over them. This is how it should work on the Mac (and does, however not from a remote server).

Very bizarre. I am totally stumped how to fix it. And my boss is breathing down my throat! Any help or ideas appreciated.

Thanks,


Mike

SendAndLoad Works Locally But Not On Site...
Anyone have any idea on this?

My sendAndLoad

PHP Code:



temp.onPress = function() {
        if (this._parent.ratingsEnabled) {
            trace("going to update current subtitle rating");
            // show loading
            this.loadingScore._visible = true;
            // diable all rating once again...
            disableRating();
            var result_lv:LoadVars = new LoadVars();
            result_lv.onLoad = function(success:Boolean) {
                if (success) {
                    trace("success " + result_lv.newScore);
                    //wait for new score
                    _root.ratingScore = result_lv.newScore;
                    trace(_root.ratingScore);
                    //update txt and update star
                    updateMask();
                    // removing loading
                    loadingScore._visible = false;
                } else {
                    trace("fail");
                    //result_ta.text = "Error connecting to server.";
                }
            };
            var send_lv:LoadVars = new LoadVars();
            send_lv.score2 = this.tempNum;
            send_lv.id = 0;
            trace(send_lv.toString());
            send_lv.sendAndLoad("http://www.xxx.com/xx/xx/addRating.php", result_lv);
        }
    }; 




my php

PHP Code:



echo "&newScore=" . $newAvgScore; 

Having Problems Running My Site Locally
Hi guys,

A portion of my site has video content being streamed from my servers online, it works great.

Now I want to run these video locally, but the AS3 video player im using is making it difficult for me. I think it was coded to be only streamed online. I need your help to figure out where it indicated this in the code below.

Code:

import caurina.transitions.*;

var conn:NetConnection = new NetConnection();
conn.connect(null);

var stream:NetStream = new NetStream(conn);
stream.play("videos/kidsart.flv");
var metaListener:Object = new Object();
metaListener.onMetaData = theMeta;
stream.client = metaListener;

var st:SoundTransform = new SoundTransform();
stream.soundTransform = st;

var video:Video = new Video();
video.attachNetStream(stream);
video.width = 640;
video.height = 360;
video.x = 70;
video.y = 0;
video_mc.addChild(video)

Site Loading Before Preloader Even Shows..help
I have a flash site that opens in a new window, the site is 125 k. The problem I have is that it seems to be preloading before the first frame even shows, so I am left with a white scree for the seconds before the site loads... I have never experienced this before.
Any help would be appreciated

Here is the site http://www.raffa.co.uk
Thanks
Pete

White Box Shows Up Before Site Loads
hello,
I have built a site and it seems to be a re-occuring problem that when I go to a site that I've made you see a second or 2 of a white square where the flash file is within the html table. Is there a way around this to make this not happen?
here is the site-
www.bartendercalendar.com

thanks in advance for any help...

Browser Shows It's Still Loading My Site?
My site http://www.acottageflorist.net loads up pretty nice. The only thing I don't understand is that after the movie loads into the browser, it still shows in the browser that something is still being loaded.

Here's another site I've done with the same issue. This site is nothing more than two movie. The main swf and the loaded movie that plays the video http://www.imirocks.com/IMIRocksHome.html at the bottom of the browser it will say "1 item remaining"

How can I remedy this???

Thank is advance.

Flash Site Only Shows After A Refresh
Hello everyone,

my new site is at http://lapatisseriebelge.com.
My problem is that when the site loads for the 1rst time it only displays the background, i have to do a refresh (F5) in order to see the full site.
any suggestions would be deeply welcomed.

Site Works Locally, But Doenst Work On The Net
ive got a flash site that works fine on my computer, but isnt working on the net.


the very first swf that loads up is a startup swf that loads the other movies into the proper levels using:

loadMovieNum("interface.swf", 3);
loadMovieNum("home.swf", 2);

interface.swf is supposed to stay on top throughout the entire site, while each different site is loaded into level 2

like i said, locally works fine
but on the net level 3 doesnt load up at all, only home.swf on level 2 loads

whats up wit that

Flash Videos Showing Locally, But Not On My Site. Help Please
Hi,

I converted several avi's to flash, I then inserted the FLV file into and html file in dreamweaver.
The flash files will play locally, but not when i upload them to web server. Check it out here please

http://kdsi.org/kds/demo.html

please check the demos above to see what i mean. I just get a blank page.

Anyway to insert video into the page like youtube? (instead of the "demo video" button have the video embedded and just click play to play it. without using the popup like i did.)

thank you.

thanks

My Site Is Viewable Locally, But Not When Uploaded To Server
Help what would cause me to see my site swf locally on my computer, but when I upload it to the server I am not able to see it?

Flash Site Works Locally ,but Not On Remote Server?
What wrong?

can any body give me a clue why can't i view my site when i uploaded it on my server? when i try to view it locally it works fine.

my home page is named, index.htm and on it is an embedded swf movie which calls two .swf files(menu and buttons) that completes the interface(i used loadmovie AS for this).all the required files(swf, txt,jpg..etc) resides on the same folder as the homepage. The menus, once selected will load the corresponding page/s which are swf movies. i made it this way and not put it all in one swf movie coz im afraid the file size would get really heavy coz i need to put pictures on each page. I have known of some sites that uses the same method so i knew this suppose to work, which it does locally.

i uploaded it on my server to checkout how wil it load, and to my suprise nothing came out on my browser! (but the status barof the browser seems loading huh?) then i tried uploading it on geocities.com just to se, if its the files that has the problem or the server. the home page did load together with the two swfs files (the button & menu), but they are not working.i can figure out what's wrong?
could some body help me on this please? did i overlooked something? are swf files are allowed on all kinds of server?

Flash File On Web Server, Looks Flatter Than Site Locally
When I view my flash file on a live web server, the photos and colors look much flatter than when I view the files locally. same browser, same html file, same everything.

is there a loss of quality from a web server in a flash file? i've never seen, or maybe just haven't noticed it before.

i'm on a mac. haven't tested in windows yet to see if there is a difference.

thanks.

XML Data Displayer - Works Fine Locally... But Not On Site - [F8]
Hiya

Another XML related question...

I have my XML Data Displayer referring to an XML feed on the web, it works fine when I run it locally, however it doesn't work when I run it off my site.

There's no missing files- since I'm referencing to an XML feed on the web.

How can I solve this problem and display XML data from the web, on the web?

^_^ ty

Site That Shows How To Load Flash Into Frontpage With No Coding
In my quest to learn how to load my Flash files into Frontpage I got alot of instant help from you guys and I thank you. I just ran across a site that shows you how to do it by a controller in Frontpage, no coding needed. Happy to be able to give back to the community just in case someone else needs this.

http://www.flashbuttons.com/tutorial...age/index.html

Site Dimensions Set At 100% But Shows Up Tiny In Netscape And Firefox Browsers
I have designed a bunch of flash sites and published them at 100% (dimensions) which works out great in Internet Explorer and Safari but when viewed in Netscape or FireFox they load really tiny. Is there something I'm doing incorrectly or does anyone know a fix for this?

Thanks!

SWFs Play Locally (they Pull Xml Info From Another Site) But Don't Work Online
Hi there,

I've have built a fairly dynamic flash website that pulls images and text files from an xml file from another server. Now everything works fine when I test it locally but when I upload the files none of it works... The only difference is that the files online are embeded in an fullscreen HTML page.

View here

Click on 3D animation and you can see that the data is undefined.

Any ideas why the swfs can't pull the content in?

Help is really appreciated.

W3C Markup Validation Service Web Site Shows Lots Of Errors For .swf Object
Hello;

I'm using the method to insert a .swf file into an Html document as described in the "Frequently Asked 'Flash' Questions" tutorial in this forum:
http://www.sitepoint.com/forums/showthread.php?t=210919

The flash object works fine in my browser.

When I try to validate the Html using the W3C Markup validation service it says that there are no attributes for SRC, QUALITY, PLUGINSPAGE, TYPE, WIDTH, HEIGHT, and MENU. It also says that the element EMBED is undefined.

Since it shows so many errors it looks like the W3C Markup Validation Service might not configured to work to .swf objects.

You can copy and paste the code below and you can see what I'm talking about. Here's the link to the W3C Markup Validation Service page:
http://validator.w3.org/


PHP Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Shockwave Flash Movie</title>
</head>
<body bgcolor="#AAAAAA">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="250">
  <param name="movie" value="300 x 250.swf" />
  <param name="quality" value="autohigh">
  <param name="menu" value="false" />
<embed src="300 x 250.swf" quality="autohigh" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" menu="false"></embed>
  </object>
</body>
</html>


I think that using the flash object will be ok but for my peace of mind can somebody tell me is it safe or wise to use the .swf object when the W3C web site shows so many errors?

Thanks.

Alter Text Size Option On A Flash Site Using Dynamic Text
I would like some advice on  how to Implement ability for “user” to alter text size on a flash website (enlarge decrease ) (10 Pages) through a plus / minus icon at the top of the header. Clicking this icon would alter all text areas through out the site .This would only apply to content areas of the site on each page that holds text. All the pages are laid out within the same template. Menu across the top, single left hand column of text with scroll's  and an image on the right. The text is dynamic on this site. The text is stored externally in a separate fold as text files for each page.
I would greatly appreciate some advice


HOW TO: Dynamic Text In Web Site...
Hi there,

I was trying to make a flash site which I can update by using dynamic text. Someone told me it is possible, but didn't knew how to. So help me, please.

This is what I'd like to achieve:
A box of dynamic text which already has a definition of the size and type of font. The text should be in a *.txt documnent, and by updating the *.txt document the site should be update (text-wise).

Is this possible? Thank you in advance

Bas van Ommen
Amstelveen
The Netherlands

Need Some Help With My Site... Dynamic Text Box , And More...
You can visit my site at http://ultarius.com/AoS/

It is still in the very early stages and i have tons i want to add but if i just understood flash a bit better i could get it done quicker.

First off the main news text that scrolls down. I want to have the text inserted from a text document and be able to adjust font size and color through the document. So that i dont need to open flash up everytime to update my news section.

Also for the news ticker. Is there anyway at all to adjust the fonts in the newsticker so that they are a bit closer together. This is a dynamically loaded ticker from a txt file. The only adjustment i can do with the text string is change the speed, and space between sentences by putting more spaces between the words. The actualy space between each letter is too wide and the font is not what i want, but i have no idea how to change this.

My last question , how would i make the whole page centered as if i published it as a swf ? For some reason all my html pages that are published in flash always default and go to the left side of the screen in IE. Which file do i need to open up and edit to make this centered ???

IF anyone could help me out with these 3 things i could move on to my next problems . Hehe

Dynamic Text Box - How Many People Are Looking At A Site
How can I find out how many people are looking at a page or site and put that data into a dynamic text box in Flash?

Glen Charles Rowell

Loading Dynamic Text From Another Site
Followed Kirupa's Tutorial on loading dynamic text into a text box, and it works great when the .txt file is in the same folder. But I want to use the same text for a banner on another site. I was hoping I could jsut load it fromt he same text file so I only have to change it in one place in the future. I tried to do it with this code but am not sure that's the right way to script it:

loadText = new LoadVars();
loadText.load("http://www.externalsite.com/text/mytext.txt");
loadText.onLoad = function() {
promo.text = this.promo;
expires.text = this.expires;
code.text = this.code;
};

Loading Dynamic Text From Another Site
Followed Kirupa's Tutorial on loading dynamic text into a text box, and it works great when the .txt file is in the same folder. But I want to use the same text for a banner on another site. I was hoping I could jsut load it fromt he same text file so I only have to change it in one place in the future. I tried to do it with this code but am not sure that's the right way to script it:

loadText = new LoadVars();
loadText.load("http://www.externalsite.com/text/mytext.txt");
loadText.onLoad = function() {
promo.text = this.promo;
expires.text = this.expires;
code.text = this.code;
};

[CS3] Trying To Attach MC With Dynamic Textbox To Another MC... Nothing Shows Up
Hello,

I am trying to create a dynamic news page. I have an XML file containing my news articles, the contents of which are loaded into a dynamic textbox (newsText), which sits in a movieclip (newsMC). I also have an external css file to format this text.

The code I have used to achieve this is:

PHP Code:



var loadNews = newsMC.newsText;

// set up the textfield attributes
loadNews.html = true;
loadNews.wordWrap = true;
loadNews.multiline = true;
loadNews.condenseWhite = true;

// create new style sheet object
var myCSS = new TextField.StyleSheet();

// specify the location of your existing CSS file
var cssURL = "scripts/news.css";

// load CSS file
myCSS.load(cssURL);

// define onLoad handler
myCSS.onLoad = function(success) {
    if (success) {
        /* if the style sheet loaded without error */
        loadNews.styleSheet = myCSS;
        loadNews.text = "CSS file loaded successfully. You may proceed.";
    } else {
        loadNews.text = "CSS file failed to load!";
    }
}

//load the XML file
myContent = new XML();
myContent.ignoreWhite = true;
myContent.load("news.xml");
myContent.onLoad = function(success) {
    if (success) {
        loadNews.text = myContent;
    } else {
        loadNews.text += "<br /> XML file failed to load!";
    }
}




This works correctly. The problem is that I need to be able to scroll this text. I have a custom made scrolling panel (newsPanel) that contains a scrollable movieclip (theText). I would like to attach the newsMC clip to theText.

I used the following code:

PHP Code:



 newsPanel.theText.attachMovie("newsMC", "newsMC", 2);




and nothing appears...

I have managed to load other MCs containing dynamic textboxes into the newsPanel by embedding the fonts, but for some reason this one MC does not load...

Is there something I am missing??
Any suggestions appreciated!

Loading Dynamic Text - Identical Swf Works On One Site But Not On Another
Strange problem this.

I made a flash banner a while ago which pulled in variables from an asp page, its being used on two seperate sites and *was* working fine on both. Today I found that its failing to pull in one of the variables on one of the sites and is giving an 'undefined' error, the other one still works fine.

The odd thing is they're identical, they use identical asp files in the same sub folders of the site, but one works and one doesnt!

see here -
http://www.samespots.com/flash/quote_banner.swf (works)
http://www.nonlinear.com/flash/quote_banner.swf (broken!)

they both use an asp file - /flash/quote_query.asp - which looks to be spitting out the same URL encoded string without a bother.

I'm stumped, the Actionscript is the same in both files, they're utterly identical, yet ones broken.

anyone got any clues what-so-ever?

Text Field Rotated Shows Text Pixelated
HI
i have rotated a text filed, the text looks like pixelated.
is their any solution to avoid this pixelation.

regards
advika

Text Shows Without CSS
Hi -
In the 2nd panel (Cuisines and Menus) of a site I'm trying to build at:
http://www.thymetoeatpcs.com/index2.html
there's a dynamic TextField that brings in Text and CSS.

It works fine locally but when I upload it and view it, the CSS doesn't get loaded.

To make this more confusing...sometimes it does and sometimes it doesnt.

I've attached the code but I really have no idea what's wrong.

How can I make sure the text and CSS load in time to appear correctly when the user gets to that page?

TIA your expertise.
JL







Attach Code

this.createTextField("news_txt", 99, 130, 230, 260, 160);
news_txt.html = true;
news_txt.multiline = true;
news_txt.wordWrap = true;
news_txt.border = true;
news_txt.borderColor = 0x524D16;

// Location of CSS and text files to load.

var txt_url:String = "CuisineList.html";
var css_url:String = "thyme.css";

// Define onLoad handler and Load CSS file.
styles.onLoad = function(success:Boolean):Void {
if (success) {
/* If the style sheet loaded without error,
then assign it to the text object,
and assign the HTML text to the text field. */
news_txt.styleSheet = styles;
//news_txt.text = storyText;
} else {
trace("Unable to load CSS file.");
}
};
styles.load(css_url);

// Define onData handler and load text to display.
myVars_lv.onData = function(src:String):Void {
if (src != undefined) {
news_txt.htmlText = src;
} else {
trace("Unable to load HTML file");
}
};
myVars_lv.load(txt_url);

Dreamwever Site With Flash, FLash No Longer Shows Up
hello everyone-

ive really searched for an answer to my issue, but i cant find out what is wrong. i do light work in Dreamweaver, last year i created a site for my aunts company in MX, Flash and Dreamwever, everything was working fine.

I upgraded to the new Dreamweaver and FLash 8. I just did a update in the wording on the index.html page, since then the flash logo that was on top, it just kind of fades in, it hasnt been working. like it doesnt even exist on the real web, but it shows up with i press F12 and go about it that way. im so confused.

does anyone have any ideas? the comptuer's all have the latest flash player and all that installed. im not a big flash or dreamwever person, so im really lost...

thanks,
-Josh`

Help On Dynamic Textfield Loading .txt File Who Works Locally But Dont On The Server
Hi, i was lookin troughout FlasKit website trying to solve a problem that ive got with Dynamic textfields loading text archives on MX
i was using all this lines of code but it didnt work when i upload to the server (the weird thing is locally it works just fine)

_root.loadVariables("01.txt","/");

or this other

loadVariablesNum("01.txt?Ran="+random(999), 0);

the text file is uploaded as an UNICODE file got all its variables fine (my_variable1=hello world&my_other_variable=help me escape from this !!) etc..etc..

the textfield is working with its vars (my_variable1, my_other_variable) correctly attached; and its works FINE on any computer (locally) but when its uploaded fails; i was trying to modify the path of the txtfile ("01.txt" "/01.txt") but it didnt work and i dont think its always necessary to put an URL when a file works with a relative path.

can u help me? plz i need the correct code to put in my flash file, and got another question, when i change the contents on the TXTfile and upload it again , theres a way that an user who got the previous txt file (and got it on the webcache),across my flashMX file uploads and update the content on the dynamic datafield or this is done dynamically by my SWF ?

PLZ HELP ME ASAAAAAAAAP
Thx

Regor Do Spika

Save To Text Locally
Hi Guys,

I was wondering how you could get a flash file to pass variables say from a dynamic text box to a text file on a local directory (not on a server) I know you can do it through ASP or php but they are server sided applications. I think there is a java alternative, but I havent been able to find anything.

Any help would be greatly appreciated.

Thanks

Text Shows Up On One Server, Not The Other
I am running the exact same movie on two different servers. On one of them it works fine. In the other it doesn't. The main movie uses a MovieClipLoader to load in another movie at one point. The second movie has some static text in it and that's it for now. The movie loads fine in the first one and the text is there. In the second server, the movie loads (the onLoadError event is never called, and the onLoadInit event is called when it's finished), but the text inside doesnt show up... anyone know why that might be?

Thanks!
Kyle

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