cosbahr
asked on
flash news scroller- automatic scroll
I'd like to create a flash news scroller that loads an external text file. I want it to scroll continuously without scrollbars. I would also like a mouseover color change when the user points to a section of text then and have it change back to the original color on the mouseout.
I've looked at several tutorials but they all seem to incorporate scrollbars. I am able to load the text file in with no problem, but I how do I make it loop and do the mouseover?
Thank you
I've looked at several tutorials but they all seem to incorporate scrollbars. I am able to load the text file in with no problem, but I how do I make it loop and do the mouseover?
Thank you
ASKER
Thank you. I have that part working. How do I make the box scroll continuously and how do I do the mouseover?
To change color when mouse over you must convert this text box as a symbol. Then you can give action script to change color in
on(rollOver){
my_color = new Color(myText);
my_color.setRGB(0x993366);
}
BR Dushan
on(rollOver){
my_color = new Color(myText);
my_color.setRGB(0x993366);
}
BR Dushan
ASKER
Hi should it be a button symbol or movie clip?
It should be a movie clip.
BR Dushan
BR Dushan
ASKER
Hi,
I converted the dynamic text box to a movie clip and named it. I dragged it from the library to the stage. Now it won't load the text file. Am I doing something wrong?
I converted the dynamic text box to a movie clip and named it. I dragged it from the library to the stage. Now it won't load the text file. Am I doing something wrong?
Yes. You must put action script in (point 2.) in the movie clip's first frame. Not in the main movie.
BR Dushan
BR Dushan
ASKER
Hi, Here's what I have. In the first frame I have in the actions
System.useCodepage = true;
myLoadVars = new LoadVars();
myLoadVars.onData = function(_data)
{
if (_data != undefined)
{
myText.htmlText = _data;
} else
{
trace("loading fails...");
}
};
myLoadVars.load("mydata.tx t");
In the second frame I have a movie clip that was made from a dynamic text box and it's name is myText. Are you saying to move the above code to the second frame?
System.useCodepage = true;
myLoadVars = new LoadVars();
myLoadVars.onData = function(_data)
{
if (_data != undefined)
{
myText.htmlText = _data;
} else
{
trace("loading fails...");
}
};
myLoadVars.load("mydata.tx
In the second frame I have a movie clip that was made from a dynamic text box and it's name is myText. Are you saying to move the above code to the second frame?
ASKER
Hi, I did get that to work. The file is now displaying.
Where do I put this
on(rollOver){
my_color = new Color(myText);
my_color.setRGB(0x993366);
}
When I put it in the actions for the movie clip it says it must be a button to use on rollover.
Thanks so much
Where do I put this
on(rollOver){
my_color = new Color(myText);
my_color.setRGB(0x993366);
}
When I put it in the actions for the movie clip it says it must be a button to use on rollover.
Thanks so much
Put that action script to the movie clip, which is in main stage.
(Select your movie clip which is in main movie, then put action script to it.)
BR Dushan
(Select your movie clip which is in main movie, then put action script to it.)
BR Dushan
ASKER
Great, I finally have it. Thanks for your patience. Do you know how I could make the box containing the external file scroll continuously? If not I can post it as a separate issue.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Give instance name as "myText".
2.) Put following action script on you first frame.
System.useCodepage = true;
myLoadVars = new LoadVars();
myLoadVars.onData = function(_data)
{
if (_data != undefined)
{
myText.htmlText = _data;
} else
{
trace("loading fails...");
}
};
myLoadVars.load("mydata.tx
3.) Then create a text file in the same folder name as "mydata.txt" . Then enter the details which you want to show in the txt box.