Stick Page Forums Archive

Flash 8: Actionscript 2.0: Preloader

Started by: vml | Replies: 22 | Views: 7,821

vml
2

Posts: 266
Joined: Mar 2012
Rep: 10

View Profile
Mar 28, 2012 11:22 PM #623644
Well i'm new here on stickpage and this will be my first tutorial

a really basic and easy preloader with basic coding

put this code in the first frame of your animation:

stop()
createEmptyMovieClip ("ploader",-1)
ploader._x = 0
ploader._y = 0
ploader.createTextField("T",1,2,2,Stage.width,Stage.height)
ploader.T.selectable = false
ploader.T.setTextFormat(fmt);
ploader.blendMode = "invert"
function preload(){
ploader.T.text = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) + "% loaded"
if(ploader.T.text=="100% loaded"){
ploader.T.text = "Load Complete - Click anywhere to continue"
clearInterval(Int)
Loaded = true
}
}
var Loaded:Boolean = false
var Int:Number = setInterval(preload,100)
function onMouseDown(){
if(Loaded){
_root.play()
unloadMovie(ploader)
delete preload
delete Loaded
delete Int
delete onMouseDown
}
}

and now you have a basic preloader maked in two secons with basic coding

I know it's short but is really basic and if you don't understand something leave a comment
LOL Bye............................
Excellion1498
2

Posts: 508
Joined: Nov 2011
Rep: 10

View Profile
Mar 28, 2012 11:35 PM #623652
Would this happen to be the default preloader for many beginner/intermediate Flash animators?
EDIT: Tried it, and it didn't work ;-;
vml
2

Posts: 266
Joined: Mar 2012
Rep: 10

View Profile
Mar 28, 2012 11:59 PM #623662
well have you click in the first frame of your movie opened the actions panel and put the code in there? or else explain your error to me in a PM
Excellion1498
2

Posts: 508
Joined: Nov 2011
Rep: 10

View Profile
Mar 29, 2012 12:07 AM #623670
Did exactly that, copy paste into the actions, and even made it on a seperate layer, but the preloader did not show at all. The animation just started.
vml
2

Posts: 266
Joined: Mar 2012
Rep: 10

View Profile
Mar 29, 2012 12:11 AM #623675
oh now I can see your problem the code has a little problem sorry I'll fix it right now
vml
2

Posts: 266
Joined: Mar 2012
Rep: 10

View Profile
Mar 29, 2012 12:13 AM #623678
Quote from Excellion1498
Did exactly that, copy paste into the actions, and even made it on a seperate layer, but the preloader did not show at all. The animation just started.


The problem is fixed try now sorry for the inconvenient
Excellion1498
2

Posts: 508
Joined: Nov 2011
Rep: 10

View Profile
Mar 29, 2012 9:45 AM #623868
Still not working for me...
Error report:

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: ')' or ',' expected
ploader.createTextField("T",1,2,2,Stage.width,Stag e.height)

Total ActionScript Errors: 1 Reported Errors: 1
vml
2

Posts: 266
Joined: Mar 2012
Rep: 10

View Profile
Mar 29, 2012 1:01 PM #623917
Quote from Excellion1498
Still not working for me...
Error report:

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: ')' or ',' expected
ploader.createTextField("T",1,2,2,Stage.width,Stag e.height)

Total ActionScript Errors: 1 Reported Errors: 1


see now because i just tryed it and it worked
Mystic-Ninja

Posts: 2
Joined: May 2012
Rep: 10

View Profile
May 7, 2012 9:04 AM #650805
but I know where to download the program you speak of: anchio'm new here and so are not equipped thanks in advance
Craziest God
2

Posts: 348
Joined: Feb 2012
Rep: 10

View Profile
May 7, 2012 12:59 PM #650939
I bad english...
can you send me a example?(fla)
vml
2

Posts: 266
Joined: Mar 2012
Rep: 10

View Profile
May 7, 2012 4:41 PM #651055
Quote from Craziest God
I bad english...
can you send me a example?(fla)


of course i'm glad to help
Mystic-Ninja

Posts: 2
Joined: May 2012
Rep: 10

View Profile
May 8, 2012 12:15 PM #651783
Quote from vml
of course i'm glad to help



Sorry to all,but my english sucks.
Where can I download this program?It's free?
vml
2

Posts: 266
Joined: Mar 2012
Rep: 10

View Profile
May 8, 2012 1:42 PM #651816
Quote from Mystic-Ninja
Sorry to all,but my english sucks.
Where can I download this program?It's free?


No, it's impossible to get for free. Certainly not legally, and we wouldn't consider doing anything illegal on this perfectly well-behaved forum.
Herom

Posts: 22
Joined: Jun 2012
Rep: 10

View Profile
Jun 15, 2012 12:36 PM #677451
ehh can you send me a example flash file i dont know shit about coding. unless i see an example. thanks
DanmarK

Posts: 689
Joined: Mar 2012
Rep: 10

View Profile
Jun 19, 2012 12:52 AM #680051
ive tried this before and it didn't work :eek:
Website Version: 1.0.4
© 2025 Max Games. All rights reserved.