Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : I need some help from an expert


benmaxwood NO[at]SPAM aol.com
2/4/2004 9:25:31 PM
Hello.

I am unable to work out this problem. I am not a programmer though I do understand actionscipt to a good extent.

The problem that I have been unable to work out may be best demonstrated by visiting this URL;

http://www.geocities.com/benmwood45

What I have managed to do so far is to create an actionscript on the submit button that is intented to call external swfs and play them in the order that they are checked on the list. To do this I have put the following script in the submit button.

on (release) {
_root.gotoAndPlay("move");
if (base.checked)
loadMovie("base.swf", this._parent.rect1);
if (cost.checked)
loadMovie("costs.swf", this._parent.rect1);
if (invoice.checked)
loadMovie("invoice.swf", this._parent.rect1);
if (inventory.checked)
loadMovie("inventory.swf", this._parent.rect1);
if (schedule.checked)
loadMovie("scheduledwork.swf", this._parent.rect1);
if (punch.checked)
loadMovie("scheduledwpunch.swf", this._parent.rect1);
if (time.checked)
loadMovie("timecard.swf", this._parent.rect1);
}

What this does, though is just load and play the last movie checked.

I have also created an array located on the timeline with the following on.

movies = new Array ("base.swf", "costs.swf", "inventory.swf", "invoice.swf", "scheduledwork.swf", "scheduledwpunch.swf", "timecard.swf")
beginAt = 0;

What this does is call the movies to play in that order.

Then I have another script in the timeline that says.

onClipEvent (enterFrame){
if(_currentframe ==_totalframes && _root.beginAt <
_root.movies.length){
loadMovie(_root.movies[_root.beginAt],this);
++_root.beginAt;
}
}

To tell you the truth I am very lost and really need help. Does anyone know where I can go to get it and complete this?
I'd appreciate any help!
Ben


elemental .std
2/5/2004 3:26:43 PM
First script is wrong ?
If this is the original i understand why it loads last movie
Don`t miss brackets {} !!!

Here is the correct:

on (release) {
_root.gotoAndPlay("move");

if (base.checked) {
loadMovie("base.swf", this._parent.rect1);
}
else if (cost.checked)
{
loadMovie("costs.swf", this._parent.rect1);
}
else if (invoice.checked)
{
loadMovie("invoice.swf", this._parent.rect1);
}
else if (inventory.checked)
{
loadMovie("inventory.swf", this._parent.rect1);
}
else if (schedule.checked)
{
loadMovie("scheduledwork.swf", this._parent.rect1);
}
else if (punch.checked)
{
loadMovie("scheduledwpunch.swf", this._parent.rect1);
}
else if (time.checked)
{
loadMovie("timecard.swf", this._parent.rect1);
}
}

If everything writen here is correct i think that there is no problem running this script.
It will do exactly what do you want !

Best regard. I.



AddThis Social Bookmark Button