View Full Version : Is the loaded text completely loaded ?
Ricod
11-05-2001, 11:17 AM
How do you check this ? I thought about useing a variable like '_root:Loaded = "true";' at the end of the textfile, but that doesn't seem to work ... Anyone ? :(
mad_A
11-05-2001, 12:17 PM
If you are using a function to load the text have a boolean at the end of it that you check for.
It should work with a variable at the end of the text file too.
Use a clip to check for the value of the variable.
pinkaboo
11-05-2001, 12:32 PM
you might also like to check out:
20 ton squirrel's post on swonking text files (http://www.actionscripts.org/forums/showthread.php3?postid=20676&t=4982#post20676)
K
Ricod
11-05-2001, 12:44 PM
I didn't knew about that & in front of yer variable ...
still, one more question ...
how do you get the height of your textbox ?
_root:TextBox._height doesn't work ... I'd like to change it so that when u zoom in the textbox changes to, so you won't have visible lines outside your screen.
mad_A
11-05-2001, 02:33 PM
stick the textbox in a movie clip and get it's height.
You can use maxscroll to get the length/height of the textbox.
not too sure which you want...
Ricod
11-05-2001, 02:57 PM
well, u can set the size, so there's only a specific amount of lines on yer screen. I'd like to change that. I have a report on which u can zoom in, but when u do that, the bottom of the textbox is no longer viewable, so I want the textbox to shrink while the report grows. Thus, the number of lines become less without having offscreen lines ...
mad_A
11-05-2001, 03:16 PM
The easiest way to do it would be to have a textbox of a set widht, and 1 line high off the screen that you put the text into. You then know how long it is (length * maxscroll)
On your textbox you then get it to expand it's width when you aree over the max onscreen text (size of your visible text field less the calculation above).
You'd probably find it easier to just make the text box scrollable when you are over it's size.
Or if you are not tryting to show all the text put a mask over the bottom of the screen so only a fixed amount of text is visible...
hope that si some help[!]
Ricod
11-05-2001, 05:25 PM
no no! The texbox is scrollable, but ... the textbox can be zoomed in on, so the text becomes larger. But then some of the visible lines fall out of the screen, because there are 25 lines visible (out of the 100 lines) So 75 lines are scrollable. But when u zoom into the textbox, 25 lines remain visible, but only 14 are on your screen. So I want to make the visible lines 14, like the amount on your screen. The .maxscroll increases and thus my scroller reduces in size, hence I can scroll all the way to the bottom again, just like when I'm zoomed out.
mad_A
11-05-2001, 06:06 PM
I'm afraid you've totally lost me.
Have you an example online?
Ricod
11-06-2001, 08:19 AM
PLZ goto :
http://www.vanduuren.net/text/flashsite.html
(which will lead u to the new flash page)
Wait for the report to be loaded and the press '2' to go to the only loaded page. (if the scrollbar doesn't resize, please press '2' again ... The &loaded=1 still isn't working so it doesn't work smoothly yet.)
As u'll notice, u can scroll now. But when u zoom in (use the + button for that) U can't really scroll anymore (I put a numlines-- in it to force less lines in code, but it doesn't really work, since the textbox won't actually shrink in lines per screen)
And oh, if u see a red box ... things are definitely going wrong ...
mad_A
11-06-2001, 09:39 AM
Ahh, now see whart you mean.
I still think you can use the textbox in a movie clip, and another one that is one line high.
If you take textholder as the movie that holds the scrollable one, and measure as the one that is only one line long....
then have another clip (just to hold code), also inside the holder with...
onClipEvent(enterFrame){
_parent.textholder._height = (19*_parent.measure.maxscroll)+10;
}
When you zoom the main one, also zoom the measure one, and the clip event will resize it each time.
I think that should work.
A
mad_A
11-06-2001, 09:40 AM
Sorry, one more thing - that code is dependent on the method you use to zoom - what way are you using?
Ricod
11-06-2001, 09:57 AM
I'm scaling from the right upper corner ...
I have 3 frames for continues scaling with an increment of 5 every 2nd frame, thus adding 30% every second.
Ricod
11-06-2001, 10:12 AM
also I still can't get 2 variables in the same textfile to load. .. can't I just use
text=jklajklafkljfklaf etc.
&loaded=1
?? it doesn't work ...
mad_A
11-06-2001, 10:14 AM
then you will need to have the other (measure) one on the same spot - but hidden obviously!
mad_A
11-06-2001, 10:15 AM
for the two variables in the one text field use
textfield = variable1;
textfield = textfield add newline add newline add variable2;
Ricod
11-06-2001, 11:36 AM
Hey ! I don't know what all that 1 line textbox stuff was, but placing the textbox in its MC , outside the report MC solved half the problem ! Thanks everyone ! Now for the other one ...
I still don't know how to put 2 variables in 1 textfile
(so I know it's completely loaded)
U know:
variable1=text text
&variable2="done"
so that's 2 variables in 1 textfile, not 2 variables in 1 textfield.
but then a working one ...
also, how do u actionscript the textsize ...
mad_a check how it is now to see it ...
Thanks BTW ! U've been a great help!
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.