-
Newbie Needs HELP Trying To Display News in Flash.
Hi, all!
In this template, the News scene displays some text that comes from a file called text.txt. And there's some buttons on the right, but they do nothing.
I want each button to be a different news article, as I think that's what the template was designed for.
Here is .fla
Here is .txt
please tell me what i can do.
ps. I liek donuts.
Last edited by Brinnie; 07-09-2005 at 04:07 PM.
-
ooops, my URL's were'nt working.
okay, all fixed now!
Last edited by Brinnie; 07-09-2005 at 04:09 PM.
-
Can't Re-Member
what you want to do is attach code to each button to load a different text file into the dynamic text box. such ascode:
on(release){
this.loadVariables("newtext.txt");
}
on(release){
this.loadVariables("newtext2.txt");
}
then you just need to make sure you start each text file with the appropriate variable so it displays in the box.... so start each .txt file with text=.
hope that helps...
-
that helps
Would you be so kind as to give me the steps to do this?
-
Can't Re-Member
i gave them to you in the post.... just click on each button that you have created a text file for..... and add the actionscript i wrote above to each button...just change the name of each .txt file to reflect the text file you create for each news item...
-
I did that.
I highlighted the button and put in the actionscript code and created the corresponding text file and got nothing.
Did you even look at my fla?
-
Can't Re-Member
yes i did look at your FLA.... i'll have another look and see if i can get it to work for you...
-
Can't Re-Member
ok... it's fixed.download the file from here text files should be named text.txt
Code:
content=omg, text!
testing text
looking good. :)
In this template, the News scene displays some text that comes from a file called text.txt. And there's some buttons on the right, but they do nothing.
I want each button to be a different news article, as I think that's what the template was designed for.
In this template, the News scene displays some text that comes from a file called text.txt. And there's some buttons on the right, but they do nothing.
I want each button to be a different news article, as I think that's what the template was designed for.
In this template, the News scene displays some text that comes from a file called text.txt. And there's some buttons on the right, but they do nothing.
I want each button to be a different news article, as I think that's what the template was designed for.
-Brinnie
and text2.txt:
Code:
content=what you want to do is attach this code to each button to load a different text file into the dynamic text box. such as this..
actionscript:
on(release){
this.textPane.loadVariables("text.txt");
}
//
on(release){
this.textPane.loadVariables("text2.txt");
}
//
on(release){
this.textPane.loadVariables("text3.txt");
}
then you just need to make sure you start each text file with the appropriate variable so it displays in the box.... so start each .txt file with "content="... that is the NEW variable name i assigned to the text box...
hope that helps...
if you create those two files and save them into the same directory as your fla....it will work fine.
-
Thank you.
i'm going to try and see if I can duplicate the changes in which you have made now.
-
Thank you, madzigian.
Is there any other edits you made besides adding action script? Because on my copy I can't do it.
On your copy, I can add text files all day long. But the one I'm working with now has been heavily modified since I posted for help.
-
Can't Re-Member
yes... i made a few changes.... first go to the dynamic text box in the news section. now delete the actions attached to the movieclip containing the dynamic text box. put this in the actions layer (top layer)
Code:
stop();
this.textPane.loadVariables("text.txt");
now click on the movieclip containing the text box.... and give it the instance name "textPane" (i assume you're using at least Flash MX)
now edit the movie clip containing the text box...... in your property inspector, change the variable name from what ever it is ("text" i think).... to "content" (without the quotes).
that should be it.....
-
-
Can't Re-Member
glad i could help... good luck with the rest of your project!!!
-
Well, maybe you can help with that too.
My next mission is to get it to accept html. I really only want to add links and stuff.
After I learn that, I want to learn how to make it accpet php includes, so I can syndicate my news... Kinda sucks having to update the swf every day. :-\
But first things first, do you know how do HTML on this?
-
Can't Re-Member
this scroller will load an html txt file in for you...
there is no need to update the swf every day... just change your external text file. once you publish your swf.... leave it. just update your text file. if you just want to add links... why not use a list box? or, check out this.
-
Originally Posted by madzigian
this scroller will load an html txt file in for you...
there is no need to update the swf every day... just change your external text file. once you publish your swf.... leave it. just update your text file. if you just want to add links... why not use a list box? or, check out this.
What do you mean by list box?
See in the end, what I want, is to have it to pull the latsest news topics from my forum.
-
Can't Re-Member
that's getting a little over my head. I would ask one of the gurus how to accomplish such a task. there's more back-end stuff there than i would know how to handle.
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
|