Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 14th, 2003, 08:40 PM
jeffo jeffo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 jeffo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry loadVars not working?! (newbie)

Hi all,

I was wondering if you guys can help me out in this. Am using loadVars, works in another project of mine, but doesn't seem to work in the current one (same structure).

The usual:
on (release) {
myVars = new LoadVars();
myVars.name = name;
myVars.address = address;
myVars.contactno = contact;
myVars.emailadd = email;
...
myVars.send ("http://localhost/play/Sendinfo.asp");
...
}

Using myVars.send to send the info to an ASP file for processing, but somehow the ASP file did not even get to load?

I've used different variations of "_blank", "POST", "GET"... but no cigar. Is this problem got to do with some nesting of my scene/movie?

getURL works though, but not the vars that I wanted.

Any help appreciated.

J.

Reply With Quote
  #2  
Old May 15th, 2003, 07:04 AM
StealthElephant's Avatar
StealthElephant StealthElephant is offline
Shes dancing (obviously)
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2002
Location: the far side
Posts: 517 StealthElephant User rank is Corporal (100 - 500 Reputation Level)StealthElephant User rank is Corporal (100 - 500 Reputation Level)StealthElephant User rank is Corporal (100 - 500 Reputation Level)StealthElephant User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 45 m 57 sec
Reputation Power: 7
hey, dont know the answer, only just made it to an intermediate book myself , but go here i have seen a load of threads with answers (even 1 to ur question) that u can use.
__________________

microsofts butterfly is their way off telling u their systems have a **** load of buggs
Advocating Linux Guide
Lesbian Linux
Great & Practical Computer Books

like the links?

Reply With Quote
  #3  
Old May 18th, 2003, 12:45 PM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Well it is most likely a scope issue, you would need to refernce the variables from their locations when assigning them to the loadVars object.

PHP Code:
 on (release) {
myVars = new LoadVars();
myVars.name _root.pathto.name;
myVars.address _root.pathto.address;
myVars.contactno _root.pathto.contact;
myVars.emailadd _root.pathto.email;
...
myVars.send ("http://localhost/play/Sendinfo.asp");
...




Does that make sense. Or since you are using MX, you could move your existing code to the main timeline and skip the problem.

PHP Code:
 btnInstance.onRelease = function() {
myVars = new LoadVars();
myVars.name name;
myVars.address address;
myVars.contactno contact;
myVars.emailadd email;
...
myVars.send ("http://localhost/play/Sendinfo.asp");
...


Reply With Quote
  #4  
Old May 19th, 2003, 01:18 PM
jeffo jeffo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 jeffo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hmm... maybe, will try it out. But 1 question.

I did a trace immediately after assigning the vars:

trace(myVars.name + "; " + myVars.address + "; " + myVars.contactno + "; " + myVars.emailadd + "; " + myVars.checkbox);

and the output box shows the correct values...

1 line later the loadVars .send doesn't work...

J.

Reply With Quote
  #5  
Old May 19th, 2003, 01:30 PM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I just didn't have that same problem, not sure what happened with yours. Could be something in the ASP file.

See attached
Attached Files
File Type: zip contactform.zip (5.9 KB, 349 views)

Reply With Quote
  #6  
Old May 19th, 2003, 01:36 PM
greenroom greenroom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 2 greenroom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
also check PARAM NAME=FlashVars to load variables

Reply With Quote
  #7  
Old May 19th, 2003, 01:45 PM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Quote:
Originally posted by greenroom
also check PARAM NAME=FlashVars to load variables



That would be great advice if they were loading vars and not sending them.

Reply With Quote
  #8  
Old May 20th, 2003, 09:54 AM
jeffo jeffo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 jeffo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks, freddydoesphp.

Yup. solved my loadVars prob - nesting/referencing...<sheepish>

I use the loadVars send, using the GET method because of how my script is expecting it... but I did not expect to see a popup browser window!? I can shut it down using another javascript, but get a confirmation message (because I didn't open up that unwanted browser window using js)... Is there any way I can call a loadVars send without the popup browser window?

I am using:
myVars.send ("http://localhost/play/Sendinfo.asp", "GET");

Using:
myVars.send("http://localhost/play/Sendinfo1.asp", "_blank", "GET");
or
myVars.send ("http://localhost/play/Sendinfo1.asp", "", "GET");

gets me the same pop up window. Will POST help? That means I gotta change my asp script.

Any further help greatly appreciated.

J.

Reply With Quote
  #9  
Old May 20th, 2003, 10:53 AM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Unforunately that is the way send() works, however sendAndLoad will not open a window. Even if you don't want to return anything to flash, this will be a good workaround. However I would suggest sending something back to flash to confirm the variables made it through the script.

Reply With Quote
  #10  
Old May 20th, 2003, 11:29 AM
jeffo jeffo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 jeffo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for all the help so far... I've gotten it done.

J.

Reply With Quote
  #11  
Old May 20th, 2003, 11:34 AM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Any time

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > loadVars not working?! (newbie)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway