Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with preload 1

Status
Not open for further replies.

disfasia

Programmer
Apr 20, 2001
378
CA

There is a problem with the preloader that I have borrowed here. The loading bar works but the words "loading" and "loading complete" are not working.

Why is this~?

thanks

disfasia
 
Did you put this 2 lines of code

Code:
_level0.filmisbeingloaded = 0;
stop();

on the first frame of image.swf as i told you a few posts above? If not I don't doubt nothing loads... :)

regards

tektips.gif
 
yes, i did thanks. i noticed you put this into the loading mc...but the original .fla which had two frames, the second fla opens. in the last version you made, it does not open or load anything??

best


disfasia
 
Sorry, I can't quite catch the message of that...
Could you try to explain in other words, please?

regards

tektips.gif
 
Sure :) In the first frame of the main timeline you have one frame with a stop; inside the mc you put:
onClipEvent (load) {
loadMovie("image.swf", _root.clipholderfake);
_parent._parent.stop();
this._xscale = 0;
openwindow = 1;
_level0.filmisbeingloaded = 0;
}
onClipEvent (enterFrame) {
if (_level0.filmisbeingloaded == 1) {
total = _root.clipholderfake.getBytesTotal();
geladen = _root.clipholderfake.getBytesLoaded();
percent = Math.round((geladen/total)*100);
this._xscale = percent;
_root.showpercent = percent+" %";
trace(percent);
if (percent == 100 && openwindow == 1) {
_root.clipholderfake._visible = 0;
getURL("javascript:NewWindow=window.open('image.html', 'newWin','scrollbars=no,status=no,width=810,height=600');NewWindow.focus();void(0);");
trace("ready");
openwindow = 0;
_parent.gotoAndStop(2);
}
}
}
one problem i notice is that there is no 2nd keyframe in the main stage? i am playing with what you uploaded to make it work because the if 100% and open the javascript swf does not happen.. disfasia
 
The _parent.gotoAndStop(2) doesn't address the timeline but the preloader. the second frame of the preloader is an empty one. so, when I make the preloader go to frame 2, he disappears.
...but I guess that is not what you wanted to know...

If you want you can send me your email-address on firegambler_tek_tips@hotmail.com and I'll send you my phonenumber, so you can call me and we can check the whole thing sitting in front of the files.
I think everything is getting quite messed up now although it might be solved in a 5 minute talk.

(and please make an upload of your latest image.fla)

regards

tektips.gif
 
Well, in order to have some semblance of a private life, I chose, when I moved here in January, not to have a phone in my house since I live online for my work, etc. But I will upload what you sent me here:


in case you see why the file does not load up?

thanks again,

disfasia
 
That's nice but can you please upload IMAGE.FLA?
Furthermore the code in this file looks exactly like the one I used, sorry for that :).

I assume the reason why it doesn't work yet is the way the line of code I wrote a few posts before is implemented into image.fla

regards

tektips.gif
 
Sorry, I get a "Page cannot be displayed". Are you sure the link is correct?

regards

tektips.gif
 
That is how image.fla should look like:

disfasia.jpg


See the actions on the first frame?
The first line of actionscript misses in your file. This is the reason for your latest preloader troubles.

regards

tektips.gif
 
Yes, thanks--I feel stupid..but I figured it out! Very stupid I feel...I kept focussing on the first .fla

best
disfasia
 
Actually no it doesn't ..but I didn't have the hear to say so. I put that code in the 1st frame of the images.fla and tried it out...nothing happends....argh!!

????
:)
 
Ok, I admit that I finally reached a certain degree of stupidity.

Of course the two lines in image.fla must be:
Code:
_level0.filmisbeingloaded =
1
Code:
 ;
stop();

Sorry for that.
Now I took your photographesfire.fla and your last image.fla,
changed the first line of code in image.fla and here is what I got...
working finally

So changing the variable "filmisbeingloaded" to
_level0.filmisbeingloaded = 1;
should solve the problem for good.


regards

tektips.gif
 
YES!!!! Finalmente! I have been so busy with my research and grant writing and students (etc) that my mind went on strike! Thanks so much!!! It was perfect except the loading bar stayed so I added
_root.preloader._visible=0;
 
Fine, I think I need a therapy now! [3eyes]

I am glad that thinks worked out finally!
(And I guess so are you ;-))

Have a nice Sunday!

regards

tektips.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top