Jump to content


Flash preloader


  • You cannot reply to this topic
12 replies to this topic

#1 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 05 January 2006 - 05:52 AM

hi, i made a preloader that i'm going to use for a web template, but here's the catch. I have a little circle that has a alpha at the start of 0 and the alpha changes along with how much the user has loaded. for example, if 50% has been loaded, the alpha is 50%. This work for a while but now it has went bust and won't work!
Another thing is, once it's loaded up to 100% i want the movie clip to continue playing with in the movie clip instead of jumping to the next frame in the scene. It won't do this this. It just stops and won't go to the next frame in the movie clip.
I've been trying to fix this problem for about 2 hours now, and i'm stumped! can anyone help? I can easily send you a copy of the .fla file if ur confused about the situation.

Thanks, Callum

#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 05 January 2006 - 06:41 AM

just post the code, to have a look at it..

#3 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 05 January 2006 - 06:47 AM

Quote

onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
light._alpha = per;
if (percent>99) {
gotoAndPlay(13);
}
}

there ya go

#4 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 05 January 2006 - 06:53 AM

not sure now, but shouldn't the if statement look for the per variable instead of percent?

#5 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 05 January 2006 - 06:59 AM

yea good point, u wanting a copy of the .fla file to have a closer look?

#6 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 05 January 2006 - 07:08 AM

yeh, I think it would make things easier..
send it to *edited*

Edited by funkysoul, 05 January 2006 - 07:16 AM.


#7 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 05 January 2006 - 07:12 AM

sent! :)

#8 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 05 January 2006 - 07:22 AM

ok, I got it :)
onClipEvent (enterFrame) {
	loading = _parent.getBytesLoaded();
	total = _parent.getBytesTotal();
	percent -= (percent-((loading/total)*100))*.25;
	per = int(percent);
	percentage = per+"%";
	light._alpha = per;
	if (per>=99) {
		_parent.gotoAndStop(2);
	}
}

the problem was that your loader was always stuck at 99, and with the operator > are you telling flash, that if percent is higher than 99 he should go to and play.
> - greater than
>= - greater or equal

have fun ;)
Funkysoul

Edited by funkysoul, 05 January 2006 - 07:23 AM.


#9 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 05 January 2006 - 07:33 AM

treid that but it sticks just after the fading still

#10 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 05 January 2006 - 07:43 AM

what do you mean it sticks to the image?
There is nothing else after the image frame..

#11 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 05 January 2006 - 07:52 AM

after the images fades and the circle goes white, it stops. It will jump to frame2 in scene 1 with the
"_parent.gotoAndPlay(2)"
code but i want it to play the rest of the movie clip but it won't. It just stops after it's loaded the movie and won't play the rest of the clip.

#12 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 05 January 2006 - 08:02 AM

sorry for the misunderstanding..

here the code for the preloader mc
onClipEvent (enterFrame) {
	var loading = _parent.getBytesLoaded();
	var total = _parent.getBytesTotal();
	percent -= (percent-((loading/total)*100))*.25;
	var per = int(percent);
	var percentage = per+"%";
	light._alpha = per;
	if (per>=99) {
		this.play();
	}
}

and the code for frame 11 of the movieclip
stop();
if (per>=99) {
	gotoAndPlay(13);
}

Have fun :)
Tiago

#13 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 05 January 2006 - 08:09 AM

hell yes!!!

Thank you ever so much man! can't thank you enough!!

:)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users