PDA

View Full Version : hi jesse another quick one, e-card tut.


pbjpb
01-18-2002, 03:29 PM
hi

i use:

loadVariablesNum ("http://www.blahblah.com/e-card.php", 0, "POST");

when i send my vars to the ecard.php script so the sender can still see his card after it's sent. and the first time around it works great. so the sender can still see what they made on the screen right, and if they want to add items to the stage and send it again they can do so..but when they do that time whatever was on the screen now has a duplicate right on top of it in the reader.swf. but the new items not sent the first time are fine, only one copy of them is displayed. i figure it's something is this piece of code:

// if the layoutString exists, append data
if (layoutString != null) {
layoutString = layoutString+","+name+","+xpos+","+ypos;
} else {
// layoutString doesn't exist, create it
layoutString = name+","+xpos+","+ypos;
}

any ideas? thanks!

Jesse
01-19-2002, 06:24 AM
If I get what you're doing right you can make the code just:
layoutString = layoutString+","+name+","+xpos+","+ypos;
// or
layoutString += ","+name+","+xpos+","+ypos;

pbjpb
01-23-2002, 09:46 PM
hi jesse

ok i tried that but it just added a new blank entry in my string like so:

locationString=,bas12,424,405&

and then all my attached MCs didn't show up in the reader...just for clarification, what the writer was doing before was sending all the variables right the first time, and the second time the email button is pressed in the writer, it sends duplicates of the ones it sent the first time...so in the string was:

locationString=bas12,424,405,bas12,424,405&

when it was supposed to be:

locationString=bas12,424,405&

any ideas? thanks!

Jesse
01-25-2002, 01:08 AM
You cuold check
if (layoutString != null) {
and if it's not NULL then you do nothing, that way you wont double up... but if they add a different MC the 2nd time around, it wont show up... But that's the best I can suggest. If layoutString exists already, do nothing.