View Full Version : dynamic txt box not showing variable
ztorm
04-24-2002, 07:42 PM
hi everyone,
Does anyone know what will cause a dynamic text box not showing variable assigned? Say if there are no syntax error or spelling mistake?
Actually I tried to create a preloader using getbytestotal and getbytesloaded
other than frameloaded. ---a single frame presentation using mc as containers.
this is the codes I used for frame 1 and frame 2 loop back to frame 1
I supposed all the variables looks pretty clear below, and on the dymanic text box(single line and selectable checked), I used percent_done as var.
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
percent_done = Math.round ((loaded_bytes/total_bytes)*100);
Any suggestion would be appreciated. thanks,
z t o r m
:confused:
Billy T
04-25-2002, 02:26 AM
I think you should change the text box var to "disPerc" and then add another line
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
percent_done = Math.round ((loaded_bytes/total_bytes)*100);
_root.disPerc= percent_done add "%";
see how that goes...
ztorm
04-26-2002, 10:21 PM
Thanks for your reply. Actually I just realized that both framesload and
getbytesloaded have problem when there is a mask on the scene.
Like, all problem will be solved as long as the preloader scene do not have a mask, not even a mask inside a MC. Strange huh?
For instance, the preloader scene have a masked top layer for all other layers below. I also tried to remove the mask, and the loading bar Mc has a mask inside. Then the swf will either not having any number showing on the var txt box, or the MC bar is not showing at all. Just all kinds of weird stuff you can think of.
Then, I totally removed all masks on the preloader scene and all problems are solved. Just that, I find it a little dumb to have 2 scenes for a single frame movie. (all frames are hide inside multileveled MC)
If anyone is interested , just try to have a mask on the preloader layer and you will know what I mean.
Thanks again for ur reply, ^_*
ztorm
Billy T
04-27-2002, 02:57 AM
I had no problems putting a mask in a preloader...
you can't mask dynamic text if that's what you were trying to do...
cheers
ztorm
04-27-2002, 03:39 AM
hi billy,
I just created a small file with 2 dynamic textboxes (1 masked and 1 without).
And 2 loading bar movieclip (masked itself and on a masked layer on the preloader scene) The dymanic txt box that is not masked is showing but the rest of the stuff are not.
Although it shows that dynamic textboxes cannot be placed on a masked layte, the attached file also shows that "nothing" can be masked on a
preloader scene otherwise they will not show.
Take a look at the fla file and you will know what I mean.
Try removing the mask layer and play. then you will see 2 dynamic txt boxes but the bar mc that is masked itself will not show as well.
And that is why I gave up using mask on a preloader scene .... not even a masked mc....
This is just strange.....
Thanks for ur reply billy :)
z t o r m
Billy T
04-27-2002, 03:46 AM
there are multiple problems with that file
first - you don't have anything on the mask layer so nothing will show through....
second- your preloader needs to be in some sort of a loop to keep checking its progess - eg extend the preloader scene to frame 2 and in frame 2 put gotoAndPlay(1);
cheers
ztorm
04-27-2002, 04:01 AM
I checked the file. There is a rectangle on the masked layer. but I checked "view as outline" on the option.
The bar is on the second layer, since it have a mask inside the clip, all you will see is that little white circle on the stage. otherwise, try to make the mask layer invisible, then you will see the second text box inside the masked layer
and the circle of the mc.
as a matter of fact, I thought I have nothing on the mask layer when I just opened it as well , hehe :)
thanks
z t o r m
Billy T
04-27-2002, 04:20 AM
on the main timeline you have 2 layers that are being masked by a layer with no content - it's not it outline mode - its a blank keyframe!
also, your preloader is telling the main timeline to
gotoAndPlay ("loaded");
}
yet there is no loaded frame label.
cheers
Billy T
04-27-2002, 04:25 AM
here is a working version
cheers
ztorm
04-27-2002, 04:41 AM
hi,
I may have forgotten to change gotoAndPlay ("loaded");
to gotoAndStop ("main", 1);
Since the file you attached does not have a mask and the bar has been changed to a shape tween.
I guess my hypothesis is right?
No masks whatsover on the scene if I wish to use framesloaded and
getbytesloaded?
I never try having a masked layer on the "loaded" frame on the same scene and remove anything else on the getbytesloaded frames yet.
I simply removed anything with a mask and leave the preloader on a different scene. Just like what you did on the attached file.
But I didn't know about the problem and had a fake preloader on my website for a few months...
check my swift 3D site @ http://www.sporeprint.com
Thanks again for ur help buddy :)
z t o r m
ztorm
04-27-2002, 04:42 AM
hi,
I may have forgotten to change gotoAndPlay ("loaded");
to gotoAndStop ("main", 1);
Since the file you attached does not have a mask and the bar has been changed to a shape tween.
I guess my hypothesis is right?
No masks whatsover on the scene if I wish to use framesloaded and
getbytesloaded?
I never try having a masked layer on the "loaded" frame on the same scene and remove anything else on the getbytesloaded frames yet.
I simply removed anything with a mask and leave the preloader on a different scene. Just like what you did on the attached file.
But I didn't know about the problem and had a fake preloader on my website for a few months...
check my swift 3D site @ http://www.sporeprint.com
Thanks again for ur help buddy :)
p.s. Your website is cool by the way :)
z t o r m
Billy T
04-27-2002, 07:39 AM
Hey man
I can assure you that having a mask in your preloader was not the problem (see attached) - your problem was one of the other numerous things I have already mentioned.
I checked out your site but the menu disappeared and wouldn't come back so I gave up
cheers
ztorm
04-27-2002, 10:07 PM
hi
There is a timer for the menu window to collapse. I guess that is due to I am using a slow computer, I looked at how fast it runs on my computer without thinking about the fps. but trust me... the menu will show up if you place ur mouse over again ...
About the mask vs preloader, I am persuaded that mask will work.
Geez.. I am so reckless... you ment the mask layer did not have colorfill just outlines!... no wonder why bar beneath never show... lol
I guess I solved my problem now. before, I had the bar under an outline mask. and the dynamic textbox was under a mask layer with "solid fill"
Thanks a lot for your help billy ... hopefully you wont blame me for being so persistence.. I am just trying to learn... :)
cya
z t o r m
Billy T
04-28-2002, 02:51 AM
ummm in the example you uploaded you didn't just have the outline of a shape - there was nothing on the mask layer - it was a blank keyframe. This is why the bar wasn't showing but the text was (you can't mask dynamic text - http://www.gmf.as/tips/tipfonts3.html)
cheers
PS being persistent is cool just be sure to read people's responses carefully ;)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.