Hi there,
I'm having a problem with let's say "one.swf" where I am using arrays. The "one.swf" works as expected and without errors in the debug, when it's playing in the internal player of SM4. When I export the "one.swf" and play it local it has the same results, no problems so far.
But when I am loading "one.swf" into a movieclip on "main.swf", then those arrays are undefined. So the calculations with the arrays are giving "undefined" as result.
I suppose that the value of the arrays is not found in that case.
I am using "this._lockroot=true" in my movie and it's exported to SWF8 with export properties "scene navigation when loaded" checkmarked.
Has somebody a clue what may cause this undefined values ?
Kind regards,
Arrays And Externally Loaded Swf
Started by Charly Pixels, Dec 05 2011 06:55 PM
5 replies to this topic
#1
Posted 05 December 2011 - 06:55 PM
Ga nooit heen zonder praten woord of teder zijn.
Wat je 's morgens hebt verlaten kan er 's avonds niet meer zijn.
Wat je 's morgens hebt verlaten kan er 's avonds niet meer zijn.
#2
Posted 05 December 2011 - 08:03 PM
In the most basic of examples the following would work
child.swf(The maxArray tutorial file)
sets the random quotes in an array
then parent.swf loads child.swf and the quotes are displayed.
child.swf
parent.swf
If your setup is more elaborate it may be easier to track down if we see the code
child.swf(The maxArray tutorial file)
sets the random quotes in an array
then parent.swf loads child.swf and the quotes are displayed.
child.swf
onSelfEvent (load)
{
// smt = new Array();
smt[0] = "awesome!";
smt[1] = "the best!";
smt[2] = "incredible!";
smt[3] = "amazing!";
smt[4] = "my favourite!";
smt[5] = "powerful!";
smt[6] = "versatile!";
smt[7] = "unbelieveable!";
message.text = "SWiSHmax is " add smt[Math.randomInt(8)];
}
parent.swf
onSelfEvent (load) {
movieClipNAME.loadMovie("child.swf");
}
If your setup is more elaborate it may be easier to track down if we see the code
#3
Posted 05 December 2011 - 08:29 PM
Good use.
Only problem is that you need to remove the comment hashes.
.
// smt = new Array();
Only problem is that you need to remove the comment hashes.
.
// smt = new Array();
Wayne helps those who help them selves.
#4
Posted 05 December 2011 - 10:10 PM
I think if the error was somewhere in my array constructions that the movie wouldn't play internally and externally without problems?
It's only when loaded into another movie that a small part does not work anymore.
Maybe somebody encoutered a similar problem and knows where to search ?
It's only when loaded into another movie that a small part does not work anymore.
Maybe somebody encoutered a similar problem and knows where to search ?
Edited by Charly Pixels, 05 December 2011 - 10:11 PM.
Ga nooit heen zonder praten woord of teder zijn.
Wat je 's morgens hebt verlaten kan er 's avonds niet meer zijn.
Wat je 's morgens hebt verlaten kan er 's avonds niet meer zijn.
#5
Posted 05 December 2011 - 10:21 PM
Quote
If your setup is more elaborate it may be easier to track down if we see the code
There are a lot of evil little gremlins out there.
But a working file or a small demo so we can check it would help.
Wayne
Wayne helps those who help them selves.
#6
Posted 06 December 2011 - 08:23 AM
cycle1500, on 05 December 2011 - 08:29 PM, said:
...remove the comment hashes.
.
// smt = new Array();
.
// smt = new Array();
I was trying to force error scenarios just to see
Forgot to take them out for the post.
Charley - Is the path you are using in loadMovie correct?
That might be a basic starting place.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












