I'm tired I need sleep, so I will post this now, and go to bed, hoping for
an answer in the morning or to come to me during sleep.
I created a text box, using the "Text Tool" and made it roughly the size I
needed it to be.
I then set it to "Dynamic", gave it an instance name of "parchmentHTML"
I put this in my actionscript
parchmentHTML.html = true;
myHTML = new LoadVars();
myHTML.onLoad = function (success) {
if (success) {
parchmentHTML.htmlText = myHTML.varOne;
}
}
myHTML.load("./home.html");
made my "home.html" file contain this
varOne=<p align='left'><font size='8'>Date: October 4th 2003<br>Time: 19:42
CST</font><br><font size='12'>This is very first test posting of the dynamic
text ability done
in flash.</font>
Now it pulls up fine but there are no scrollbars (even after adding a ton
more text).
So I do some research and see I need (or at least think I need) to use a
TextField component to make scroll bars work? Or can i just use,
on(Release){
parchmentHTML.scroll += 1;
}
?
Which is the better method? Which is the more professional method?
I have a feeling I am stepping into a world of hurt...
This is in Flash 2004
lokki
Oct 5 2003, 03:59 AM
Have you looked into creating the textbox on the fly?
Also, I didn't see anywhere in your code that you are asking for a scrollbox
to actually appear... dunno if the code is built to do that automatically =
So... you'll have to look up how to dynamically include a scrollbar. Here's
what I did for a similar thing in MX
if ( news_txt.textHeight >= 150){
initialization={_targetInstanceName:"news_txt",horizontal:false}; // set
parameters for scrollbar
this.attachMovie("FScrollBarSymbol","XMLScrollbar",2,initialization);
XMLScrollBar._x=(news_txt._width+15);
XMLScrollBar._y=(news_txt._y-9);
XMLScrollBar.setSize(news_txt._height+15);
XMLScrollBar.setScrollProperties(2, 0, news_txt.maxscroll+10);
XMLScrollBar.setScrollPosition(0);
XMLScrollBar.setStyleProperty("highlight", 0xffffff);
Note that this looks to see if the height of the text box is sufficient to
require a scrollbar, and only adds one if necessary. I also called the
textbox dynamically, then populated it with the necessary text from an
external file. I will say, though, that I am having trouble getting the text
to wrap properly, so if you try this and get the same result, we'll both be
in the same boat.
Good luck!!
-lokki
G.Schiebl
Oct 5 2003, 07:11 AM
i have a very easy way for you, because i had that problem too. so the trick
is
to create 2 buttons (one for up the other for downscroll). then you make
transform the buttons into a movie with 2 timelines and two pictures.
so in the first you write this "=-1" stuff as well as in the one on the
other timeline.
so it works like a film which is running continuously. so when you press one
button
a film runs that is scrolling down. the film is the loop. hope you
understood the princip , because i am not that good in explaining technical
things.
cu
"GB" <[Email Removed]> schrieb im Newsbeitrag
news:blo1n1$mv4$[Email Removed]...
QUOTE |
I'm tired I need sleep, so I will post this now, and go to bed, hoping for an answer in the morning or to come to me during sleep.
I created a text box, using the "Text Tool" and made it roughly the size I needed it to be.
I then set it to "Dynamic", gave it an instance name of "parchmentHTML"
I put this in my actionscript
parchmentHTML.html = true; myHTML = new LoadVars(); myHTML.onLoad = function (success) { if (success) { parchmentHTML.htmlText = myHTML.varOne; } } myHTML.load("./home.html");
made my "home.html" file contain this
varOne=<p align='left'><font size='8'>Date: October 4th 2003<br>Time: 19:42 CST</font><br><font size='12'>This is very first test posting of the dynamic text ability done in flash.</font
Now it pulls up fine but there are no scrollbars (even after adding a ton more text).
So I do some research and see I need (or at least think I need) to use a TextField component to make scroll bars work? Or can i just use,
on(Release){ parchmentHTML.scroll += 1; } ?
Which is the better method? Which is the more professional method?
I have a feeling I am stepping into a world of hurt...
This is in Flash 2004
|
thanks for the advice!
yes they did away with the scrollbar component in 2004 :(
"lokki" <[Email Removed]> wrote in message
news:blo534$q0p$[Email Removed]...
QUOTE |
Have you looked into creating the textbox on the fly?
Also, I didn't see anywhere in your code that you are asking for a scrollbox to actually appear... dunno if the code is built to do that automatically =
So... you'll have to look up how to dynamically include a scrollbar. Here's what I did for a similar thing in MX
if ( news_txt.textHeight >= 150){ initialization={_targetInstanceName:"news_txt",horizontal:false}; // set parameters for scrollbar this.attachMovie("FScrollBarSymbol","XMLScrollbar",2,initialization); XMLScrollBar._x=(news_txt._width+15); XMLScrollBar._y=(news_txt._y-9); XMLScrollBar.setSize(news_txt._height+15); XMLScrollBar.setScrollProperties(2, 0, news_txt.maxscroll+10); XMLScrollBar.setScrollPosition(0); XMLScrollBar.setStyleProperty("highlight", 0xffffff);
Note that this looks to see if the height of the text box is sufficient to require a scrollbar, and only adds one if necessary. I also called the textbox dynamically, then populated it with the necessary text from an external file. I will say, though, that I am having trouble getting the text to wrap properly, so if you try this and get the same result, we'll both be in the same boat.
Good luck!!
-lokki
|
Awesome, thank you. I was thinking about this last night and figured this
would be a good way to do it also but I am so interested in the automated
bars that I am going to dig deeper in to the alternative.
"G.Schiebl" <[Email Removed]> wrote in message
news:blojnd$cjf$01$[Email Removed]...
QUOTE |
i have a very easy way for you, because i had that problem too. so the trick is to create 2 buttons (one for up the other for downscroll). then you make transform the buttons into a movie with 2 timelines and two pictures. so in the first you write this "=-1" stuff as well as in the one on the other timeline. so it works like a film which is running continuously. so when you press one button a film runs that is scrolling down. the film is the loop. hope you understood the princip , because i am not that good in explaining technical things.
cu
"GB" <[Email Removed]> schrieb im Newsbeitrag news:blo1n1$mv4$[Email Removed]... I'm tired I need sleep, so I will post this now, and go to bed, hoping for an answer in the morning or to come to me during sleep.
I created a text box, using the "Text Tool" and made it roughly the size I needed it to be.
I then set it to "Dynamic", gave it an instance name of "parchmentHTML"
I put this in my actionscript
parchmentHTML.html = true; myHTML = new LoadVars(); myHTML.onLoad = function (success) { if (success) { parchmentHTML.htmlText = myHTML.varOne; } } myHTML.load("./home.html");
made my "home.html" file contain this
varOne=<p align='left'><font size='8'>Date: October 4th 2003<br>Time: 19:42 CST</font><br><font size='12'>This is very first test posting of the dynamic text ability done in flash.</font
Now it pulls up fine but there are no scrollbars (even after adding a ton more text).
So I do some research and see I need (or at least think I need) to use a TextField component to make scroll bars work? Or can i just use,
on(Release){ parchmentHTML.scroll += 1; } ?
Which is the better method? Which is the more professional method?
I have a feeling I am stepping into a world of hurt...
This is in Flash 2004
|
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.