PDA

View Full Version : °°° problem with loading variables °°°



lampe
December 2nd, 2003, 02:53 AM
I POSTED THIS ON THE FLASH MX FORUM BUT IT SHOULD BE HERE! SORRY FOR THE DOUBLE POST! HOPE THAT PEOPLE ON THIS FORUM CAN HELP ME OUT!!!


hey there,

I have this problem: I made a swf (called m&d2.swf) with my main navigation. On this main document, there are 6 lines where the variable text comes (called line1; line2;...). When i click a button, the text appears in the right place. I'll put the script here:


ActionScript:--------------------------------------------------------------------------------on (release) {
line1 = "M&D advertising";
line2 = "Heirweg 94";
line3 = "B-8520 Kuurne";
line4 = "Tel 056/35 85 05";
line5 = "Fax 056/37 40 72";
line6 = "info@md-advertising.be";
loadVariables("line1", "0");
loadVariables("line2", "0");
loadVariables("line3", "0");
loadVariables("line4", "0");
loadVariables("line5", "0");
loadVariables("line6", "0");
}

--------------------------------------------------------------------------------


When i click this button, a subnavigation (a swf called corporate.swf) loads on this main document. NOW, HERE IT IS!!!
When i paste the same code on a button from the subnavigation, the text will not load in the main document. I know, it should be something with the target and level thing and using POST or GET, but I can't find it.
So here is the code I've pasted on my button in the corporate.swf (the one which is loaded in the main document).

ActionScript:--------------------------------------------------------------------------------on (release) {
line1 = "Company - History";
line2 = "";
line3 = "";
line4 = "";
line5 = "";
line6 = "";
loadVariables("line1", "0");
loadVariables("line2", "0");
loadVariables("line3", "0");
loadVariables("line4", "0");
loadVariables("line5", "0");
loadVariables("line6", "0");
}

--------------------------------------------------------------------------------
I've uploaded the site, you can see it here (http://www.md-advertising.be/new). The two zipped files are here (http://www.md-advertising.be/new/m&d2.zip) and here (http://www.md-advertising.be/new/corporate.zip). You can check at the site what I will explain. If you click on the pink button with 'C' on, you will see that the word 'corporate' appears on the line (variable line1) and the subnavigation (blue buttons) appear. (that is the corporate swf that loads). When you click the blue button with 'H' (history), the words 'Company - History' should load in that line1. But it doesn't...

Please help me out, this is urgent! Thank you so much!!!

lampe

DeepRevolution
December 2nd, 2003, 08:34 AM
hmmm i dont know if i understand the problem, Sorry its urgent, i wish i could help you some more, but maybe someone else can help you out. maybe try using arrays to hold your data would make it work?

lampe
December 2nd, 2003, 08:47 AM
So what would the syntax be if I use arrays? Can you write it down please?

Thank you!

lampe

DeepRevolution
December 2nd, 2003, 08:49 AM
let me go have a look, ill post back in a minute

DeepRevolution
December 2nd, 2003, 08:59 AM
ok here is some info on how arrays work

http://www.macromedia.com/devnet/mx/flash/extreme/

http://www.flashmagazine.com/html/618.htm

and look up any refrence inside flash for array, that should show you the exact syntax

lampe
December 2nd, 2003, 09:04 AM
thanks alot dude! =)
I hope it will work.

lampe

DeepRevolution
December 2nd, 2003, 09:14 AM
i hope so too! i know urgent problems can stress you out, eki just totaly fixed my stupid little bug that i couldnt figure out

so im happy now! :) hope yours gets squarshed!