Jelmer850i
%Europe/Berlin %617 %2008, 15:49
Ik heb een testbestand gemaakt. Nu wil ik de code van het testbestand gebruiken in mijn 'gewone' fla.
Echter krijg ik een aantal foutmeldingen:
Eerst mijn script:
stop();
//Functie om afbeeldingen te laden.
function startLoading(whichImage,naam) {
loadMovie(whichImage, naam);
_root.onEnterFrame = function() {
infoLoaded = imageLoader.getBytesLoaded();
infoTotal = imageLoader.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
delete this.onEnterFrame;
infoField._visible = false;
}
};
}
//Afbeelding/logo op false:
txtNaam._visible = false;
logo._visible = false;
logo._x = -100;
logo._y = -100;
//Laden afbeelding:
startLoading("afbeelding.jpg","logo");
//Links op blokjes zetten en tekstvak en logo herpositioneren
var aantalVierkanten:Number=2;
for (var i:Number=0; i<aantalVierkanten; i++)
{
this["vierkant_mc"+i].onRollOver=function()
{
txtNaam._visible = true;
logo._visible = true;
txtNaam._x = this._x + 10;
txtNaam._y = this._y + 10;
logo._x = this._x + 10;
logo._y = this._y + 30;
}
this["vierkant_mc"+i].onRollOut=function()
{
txtNaam._visible = false;
logo._visible = false;
}
this["vierkant_mc"+i].onRelease=function()
{
getURL("eenurl", "_blank");
}
}
En ik krijg deze foutmelding:
**Error** Scene=Page 1, layer=actions, frame=1:Line 4: You must export your movie as Flash 5 to use this action.
function startLoading(whichImage,naam) {
**Error** Scene=Page 1, layer=actions, frame=1:Line 6: You must export your movie as Flash 5 to use this action.
_root.onEnterFrame = function() {
**Error** Scene=Page 1, layer=actions, frame=1:Line 7: You must export your movie as Flash 5 to use this action.
infoLoaded = imageLoader.getBytesLoaded();
**Error** Scene=Page 1, layer=actions, frame=1:Line 8: You must export your movie as Flash 5 to use this action.
infoTotal = imageLoader.getBytesTotal();
**Error** Scene=Page 1, layer=actions, frame=1:Line 12: You must export your movie as Flash 5 to use this expression.
delete this.onEnterFrame;
**Error** Scene=Page 1, layer=actions, frame=1:Line 24: You must export your movie as Flash 5 to use this action.
startLoading("afbeelding.jpg","logo");
**Error** Scene=Page 1, layer=actions, frame=1:Line 27: You must export your movie as Flash 5 to use this action.
var aantalVierkanten:Number=2;
**Error** Scene=Page 1, layer=actions, frame=1:Line 28: You must export your movie as Flash 5 to use this action.
for (var i:Number=0; i<aantalVierkanten; i++)
**Error** Scene=Page 1, layer=actions, frame=1:Line 30: You must export your movie as Flash 5 to use this expression.
this["vierkant_mc"+i].onRollOver=function()
**Error** Scene=Page 1, layer=actions, frame=1:Line 34: You must export your movie as Flash 5 to use this expression.
txtNaam._x = this._x + 10;
**Error** Scene=Page 1, layer=actions, frame=1:Line 35: You must export your movie as Flash 5 to use this expression.
txtNaam._y = this._y + 10;
**Error** Scene=Page 1, layer=actions, frame=1:Line 36: You must export your movie as Flash 5 to use this expression.
logo._x = this._x + 10;
**Error** Scene=Page 1, layer=actions, frame=1:Line 37: You must export your movie as Flash 5 to use this expression.
logo._y = this._y + 30;
**Error** Scene=Page 1, layer=actions, frame=1:Line 39: You must export your movie as Flash 5 to use this expression.
this["vierkant_mc"+i].onRollOut=function()
**Error** Scene=Page 1, layer=actions, frame=1:Line 44: You must export your movie as Flash 5 to use this expression.
this["vierkant_mc"+i].onRelease=function()
Total ActionScript Errors: 15 Reported Errors: 15
Wat doe ik fout?
En hoe los ik dit op?
Echter krijg ik een aantal foutmeldingen:
Eerst mijn script:
stop();
//Functie om afbeeldingen te laden.
function startLoading(whichImage,naam) {
loadMovie(whichImage, naam);
_root.onEnterFrame = function() {
infoLoaded = imageLoader.getBytesLoaded();
infoTotal = imageLoader.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
delete this.onEnterFrame;
infoField._visible = false;
}
};
}
//Afbeelding/logo op false:
txtNaam._visible = false;
logo._visible = false;
logo._x = -100;
logo._y = -100;
//Laden afbeelding:
startLoading("afbeelding.jpg","logo");
//Links op blokjes zetten en tekstvak en logo herpositioneren
var aantalVierkanten:Number=2;
for (var i:Number=0; i<aantalVierkanten; i++)
{
this["vierkant_mc"+i].onRollOver=function()
{
txtNaam._visible = true;
logo._visible = true;
txtNaam._x = this._x + 10;
txtNaam._y = this._y + 10;
logo._x = this._x + 10;
logo._y = this._y + 30;
}
this["vierkant_mc"+i].onRollOut=function()
{
txtNaam._visible = false;
logo._visible = false;
}
this["vierkant_mc"+i].onRelease=function()
{
getURL("eenurl", "_blank");
}
}
En ik krijg deze foutmelding:
**Error** Scene=Page 1, layer=actions, frame=1:Line 4: You must export your movie as Flash 5 to use this action.
function startLoading(whichImage,naam) {
**Error** Scene=Page 1, layer=actions, frame=1:Line 6: You must export your movie as Flash 5 to use this action.
_root.onEnterFrame = function() {
**Error** Scene=Page 1, layer=actions, frame=1:Line 7: You must export your movie as Flash 5 to use this action.
infoLoaded = imageLoader.getBytesLoaded();
**Error** Scene=Page 1, layer=actions, frame=1:Line 8: You must export your movie as Flash 5 to use this action.
infoTotal = imageLoader.getBytesTotal();
**Error** Scene=Page 1, layer=actions, frame=1:Line 12: You must export your movie as Flash 5 to use this expression.
delete this.onEnterFrame;
**Error** Scene=Page 1, layer=actions, frame=1:Line 24: You must export your movie as Flash 5 to use this action.
startLoading("afbeelding.jpg","logo");
**Error** Scene=Page 1, layer=actions, frame=1:Line 27: You must export your movie as Flash 5 to use this action.
var aantalVierkanten:Number=2;
**Error** Scene=Page 1, layer=actions, frame=1:Line 28: You must export your movie as Flash 5 to use this action.
for (var i:Number=0; i<aantalVierkanten; i++)
**Error** Scene=Page 1, layer=actions, frame=1:Line 30: You must export your movie as Flash 5 to use this expression.
this["vierkant_mc"+i].onRollOver=function()
**Error** Scene=Page 1, layer=actions, frame=1:Line 34: You must export your movie as Flash 5 to use this expression.
txtNaam._x = this._x + 10;
**Error** Scene=Page 1, layer=actions, frame=1:Line 35: You must export your movie as Flash 5 to use this expression.
txtNaam._y = this._y + 10;
**Error** Scene=Page 1, layer=actions, frame=1:Line 36: You must export your movie as Flash 5 to use this expression.
logo._x = this._x + 10;
**Error** Scene=Page 1, layer=actions, frame=1:Line 37: You must export your movie as Flash 5 to use this expression.
logo._y = this._y + 30;
**Error** Scene=Page 1, layer=actions, frame=1:Line 39: You must export your movie as Flash 5 to use this expression.
this["vierkant_mc"+i].onRollOut=function()
**Error** Scene=Page 1, layer=actions, frame=1:Line 44: You must export your movie as Flash 5 to use this expression.
this["vierkant_mc"+i].onRelease=function()
Total ActionScript Errors: 15 Reported Errors: 15
Wat doe ik fout?
En hoe los ik dit op?