Click to See Complete Forum and Search --> : help with dynamic text - please.
TheEpicJoe
12-24-2005, 07:30 AM
Heya everyone this is my first post. thanks for your help.
All the tutorials I find tell you how to load text into the main time line. How do you load it in to nested time lines :confused:
I am trying to load some dynamic text in to my site and am having an issue. I have the -loadVariablesNum("info.txt", 0);- in the first keyframe of the scene and I know its loading right. if I put the dynamic text box in the main time line it loads fine. but i need it in a symbol inside another symbol and maybe even inside another symbol.
thanks again for your help - joe :cool:
TheEpicJoe
12-24-2005, 07:33 AM
so you can see what I am trying to do you can go to what I am working on. if you click on media and then movies or pictures - in those spaces i want the dynamic text. thanks
http://lapetina.us/NewGrace
_Aerospace_Eng_
12-24-2005, 05:06 PM
Give your dynamic text boxes instance names then reference them in your actions layer. I'll attach the fla file for an mp3 player I made, it pulls the song name from a text file. http://prdesignz.inraged-inc.com/test/songcontrol.zip
You'll need to copy the url and put it in your address bar. The direct link from the forums will take you to another site because I have hotlinking disabled.
TheEpicJoe
12-24-2005, 06:23 PM
when i tried to open the file it gave me the unexpected format message. would you be willing to paste the action script.
_Aerospace_Eng_
12-24-2005, 07:29 PM
Must be because I used Flash 8. I guess you must be using a version less than Flash 8? Can you verify that for me? Here is the actionscript
myData = new LoadVars();
myData.onLoad = function (){
s = new Sound();
s.loadSound(this.thesong, true);
songdata.text=this.songinfo;
loadBar.loader._width=0;
setInterval(getTime,100);
setInterval(videoStatus,100);
};
function getTime(){
theposition=s.position / 1000;
theduration=s.duration / 1000;
amountLoaded=(s.getBytesLoaded() / s.getBytesTotal()) * 100;
totalLoaded.text=amountLoaded;
songtime.text=theposition;
totalduration.text=theduration;
loopme=myData.doloop;
if(loopme == "yes"){
if(theposition == theduration){
theposition=0;
s = new Sound();
s.loadSound(myData.thesong, true);
}
}
else if(loopme == "no"){
if(theposition == theduration){
s.start(0);
s.stop();
}
}
}
function videoStatus() {
amountLoaded2 = theposition / theduration;
loadBar.loader._width = amountLoaded2 * 133.5;
}
myData.load("songs.txt");
vol = 100;
laeuft = 0;
pulsar._visible = 0;
pulsar._xscale = vol + 15;
pulsar._yscale = vol + 15;
stopButton.onPress = function(){
s.start(0);
s.stop();
laeuft = 0;
}
playButton.onPress = function(){
if (laeuft == 0)
{
s.start(0);
laeuft = 1;
} // end if
}
volDown.onPress = function(){
vol = vol - 10;
if (vol < 0)
{
vol = 0;
} // end if
s.setVolume(vol);
}
volUp.onPress = function(){
vol = vol + 10;
if (vol > 100)
{
vol = 100;
} // end if
s.setVolume(vol);
}
This is songs.txt
&thesong=sample1.mp3&songinfo=Hypnotize&doloop=yes
Anywhere you see songdata is the instance name of the dynamic text box that shows the song title.
TheEpicJoe
12-26-2005, 05:49 AM
i am using MX and thanks for the code I think I am getting closer to my solution.