Leon25
Gebruiker
- Lid geworden
- 28 jun 2007
- Berichten
- 423
Hoi ! Een vraagje : mbv quicker - sothink heb ik het AS in een swf file aangepast de pre history ervan kun je zien in http://members.home.nl/pc1l/flash/les.htm als je nodig zou vinden. De oorspronkelijke file is van vintageworld ( zie http://www.sitemasters.be/?pagina=tutorials/tutorials&id=393&cat=8 ). Als ik nu een loadbarretje uit quicker bijplaats ( zie hieronder het AS ) moet dat natuurlijk gaan werken. Ongewijzigd is hij niet te zien in het eindresult 

. Meteen hieronder deze tekst nog even enig AS van de te bewerken nieuwe file ( helemaal onderaan vervolg en einde vraag ):
geluid = new Sound();
geluid.loadSound("e.mp3", true);
geluid.stop();
stopKnop.onRelease = function ()
{
geluid.stop();
huidigeTijd = 0;
};
pauzeKnop.onRelease = function ()
{
huidigeTijd = geluid.position / 1000;
geluid.stop();
};
startKnop.onRelease = function ()
{
geluid.start(huidigeTijd, 0);
};
this.onEnterFrame = function ()
{
if (rewind == 1 && huidigeTijd > 0)
{
geluid.stop();
huidigeTijd = huidigeTijd - 5,000000E-001;
geluid.start(huidigeTijd, 0);
} // end if
rewKnop.onPress = function ()
{
rewind = 1;
huidigeTijd = geluid.position / 1000;
};
rewKnop.onRelease = function ()
{
rewind = 0;
};
if (fastforward == 1 && geluid.position < geluid.duration)
{
geluid.stop();
huidigeTijd = huidigeTijd + 5,000000E-001;
geluid.start(huidigeTijd, 0);
} // end if
ffKnop.onPress = function ()
{
fastforward = 1;
huidigeTijd = geluid.position / 1000;
};
ffKnop.onRelease = function ()
{
fastforward = 0;
};
};
HIERONDER het action script aangaande de loadbar :
function LoadPercent()
{
TotalByes = WatchedMovie.getBytesTotal();
LoadedByes = WatchedMovie.getBytesLoaded();
return(int(LoadedByes / TotalByes * 100));
} // End of the function
function FinishLoading()
{
if(FadeOut)
gotoAndPlay(3);
else
gotoAndPlay(EmptyLoopStart);
WatchedMovie.play();
WatchedMovie = undefined;
Delay = 0;
if (OnLoaded != undefined)
{
OnLoaded();
} // end if
} // End of the function
if (FirstPlay == undefined)
{
FirstPlay = false;
if(_root._currentframe==1) WatchedMovie=_root;
EmptyLoopStart=11;
gotoAndPlay(EmptyLoopStart);
return(undefined);
} // end if
LoadingPercent = LoadPercent();
ProgressText = LoadingPercent + "%";
setProperty("ProgressBar", _xscale, LoadingPercent);
en nog :
if (LoadingPercent == 100)
{
FinishLoading();
}
else
{
gotoAndPlay(1);
if (OnLoading!=undefined) OnLoading();
} // end if
Waar moet(en) volgens jou nu de mod(s) in het AS vd loadbar worden aangebracht ? Ik ben een beginner met dit as 2.0 maar vermoed dat het eigenlijk zeer eenvoudig is .....
Met ( veel
:thumb
dank voor antwoord, leon 25
.



geluid = new Sound();
geluid.loadSound("e.mp3", true);
geluid.stop();
stopKnop.onRelease = function ()
{
geluid.stop();
huidigeTijd = 0;
};
pauzeKnop.onRelease = function ()
{
huidigeTijd = geluid.position / 1000;
geluid.stop();
};
startKnop.onRelease = function ()
{
geluid.start(huidigeTijd, 0);
};
this.onEnterFrame = function ()
{
if (rewind == 1 && huidigeTijd > 0)
{
geluid.stop();
huidigeTijd = huidigeTijd - 5,000000E-001;
geluid.start(huidigeTijd, 0);
} // end if
rewKnop.onPress = function ()
{
rewind = 1;
huidigeTijd = geluid.position / 1000;
};
rewKnop.onRelease = function ()
{
rewind = 0;
};
if (fastforward == 1 && geluid.position < geluid.duration)
{
geluid.stop();
huidigeTijd = huidigeTijd + 5,000000E-001;
geluid.start(huidigeTijd, 0);
} // end if
ffKnop.onPress = function ()
{
fastforward = 1;
huidigeTijd = geluid.position / 1000;
};
ffKnop.onRelease = function ()
{
fastforward = 0;
};
};
HIERONDER het action script aangaande de loadbar :
function LoadPercent()
{
TotalByes = WatchedMovie.getBytesTotal();
LoadedByes = WatchedMovie.getBytesLoaded();
return(int(LoadedByes / TotalByes * 100));
} // End of the function
function FinishLoading()
{
if(FadeOut)
gotoAndPlay(3);
else
gotoAndPlay(EmptyLoopStart);
WatchedMovie.play();
WatchedMovie = undefined;
Delay = 0;
if (OnLoaded != undefined)
{
OnLoaded();
} // end if
} // End of the function
if (FirstPlay == undefined)
{
FirstPlay = false;
if(_root._currentframe==1) WatchedMovie=_root;
EmptyLoopStart=11;
gotoAndPlay(EmptyLoopStart);
return(undefined);
} // end if
LoadingPercent = LoadPercent();
ProgressText = LoadingPercent + "%";
setProperty("ProgressBar", _xscale, LoadingPercent);
en nog :
if (LoadingPercent == 100)
{
FinishLoading();
}
else
{
gotoAndPlay(1);
if (OnLoading!=undefined) OnLoading();
} // end if
Waar moet(en) volgens jou nu de mod(s) in het AS vd loadbar worden aangebracht ? Ik ben een beginner met dit as 2.0 maar vermoed dat het eigenlijk zeer eenvoudig is .....
Met ( veel



