I am building a Flash and PHP ecard system (using pieces of other people’s open source coupled with a couple “Flashloaded” components - thumbNailer and textMenu), and am of an intermediate Flash skill level and am hung up on some code, quite probably a simple path problem but am not sure.
The original ecard flash file from which I started working is a single level flash movie which sends 7 variables (EcardSelect, ToName, ToEmail, FromName, FromEmail, Greeting and IntroMessage) to a SendCard.php script thru the use of loadVariablesNum command attached to a Send Ecard button. I’ve jazzed this up a bit, trying to improve upon naviagation by using “Flashloaded’s” textmenu and thumbnailer. The textmenu is on the root and calls in a dynamic menu from an xml file. Each menu item will in turn call in an external movie clip which contains the thumbnailer (instance name “tnailer”) and 2 empty clips (“picHolder” and “formHolder”) onto it’s stage. The “tnailer” component (for those unfamiliar with it), can call in either jpeg or other swfs to act as the thumb selectors. I have it calling in external swfs (cardthumb1.swf, cardthumb2.swf and so on) which contain a graphic of each ecard and which also contain a button (Alpha 0%) on top which does the following upon release:
-
Uses loadMovie to load the corresponding ecard swf file into the first empty movie clip called “picHolder”.
-
Uses loadMovie to load my ecardform.swf into the second empty movie clip called “formHolder”.
-
Assigns a numerical value to a variable called “EcardSelect”.
My ecardform.swf contains six input fields (ToName, ToEmail, FromName, FromEmail, Greeting and IntroMessage) as well as the Send Ecard button which engages the loadVariablesNum command once all input fields are filled.
Here’s my problem, when I play the movie from the root and hit CTRL,ALT, V to look at all the variables, I can see values for the six input fields but not only is there no established variable for EcardSelect, but there’s no record that such a variable called EcardSelect exists at all. I need this variable as the SendEcard.php script will use it in the outgoing email link so that when it’s clicked on by the recipient, it in turn is used by the SelectCard.php script on it’s way back into my server to display the correct card.
It seems that the variable attached to the buttons inside the “tnailer” is not being recognized and I have tried attaching a combination of getVariable and loadVariable commands (using paths seen in the output window when hitting CTRL, ALT, V) to the Send Ecard button to try to retrieve the buried EcardSelect variable but seem unable to snag it. I have also tried establishing a _global.EcardSelect variable triggered by the buttons inside of the “tnailer” and still it won’t work. As well, I tried removing the EcardSelect variable assignment from the “tnailer’s” buttons and established it on a loadMovie command when the larger scale movies load within “picHolder” and then tried loading it (and getting it) in the same methods as when it was on the “tnailer” button release and still I can’t even get Flash to recognize that the variable even exists.
So like I said, I know enough to get this far, but not so much that it’s not beyond the possibility that I’m making a really stupid path/syntax mistake.
So I ask, am I going about this the right way or is there a better way to do it? Am I barking up the wrong tree trying to solve it by importing the missing variable into the ecardform.swf prior to the loadVariablesNum command being activated?
Hopefully this isn’t too ignorant of a question to ask?
Thanks.