-
Simple Dynamic Data in ScrollPane
Hi, I am a newbie to using dynamic data in Flash
I am building a site for a client that will have a News
section, where news text will live inside a ScrollPane
and I need to set up the RIA in a way for the company
to update this news text down the line, without them
having me re-authoring it in Flash
What is the simplest, most pain-free way for me to do
this without doing complex database work and do I
need to see if their ISP has specific data/server specs
to facilitate this?
thank you
-
Senior Member
You can load the text from a text file
This is how i do it:
Last edited by random25; 03-25-2006 at 01:44 PM.
If you want to make an apple pie from scratch, you must first create the universe. Carl Sagan
-
FK'n_dog
simplest method is to load a text file, in MX6 i'd use -
Code:
lv = new LoadVars();
lv.onLoad = function(){
news = lv.news;
makeTheNews();
}
lv.load("news.txt");
function makeTheNews(){
mat = new TextFormat();
mat.font = "web"; // Library Linkage ID
createEmptyMovieClip("cl",100);
cl.createTextField("tx",200,0,0,200,20);
cl.tx.autoSize = cl.tx.multiline =
cl.tx.wordWrap = cl.tx.html = true;
cl.tx.embedFonts = true;
cl.tx.htmlText = news;
cl.tx.setTextFormat(mat);
this.attachMovie("FScrollPaneSymbol","pane",1,
{_x:150,_y:110});
h = pane.getPaneHeight();
w = pane.getPaneWidth();
pane.setSize(w+130, h+50);
pane.setScrollContent(cl);
};
in news.txt -
&news=Note ActionScript doesn't update<br>the information inside a for loop<br>until the entire loop is finished.<br> <font color='#FF0000'>Only when the loop is finished</font><br>does the script return control<br>(and the information it has created.)<br><font color='#0000FF'>Note ActionScript doesn't update </font><br>the information inside a for loop<br>until the entire loop is finished.<br><p align='center'>Only when the loop is<br>finished does the script<br>return control<br>(and the information it has created.)&
-
Will try loading text
Thank you kindly for the examples
I will try this out
cheers,
snurg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|