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




Loading From An Html File



I want to load information onto a flash movie from a html file the veriable on the flash movie's name is text.
can someone please help me



FlashKit > Flash Help > Flash ActionScript
Posted on: 04-25-2002, 09:47 AM


View Complete Forum Thread with Replies

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

Small Flash File Loading Into HTML - Weird Sporadic Loading
Hi,

I'm hoping someone can help...

I have a very small Flash file (less than 5k) loaded into a table cell of an HTML page .

On occasion (on Mac/IE) there is a flash of white appears in the table cell before the file starts. On other occasions only a portion of the file appears (while the rest of the cell is white). And at other times, none of the file appears (the table cell that it's in is appears as white).

The background of the flash file is orange (not white) so I guess that means that none of the Flash has loaded. Sometimes when I refresh the page, the problem resolves itself.

Does anyone know what the problem may be? Is there any sort of pre-loading JavaScript that would help, even though the file is very small to begin with?

Thanks for any help, I really appreciate it!

Loading A .css File For A .html File In Textfield
I've done a bunch of tutorials and I managed to load a .html file into a textfield, which has the instance name of myTextField. Now, I am struggling to load a .css file in conjunction with it.

Can someone check out my code and help me?


AS3 code:

function textLoadComplete(event:Event):void
{
myTextField.htmlText = textLoader.data;
}

var textLoader:URLLoader = new URLLoader();
var textReq:URLRequest = new URLRequest("externalhtmlfile.html");

textLoader.load(textReq);
textLoader.addEventListener(Event.COMPLETE, textLoadComplete);

Loading HTML With In SWF File
How would I be able to load an HTML document into a SWF file. I have tried to laod it the same way you would load an swf file into another. I have tried the following command;

loadMovie("http://www.moviename.com","droptarget")

I don't know what else I should try.
someone please help!

Loading Html File In Swf
Hi,
I wanna load a html file into a swf file.Such as If I click a link it will load the linked page into the flash file not replacing the swf file.
Another problem, In a html file , there are 2 frames,left frame & right frame. Left frame load a swf and right load a html file.In the left frame ,the swf file have some buttons,after clicking a button it will load a html file into right frame.How will it work??

Loading .jpg AND Html File
I am not sure how to do this since I am no good at actionscript yet. I have included a screenshot below so you can see exactly what I am looking to do.

Basically I need a flash movie that loads a .jpg file (upper area of screenshot---reddish area) and an HTML file (lower area of screenshot---grey area) at the same time from an external .txt OR xml file. The trick here is then after about 10-15 seconds I need the jpg. to swap out with the NEXT .jpg and at the same time load a NEW HTML file to go with the .jpg. Basically a slideshow with a "news" area below each pic...and I need that area to be HTML so I can define links when needed. I would like to be able to rotate as many "stories" as I need by just changing a few variables. Also, on the very bottom of the screenshot, you will see control buttons. That way a viewer can stop the news story headline if they need to or go back or go forward with the stories. Also I would need a preloader for each jpg (movieclip)??? Right???

Anyhow, I have no idea where to begin, and I cannot find a tutorial that covers this. I tried using the "easy slideshow component" but it still does not have what I am looking for. Can someone throw together a simple tutorial .fla for me with just the placeholders and the scripting along with notes of what to modify and how to write the txt or xml file. I would really appreciate the effort and I would really like to learn what I am doing instead of just throwing a component on the stage.

Here is the screenshot:



peace out,
daddy

Loading SWF File Into HTML
I finished my flash website, I now want to load it into html,

after I Click on file, publish, ect. I now have a HTML file.


What I want to do is the following..

I want to center the swf movie, and I need to change the back ground color.

Should I just put the SWF into a table or div, position it, and set the back ground color..


OR .... is doing all the above the way I mentioned the hard way, is there a better way..

THanks

Adrien

Loading HTML From An XML File
I'm trying to load news from an XML file

Here is my code:

XML_Noticias.onLoad = function()
{
//System.useCodepage=true;
Noticia=new Object();
for(i=0; i<this.firstChild.childNodes.length; i++)
{
var News=new Object();
News.Title=this.firstChild.childNodes[i].attributes.title;
News.Description=this.firstChild.childNodes[i].attributes.description;
All_news.push(News);
}
NewsCount=All_news.length;
this.ShowNews(0);
}

The XML file content is:
<?xml version="1.0" encoding="UTF-16"?>
<NewsList>
<News title="Some text" description="Another text"/>
</NewsList>

At this point, everything goes right.. but if i change the XML content:
<?xml version="1.0" encoding="UTF-16"?>
<NewsList>
<News title="Some text" description="Another text <a href='www.google.com'> Click here </a>"/>
</NewsList>

If I include character ">" or character "<"... the XML file is not readed correctly... it results in a undefined value... What i'am doing wrong??
Anybody knows what is happening?

PD: if htmlText property is asigned inside Flash, the link is showed properly.

Thanks

Loading An HTML File With AS2
I am trying to load an external HTML file from a button with AS2, this is what I have....

on (release) {
loadMovieNum("MainPage.HTML", 0);
}

this actionscript is on the button. Any help would be great. thanks

Html In Loading Txt File
ok i need to have a txt file loaded into a dynamic textfield, with the scroll bar ui component controlling it. for some reason this is a problem any tutorials or ideas guys? highly appreciated

SWF File Loads Only After HTML Is Done Loading?
i have an html page with a .swf file in it. however, I want ALL the data, images, and text in the html page to load first, and only then have the swf file begin loading.

Reason is: swf file is fairly large and client wants the html information to load first, and not for the whole page to be bogged down by the swf file loading.

Is this possible? Are there actionscript commands that allow a swf to interact with html in this manner?

thanks

alex

Dynamically Loading HTML From A Txt File?
Hey there.
I'm loading text from a txt file using load variable, but the text ends when it encounters HTML code like "a href="">blah</a>

Text options are set to dynamic, multi-line, html and selectable....

The txt file has only the text and a couple of links...

What am I missing?

Loading Ext Html File Into Text Box
Hiya all
can this be done?
I would like to import an external html file into a text box in my flash movie.
Anyone know of a good tuit or can help me?
cheer in advance
michael on mac

Loading An HTML File On A Swf Frame ?
I would like to know if it is possible to load an html
file into a flash movie on a specific frame.

to see what I mean go here..

http://www.infinitydesigns.ca/flash-tech

I want to load the html file onto the bigger of the
two grey screens. eventually I will load another one
to the smaller screen aswell. If this is not possible
is it possible to load a new swf file to that location ??

I want them to load with a on Mouse event...

Thanks in advance for you help !!

Cheers !

Loading A HTML File On Level 1.
on (release) {
loadMovieNum ("filename.swf", 1);
}

The above action make the SWF file loading on level 1.

I want to make a HTML file loading on level 1.

For example,
on (release) {
loadMovieNum ("filename.html", 1);
}

The example doesn't work.
Can you help me to work it?

Loading Variables From The HTML File
Hello,

I've created a flash menu banner, that loads different HTML pages on the same window.
I'd like to use the same flash for every pages, changing the title by loading a variable in the HTML.

Thanx for telling me how to put variables in the HTML and how to load them

Loading A Swf From An External Html File
Hi flashers,

I have a news feed that is an external html file that loads into my main flash movie. Does anyone know a way that I could put a link in the html that would load a swf in my movie (a la www.praystation.com's news feed)?

Thanks

Loading An Html/txt File Within The Flash
Hi, Im creating a little website and this is the first time Ive used flash for it, and I had a question.

I have the layout, and I have a textbox within it where I want all my pages to load. So I want when they click news, the news.html/txt goes into that textbox ... and then when they click main, the main.html/txt goes into the textbox.

I want it like this so it never has to reload the flash.

Thanks for the help!

Loading An Html/txt File Within Flash
Hi, Im creating a little website and this is the first time Ive used flash for it, and I had a question.

I have the layout, and I have a textbox within it where I want all my pages to load. So I want when they click news, the news.html/txt goes into that textbox ... and then when they click main, the main.html/txt goes into the textbox.

I want it like this so it never has to reload the flash.

Thanks for the help!

Loading An Html File Then Formatting With Css...
hello this has been bugging me for a while now i was wondering if any one can help me, i'll try and explain it the best i can...

i am trying to load in an html (will be a php file once its up on the server but just for ease its an html file) the use a css file to format it. the code i has is as follows :

var CSSformat = new TextField.StyleSheet();
var CSSpath = "home.css";
format.load(CSSpath);
format.onLoad = function(loaded) {
if (loaded) {
home_mc.home_txt.styleSheet = CSSformat;
home_mc.home_txt.htmlText = loadHTML();
} else {
home_mc.home_txt.htmlText = "unable to load css file.";
}
};

function loadHTML() {
var home_lv:LoadVars = new LoadVars();
home_lv.load("home.html");
home_lv.onData = function(home:String) {
if (home != undefined) {
return home;
} else {
return "<p class='one'>unable to load html file.</p>";
}
};
};

i have a feeling it may because i'm loading the html after i've loaded the css but ive tried it other ways and it doesn't seem to work either so this was a last resort.

i have also tried: home_lv.onLoad = function(home:Boolean) etc.
but that didn't work...

sorry this is such a long post but i'm pretty stuck, i can't seem to see the wood for the trees (so to speak).

thanks in advance
Al

Loading An Html File With Css To Format
hello this has been bugging me for a while now i was wondering if any one can help me, i'll try and explain it the best i can...

i am trying to load in an html (will be a php file once its up on the server but just for ease its an html file) the use a css file to format it. the code i has is as follows :

var CSSformat = new TextField.StyleSheet();
var CSSpath = "home.css";
format.load(CSSpath);
format.onLoad = function(loaded) {
if (loaded) {
home_mc.home_txt.styleSheet = CSSformat;
home_mc.home_txt.htmlText = loadHTML();
} else {
home_mc.home_txt.htmlText = "unable to load css file.";
}
};

function loadHTML() {
var home_lv:LoadVars = new LoadVars();
home_lv.load("home.html");
home_lv.onData = function(home:String) {
if (home != undefined) {
return home;
} else {
return "<p class='one'>unable to load html file.</p>";
}
};
};

i have a feeling it may because i'm loading the html after i've loaded the css but ive tried it other ways and it doesn't seem to work either so this was a last resort.

i have also tried: home_lv.onLoad = function(home:Boolean) etc.
but that didn't work...

sorry this is such a long post but i'm pretty stuck, i can't seem to see the wood for the trees (so to speak).

thanks in advance
Al

Movie Not Loading Through Html File.
I am using flash 8 professional

I am attemtping to have 3 seperate movies load within a single swf file when certain buttons are rolled over.

The movies load correctly if I open the main swf file directly. But when I view the main swf file within a html file the main swf file loads, but none of the movies load, initially or through rollover. I would appreciate any inisight as to what I may be doing wrong.

This all works if the html and swf files are on the same level. Currently I have the index file residing on a top level and the swf files in a folder called assets. The main .swf file loads, but none of the movies that the main swf file targets load. Its just blank

The code I am using is as follows:

loadMovie("stage1.swf", "emptybox");
emptybox._x = 0 ;
emptybox._y = 0 ;

but1.onRollOver = function () {
loadMovie("stage1.swf" , "emptybox");
emptybox._x = 0 ;
emptybox._y = 0 ;
}

but2.onRollOver = function () {
loadMovie("stage2.swf" , "emptybox");
emptybox._x = 0 ;
emptybox._y = 0 ;
}

but3.onRollOver = function () {
loadMovie("stage3.swf" , "emptybox");
emptybox._x = 0 ;
emptybox._y = 0 ;
}

Loading Different Swf File In Same HTML Page?
Hi all,

Would appreciate any tips/examples - I am basically trying to work out how this is done:

I have a html page with a flash swf, when you click on a html pop up button or any button on the page it will load a different swf file replacing the previous swf without loading up a whole html page.

Hope i make sense here.. Thanks for your time.

Loading An External Swf Into Another HTML File
Hi.. okay I'm hoping this isn't too tricky, but I looking for a script that when I button is clicked, it loads another HTML page in which is a flash movie that has a placeholderclip, depending on which one of 3 clips I want to load..

So can my button call for an HTML page and specify which external swf should be loaded into it's placeholder clip?

Loading Stretching Swf File To Html
hi

i have created stretching swf but i dont no how to load it to html i mean i want it like this
http://www.wiliam.com.au/services-wi...firm-australia

if u check this page when u swith the screen resolution that flash file get stretch acording to the resolution & another thing is on top of flash it has html
links, i tried to do this trick with Z-index but its not working

please help me...........
Thnx!

Loading Stretching Swf File To Html
i have created stretching swf but i dont no how to load it to html i mean i want it like this
http://www.wiliam.com.au/services-wi...firm-australia

if u check this page when u swith the screen resolution that flash file get stretch acording to the resolution & another thing is on top of flash it has html
links, i tried to do this trick with Z-index but its not working

please help me...........
Thnx!

Loading A Html File Into Flash
Hello:

I need information how to load a html file into
flash. I am employing the instruction:

loadVariable

arbfile.hml

target, mc

this dose not render the response I want, however,
could someone please give me the procedure to do
this. I am sending the information in this file to a
dynamic text file.

Kevin

HELP Loading Html File Into Holder?
ok here goes! I want to have an html file to open into a holder in my "results.fla" page. After this I will be having this page (result.swf)containing my html file open into a movie clip holder on my main page.
can someone help me???
thx!
Scooba

Loading Txt File With Html Tags
hi,

can I load external text file with html tags into flash?

For example:

There is a text filed with declared html tags such as bold, italics, size, font and other simple tags. After loading the text file into the rendered html text field in flash, its loading the text and html tags as string.

Is there any way to go for this?

thanking you,
Prathap

Loading A Txt File Translating Into Html
I'm trying to load text from an external .txt file but also using the html future a href so the admin may insert links in his flash movie. It's not working.

Here's my FLA:

download fla i have a problem with

Problem Loading External Html File
I'm having a problem loading external documents into my SWF.

On a fast connection, or locally, the external document always loads into the text field correctly. However, if the SWF is loaded over a slower (modem) connection, the document doesn't always load.... the text field is left blank. This is odd, as if I refresh or exit and then go back to the page that's loading the external file, it will eventually load.

Has anyone else run into this problem? How can I ensure that the external file always loads correctly?

Loading An Html File In Flash Textbox
How can I load an HTML file in a flash text box, specially the tables in html that has to be incorporated

Thanx

Troubles With Loading External Html File
First off I have alot of text I need to have scroll.

I've decided to use 7 buttons to navigate through the text. I had hoped to use the .html document I created in Dreamweaver however Flash doesnt support some of the html tags. Each time i try accessing my dynamic text I see the tags in the scroll window! Which brings me to my first question.

Is there anyway to save convert the .html to a html file flash will like?

Loading .html File Into A Movie Clip
Can an html file be loaded into a movie clip? I'm using the getURL command from an MC that will be the source content for a scrollbox. When I test this, the url is loaded into its own window and not within the MC. How can I do this? Any help would be greatly appreciated!

I Could Really Use Some Help Loading An External HTML / Text File
So the code i am currently using works well, the only think i need to change is instead of the text box displaying whats in the "quotes" i need it to pull in an external html file for easy maintenance.

The code was taken from the kirupa hover caption tutorial, and i changed it a bit to work the way i needed it to.

Here is a snippet of my current code:


Code:
s1.onRollOver = function() {
captionFN(true, "Text to be loaded", this);
this.onRollOut = function() {
captionFN(false);
};
};


captionFN = function (showCaption, captionText, bName) {
if (showCaption) {
_root.createEmptyMovieClip("hoverCaption",this.getNextHighestDepth());
cap.desc.htmlText = captionText;
cap._alpha = 75;

if ((sName._width+sName._x+cap._width)>Stage.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};



} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
So, i simply need to replace "Text to be loaded" with and external html file somehow.

Thanks for helping

[F8] Loading XML File From A Different Dir Then HTML Page Using Vars
I am trying to load a picture rotator swf and xml file from a different directory then the html page. When they are all in the same directory it works but when I try to use flashvars and put them in different directories it does not.
This is my current code in the fla doc:

PHP Code:



var images_xml:XML = new XML();
images_xml.onLoad = startImageViewer;
images_xml.load("images.xml");
images_xml.ignoreWhite = true;




This is my code for the html page:

PHP Code:



<embed src="images/midadvert.swf" quality="high" bgcolor="#000000"
width="659" height="399" name="slideshow" align="middle"
allowScriptAccess="sameDomain" allowFullScreen="false"
type="application/x-shockwave-flash"
flashVars="images_xml=http://pathtofile/images.xml"
pluginspage="http://www.macromedia.com/go/getflashplayer" />




The swf and xml are in same directories. Is there anything wrong with my code?

Loading Text From A .txt File, Not All Html Works...
i can use text formatting tags, but an image (<img src="">) tag will not work.

does anyone know how to incorporate images in the .txt file output?

thanks!

Loading Html From File Into Several Text Fields
I'm making a four column layout with four dynamic text fields and text that loads from a html file. The structure of the site and which html file is to be loaded on which page is specified in xml, but the actual content on each page needs to be editable in separate html files (different people will do the editing, and I don't want them to go around messing with the structure).

The problem is that I need the four columns of text to be loaded from a single html file. I was thinking that I could make four paragraphs <p>paragraph1</p><p>paragraph2</p> etc., one for each column, but how do I load them each into a separate dynamic text field?

It would be great if someone could give me some pointers on how you could do that.

Loading Html Data From A Text File
i have a code that will load text from a text file and put it in a dynamic text field:

loadText = new loadVars();
loadText.load("main.txt");
// creating the loadVarsText function
loadText.onLoad = function() {
Content.text = this.start;
};

Thats good and all but, i want it to load it and process it as html cause i was going to put this in the text file(main.txt)...


Hello, contact me at <a href="me@myserver.com">My Email address</a>

I dont want it to say exactly that, i want it to say it as text with a link, i dont want to make the text filed html like that button does becuase it goes all white and i want the background like there would be on a text field,

Note: this text field is dynamic

Loading Images Or Html From Swf File To A Brower From A Cd
I was duin a CD project for someone that involved images. I wrote the code alot of times debugged it but still wouldnt work. I tried the same to an external photo gallery but it only loaded the brower without any display of the index.html file i wanted it to load. Please help me load files fron flash to a brower especially images, html files and audio files.
PLs hELP

Loading Text From A .txt File, Not All Html Works...
i can use text formatting tags, but an image (<img src="">) tag will not work.

does anyone know how to incorporate images in the .txt file output?

thanks!

Loading A .swf File Full Screen From A .html Page
Ok my problem is I have a html page that im using to direct users to 3 other pages (each with a seperate link) each of the links need to load a .swf movie in a full screen flash player window... the .html file will be the index.html and the rest have seperate names for their associated sites...

is there any way to do what i am wanting to do? Thanks! =)


jonathan

Loading Variables Embedded In Html Page Containing .swf File
Based on a key code sent out in email messages, variable values will be determined by a data source match and can be written in ASP in the embed or object tag parameters of the page that contains my .swf file. How can I acces these variables using Actionscript?

thanks in advance,

Sean

Loading An External HTML File/Antialias Text OFF
Is it possible to load an external (same directory) HTML file into a specified area of a SWF file? If not...is it possible to load the external txt file with variables within the external txt file to call for an external image to show? (christ....I've even confused myself with that explanation)

and how the hell do you export a movie so the antialias text is off? not liking the fuzzy look! Just 'unticking' the antialias in the menu does NOT work!

Loading Tex From External Txt Or Html File And Image Question - Please Help
I have a template from templatemonster, (a full flash template) and I wanted to know what do I do or what kind of tags do I use so the text loads from an external txt file and likewise so that the images load from an "image" folder?

I have never done this before so bear with me here. I am assuming that the text needs to be changed to dynamic, but thats where my educated guessing ends lol

Component Height, When Loading Html Text From Xml File
Hi.

I'm creating components based on variables that I read from an xml file.

I'm having dififculties in determining the height of a component, because it appears that flash hasn't got enough time to draw the component before next component is already red from xml.

Any ideas?

for i.e.
Can I stop reading xml at some point in the middle of it?

Loading An HTML And Calling For An External Swf File To Load
Hi.. okay I'm hoping this isn't too tricky, but I looking for a script that when I button is clicked, it loads another HTML page in which is a flash movie that has a placeholderclip, depending on which one of 3 clips I want to load..

So can my button call for an HTML page and specify which external swf should be loaded into it's placeholder clip?

Loading External Html File Into Swf With Scrollbar Within A Text Box?
Hi all

I am completely tearing my hair out over this one, and I really really would appreciate any help

I'm trying to load an order form into a swf I have made using an external txt file containing all the html coding for the form. I need to load it within a specific section of the swf, so have created a text box using the text tool. Also, as the form is larger than the space on the swf, I have made it dynamic text and used the scrollbar component.

I have followed the tutorials provided here:

http://www.kirupa.com/developer/mx/dynamic_scroller.htm

and here:

http://www.macromedia.com/support/fl...ng_text_mx.htm

... but with no luck. In fact, even when I follow the Kirupa tutorial _word_for_word it STILL doesn't work!

Is there any easy way to do this? Can I just load an ordinary html document into a swf or must it be a plain text file? If so, how do I do it??????

Current actionscript is:

loadVarsText = new loadVars();
loadVarsText.load("external.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace ("done loading");
scroller.html = true;
scroller.htmlText = this.var1;
}else{
trace ("not loaded");
}
};


The external.txt file is just the html copied and pasted from my html form but with the words "var1=" at the top of the page.

Really would appreciate any thoughts!!

Kristen.

Loading External File HTML Tags Into Flash ?
hello all

i am trying to load an external .txt file that containes HTML tag into a dynamic text field (with scroll bar).

i used all of the code previously posted on this forum and my final code is:


ActionScript Code:
loadText = new loadVars();statement.html = trueloadText.load("../Photos/199805032.txt");loadText.onLoad = function() {            statement.htmlText = this.message;};


statement is the instance name of my text field the problem is that all the text in the txt file that is included in HTML tags such as < B > < /B > is not showing when the movie is running

while the text which is not included in any text field is showing properly.

External Html File Loading .swf Into Another .swfs Level?
Hey there,

I'm kind of new to actionscripting and webdesign. A print designer for quite a while but that doesn't help when it comes to actionscripting. Anyways what I want to know is if there is anyway to load a SWF into a level in a different SWF file, using an external html file.(actually the html file is being dynamically loaded into the that same swf file). It's a news page and the client wants to be able to update it easily, thus the loading of text file but he also wants to be able to easily link to the swf that harbours the content. I'm not even sure if this all makes sense or if it is at all possible but any direction would be greatly appreciated thanks.

Scott.

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