[Flashcoders] Accessing an Associative Array

2007-03-12 Thread Bill Abel

How do you access an associate array using a variable?

Inside my function popup[text]; won't access the array. I can't  
find any information in the books I have Actionsript Cookbook and  
Actionscript for Flash MX.


Anyone dealt with this before?

// Define the text and titles for the popups
var myarray = { text: Lorem ipsum dolor sit amet ... };

// Testing - this works!
trace(myarray[text]);

// Show the popup
function showPopup(popup) {
mainMap[popup].gotoAndPlay(on);
mainMap[popup].label_title.text = popup[text];  // This doesn't work.
trace(popup[text]);
};

showPopup(myarray);
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Bill Abel
How do you do it where myVar is the array? Is this possible? Or do  
you always have to specify the array?


arr = new Array()
arr[elem1] = hello
arr[elem2] = hi

function testArray(myVar) {
trace(myVar[elem2]);
};
testArray(arr);



On Mar 12, 2007, at 3:17 PM, Merrill, Jason wrote:


arr = new Array()
myVar = elem2
arr[elem1] = hello
arr[elem2] = hi
trace(arr[myVar])


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Bill Abel

Your right. I am passing a string.

But I'm trying to use that string to access an array by the same name.

someArray = { label: my text };
showPopup(someArray); // send a string which is the name of my array

in the function:

myDynamicText.text = myArray[label]; // try to use the passed  
string to access the array.



This won't access some array. How do I convert that string over to  
something that will work?


-b




On Mar 12, 2007, at 3:46 PM, Andy Herrman wrote:


I think this is your problem:

showPopup(myarray);

You're passing showPopup a string with the value myarray, not the
array.  Remove the quotes and you should be good.

 -Andy

On 3/12/07, Bill Abel [EMAIL PROTECTED] wrote:

How do you access an associate array using a variable?

Inside my function popup[text]; won't access the array. I can't
find any information in the books I have Actionsript Cookbook and
Actionscript for Flash MX.

Anyone dealt with this before?

// Define the text and titles for the popups
var myarray = { text: Lorem ipsum dolor sit amet ... };

// Testing - this works!
trace(myarray[text]);

// Show the popup
function showPopup(popup) {
mainMap[popup].gotoAndPlay(on);
mainMap[popup].label_title.text = popup[text];  // This  
doesn't work.

trace(popup[text]);
};

showPopup(myarray);
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Accessing an Associative Array

2007-03-12 Thread Bill Abel

Cool. That's it. Thanks so much!

Needed to use the syntax;

this[myStringVariableAndArrayName][myLabelInMyAssociativeArray];


My final code:

// Show the popup
function showPopup(popup) {
trace(popup);
mainMap[popup].gotoAndPlay(on);
mainMap[popup].label_title.text = this[popup][labelText];
trace(this[popup][labelText]);
};



On Mar 12, 2007, at 4:45 PM, Merrill, Jason wrote:


How do you do it where myVar is the array? Is this possible?
Or do you always have to specify the array?


Easy, just keep using the array access operator to evaluate:

myVar = myArray2

myArray1 = new Array()
myArray1[elem1] = hello
myArray1[elem2] = hi

myArray2 = new Array()
myArray2[elem1] = wassup
myArray2[elem2] = yo

trace(this[myVar][elem1]) //traces wassup

Jason Merrill
Bank of America
Global Technology  Operations
Learning  Leadership Development
eTools  Multimedia Team





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Bill Abel
Sent: Monday, March 12, 2007 5:02 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Accessing an Associative Array

How do you do it where myVar is the array? Is this possible?
Or do you always have to specify the array?

arr = new Array()
arr[elem1] = hello
arr[elem2] = hi

function testArray(myVar) {
trace(myVar[elem2]);
};
testArray(arr);



On Mar 12, 2007, at 3:17 PM, Merrill, Jason wrote:


arr = new Array()
myVar = elem2
arr[elem1] = hello
arr[elem2] = hi
trace(arr[myVar])


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Job - Flash Designer

2007-02-01 Thread Bill Abel

Birmingham, AL
Flash Designer

About The Slaughter Group:

The Slaughter Group is a brand development firm providing sound  
strategy and exceptional creativity in Corporate and Brand Identity  
and Strategic Design.  The firm has a depth of experience in serving  
clients with the highest quality products and services across a range  
of businesses and industries, including professional services, real  
estate, healthcare, financial services, and not-for-profit  
organizations. Founded in 1976, the Slaughter Group continues to be  
the recipient of top national and international creative awards.


More information can be found at www.slaughtergroup.com.

Job Summary:

As a Flash Designer at the Slaughter Group, you function as a key  
member of the Creative Design team responsible for the development  
and execution of Websites and multimedia.


Key Responsibilities:

•   Provide excellent design skills.
•	Work closely with designers and team members to develop dynamic,  
interactive websites and multimedia using Flash and other technologies.
•	Ability to translate a wireframe and style guide into a production  
page.
•	Provide solid experience in graphic manipulation in Photoshop and  
Illustrator.

•   Resolve bugs and cross browser compatibility issues
•	Identify tools, templates, and techniques that evolve existing  
approaches


Job Requirements:

•   Solid skills in Web Standards, HTML, XHTML, CSS, and Javascript
•   Solid skills in Flash 8 and Actionscript 2.0
•   Knowledge of PHP, AJAX, or Ruby on Rails desired
•   Strong Photoshop and Illustrator skills
•   Strong organizational skills
•   Heroic get-it-done attitude
•   Ability to thrive under tight deadlines
•   Bachelor’s degree in design-related discipline preferred
•   1+ years of industry experience preferred
•   Must provide samples*


*Submit samples as URLs or PDF with no more than five examples.  
Please provide a brief description of your role in each project.



Keywords: flash designer, flash developer, web designer, web  
developer, web programmer




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Job - Flash Designer

2007-02-01 Thread Bill Abel

Send inquiries/resumes/portfolios to [EMAIL PROTECTED]


On Feb 1, 2007, at 9:02 AM, Bill Abel wrote:


Birmingham, AL
Flash Designer


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Mac Projector won't go fullscreen

2006-12-08 Thread Bill Abel
I've not had time to try it that way yet. I didn't have time to  
experiment.

-b


On Dec 7, 2006, at 8:13 PM, Bill Napier wrote:


That's weird. I'll be doing this soon too. So, this won't work?
//1
//2
fscommand(fullscreen,false);
//3
fscommand(fullscreen,true);

It would be worth it, to elimate the flicker.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] loading external files with a mac projector on cd-rom

2006-12-07 Thread Bill Abel

The problem was the .DS_store was removed...

However, I still couldn't get the path worked out to access the ISO  
data from the Mac projector on a Hybrid disc. I just put a copy of  
the shared data on both the ISO and Mac volumes...


-b



On Dec 7, 2006, at 4:53 AM, Derek Stottlemyer wrote:


Hello Bill,
//Mac
var path=slides:

On Mac, folders are separated by a : not a /. I usually have a  
folderSep

variable which I set depending on the platform.
i.e.

var folderSep=/;
if (isMac){ // However you want to tell if it is a Mac.
folderSep=:;
}
var path=slides+folderSep;

HTH,
Derek

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bill  
Abel

Sent: Thursday, December 07, 2006 12:27 AM
To: Flashcoders mailing list
Subject: [Flashcoders] loading external files with a mac projector on
cd-rom


I'm loading some JPEGs into a movieclip using a projector.

When I burn the files to disc, it works fine in Windows, but my Mac
projector can't find the JPEGs.

myClip.loadMovie(path+slide+.jpg);

I tried adding in _url to the path, but that didn't solve the
problem. I don't think I need colons for OS X.

Here's my code:

// Launch in fullscreen mode
fscommand(fullscreen, true);

// initialize variables
var path = slides/;
var totalSlides = 28;
var slide = 1;

//initialize - load first slide
holder.loadMovie(path+slide+.jpg);

// define navigation
// next slide button
forward_btn.onRelease = function() {
switch (slide) {
case 1 :
slide++;
holder.loadMovie(path+slide+.jpg);
break;
case totalSlides :
break;
default :
slide++;
holder.loadMovie(path+slide+.jpg);
break;
}
trace(slide);
};
// previous slide button
back_btn.onRelease = function() {
switch (slide) {
case 1 :
break;
case totalSlides :
slide--;
holder.loadMovie(path+slide+.jpg);
break;
default :
slide--;
holder.loadMovie(path+slide+.jpg);
break;
}
trace(slide);
};
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


__ NOD32 1906 (20061206) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Mac Projector won't go fullscreen

2006-12-07 Thread Bill Abel
My projector won't go fullscreen on all macs. It works on some, and  
not on others.


I think it works on machines with version 9 installed. I don't know  
why that would affect it since it is stand-alone.


I've searched all the forums and found someone having the problem  
just a few months ago, but no answers to the problem.


Anyone know how to resolve this?

To clarify, fscommand(fullscreen,true); is not working on some  
macs. Works on mine with Flash Player 9 installed.


-b


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Mac Projector won't go fullscreen

2006-12-07 Thread Bill Abel
I'm using a projector not Flash Player. A projector is a stand-alone  
application that has the player embedded.





On Dec 7, 2006, at 1:02 PM, T. Michael Keesey wrote:


Just out of curiosity, if you're using FP9, then why are you using
fscommand instead of ExternalInterface?

On 12/7/06, Bill Abel [EMAIL PROTECTED] wrote:

My projector won't go fullscreen on all macs. It works on some, and
not on others.

I think it works on machines with version 9 installed. I don't know
why that would affect it since it is stand-alone.

I've searched all the forums and found someone having the problem
just a few months ago, but no answers to the problem.

Anyone know how to resolve this?

To clarify, fscommand(fullscreen,true); is not working on some
macs. Works on mine with Flash Player 9 installed.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Mac Projector won't go fullscreen

2006-12-07 Thread Bill Abel

Found a work around in a Google Flash Group.

Basically, you make the fullscreen call in frame one, then turn it  
off in frame 2, and call it again in frame 3. It flickers when  
launched, but it works.


http://groups.google.com/group/macromedia.flash/browse_thread/thread/ 
beb8c01c67e0501a/4589a649457f5686?lnk=stq=mac+projector+won%27t+go 
+full+screenrnum=1hl=en#4589a649457f5686



On Dec 7, 2006, at 11:11 AM, Bill Abel wrote:

My projector won't go fullscreen on all macs. It works on some, and  
not on others.


I think it works on machines with version 9 installed. I don't know  
why that would affect it since it is stand-alone.


I've searched all the forums and found someone having the problem  
just a few months ago, but no answers to the problem.


Anyone know how to resolve this?

To clarify, fscommand(fullscreen,true); is not working on some  
macs. Works on mine with Flash Player 9 installed.


-b


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] loading external files with a mac projector on cd-rom

2006-12-06 Thread Bill Abel

I'm loading some JPEGs into a movieclip using a projector.

When I burn the files to disc, it works fine in Windows, but my Mac  
projector can't find the JPEGs.


myClip.loadMovie(path+slide+.jpg);

I tried adding in _url to the path, but that didn't solve the  
problem. I don't think I need colons for OS X.


Here's my code:

// Launch in fullscreen mode
fscommand(fullscreen, true);

// initialize variables
var path = slides/;
var totalSlides = 28;
var slide = 1;

//initialize - load first slide
holder.loadMovie(path+slide+.jpg);

// define navigation
// next slide button
forward_btn.onRelease = function() {
switch (slide) {
case 1 :
slide++;
holder.loadMovie(path+slide+.jpg);
break;
case totalSlides :
break;
default :
slide++;
holder.loadMovie(path+slide+.jpg);
break;
}
trace(slide);
};
// previous slide button
back_btn.onRelease = function() {
switch (slide) {
case 1 :
break;
case totalSlides :
slide--;
holder.loadMovie(path+slide+.jpg);
break;
default :
slide--;
holder.loadMovie(path+slide+.jpg);
break;
}
trace(slide);
};
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] HTTP post request in the background

2006-09-21 Thread Bill Abel
I'm still having one problem. When I test this movie from within  
Flash, it sends both LoadVars, but when I try it from the .swf on the  
web server, it only sends to the .php script.


Anyone see the problem?


import mx.utils.Delegate;

function onResponseComplete(success:Boolean):Void {
getURL(http://www.hallmanhill.com/information/thankyou.html;);
trace(posted data);
}
function onMailDataResponseComplete(success:Boolean):Void {
trace(sent email);
}

function processForm() {

var response = new LoadVars();
var formData:LoadVars = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.homephone1 = areacode;
formData.homephone2 = prefix;
formData.homephone3 = linenumber;
formData.email = email_tb.text;

response.onLoad = Delegate.create(this, onResponseComplete);
	formData.sendAndLoad(http://www.salescloser.com/ 
XMLAddContact.aspx, response);

trace(formData);

var mailData = new LoadVars();
var mailDataResponse = new LoadVars();
mailData = formData;
	mailDataResponse.onLoad = Delegate.create(this,  
onMailDataResponseComplete);
	mailData.sendAndLoad(http://test.slaughtergroup.com/mail.php;,  
mailDataResponse, POST);

trace(mailData);

}

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] HTTP post request in the background

2006-09-21 Thread Bill Abel

IT is a long name...

I tried that with no luck.

I also tried commenting out the getURL(), but still no luck.

I get an error in Safari and in Firefox a message waiting for  
www.salescloser.com...


Again, the .swf works when I test it within Flash.

Even without the second LoadVars, I still can't get it to work in the  
browser. Do you think it's something to do with the ASPX script?




On Sep 21, 2006, at 1:07 PM, Mike Keesey wrote:


onResponseComplete is probably being called before
onMailDataResponseComplete (damn that's a long name! onMailComplete
would suffice, no?), and thus unloading the whole SWF as it loads a  
new

HTML page.

Try moving this line:

formData.sendAndLoad(http://www.salescloser.com/XMLAddContact.aspx;,
response);

... to the very end of your processForm() function.
―
Mike Keesey


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Bill Abel
Sent: Thursday, September 21, 2006 10:20 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] HTTP post request in the background

I'm still having one problem. When I test this movie from within
Flash, it sends both LoadVars, but when I try it from the .swf on the
web server, it only sends to the .php script.

Anyone see the problem?


import mx.utils.Delegate;

function onResponseComplete(success:Boolean):Void {
getURL(http://www.hallmanhill.com/information/thankyou.html;);
trace(posted data);
}
function onMailDataResponseComplete(success:Boolean):Void {
trace(sent email);
}

function processForm() {

var response = new LoadVars();
var formData:LoadVars = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.homephone1 = areacode;
formData.homephone2 = prefix;
formData.homephone3 = linenumber;
formData.email = email_tb.text;

response.onLoad = Delegate.create(this, onResponseComplete);
formData.sendAndLoad(http://www.salescloser.com/
XMLAddContact.aspx, response);
trace(formData);

var mailData = new LoadVars();
var mailDataResponse = new LoadVars();
mailData = formData;
mailDataResponse.onLoad = Delegate.create(this,
onMailDataResponseComplete);
mailData.sendAndLoad(http://test.slaughtergroup.com/mail.php;,
mailDataResponse, POST);
trace(mailData);

}

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] HTTP post request in the background

2006-09-21 Thread Bill Abel
Well, I tried it by itself without the mailData:LoadVars... still no  
luck in the browser.


Worked fine testing it...


On Sep 21, 2006, at 1:31 PM, Mike Keesey wrote:


Actually, scratch that -- move the whole formData deal to its own
function, and call that from onMailComplete(). IOW, do the calls
sequentially, not simultaneously.
―
Mike Keesey


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Mike Keesey
Sent: Thursday, September 21, 2006 11:07 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] HTTP post request in the background

onResponseComplete is probably being called before
onMailDataResponseComplete (damn that's a long name! onMailComplete
would suffice, no?), and thus unloading the whole SWF as it loads a

new

HTML page.

Try moving this line:

formData.sendAndLoad(http://www.salescloser.com/XMLAddContact.aspx;,
response);

... to the very end of your processForm() function.
―
Mike Keesey


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Bill Abel
Sent: Thursday, September 21, 2006 10:20 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] HTTP post request in the background

I'm still having one problem. When I test this movie from within
Flash, it sends both LoadVars, but when I try it from the .swf on

the

web server, it only sends to the .php script.

Anyone see the problem?


import mx.utils.Delegate;

function onResponseComplete(success:Boolean):Void {
getURL(http://www.hallmanhill.com/information/thankyou.html;);
trace(posted data);
}
function onMailDataResponseComplete(success:Boolean):Void {
trace(sent email);
}

function processForm() {

var response = new LoadVars();
var formData:LoadVars = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.homephone1 = areacode;
formData.homephone2 = prefix;
formData.homephone3 = linenumber;
formData.email = email_tb.text;

response.onLoad = Delegate.create(this, onResponseComplete);
formData.sendAndLoad(http://www.salescloser.com/
XMLAddContact.aspx, response);
trace(formData);

var mailData = new LoadVars();
var mailDataResponse = new LoadVars();
mailData = formData;
mailDataResponse.onLoad = Delegate.create(this,
onMailDataResponseComplete);
mailData.sendAndLoad(http://test.slaughtergroup.com/mail.php;,
mailDataResponse, POST);
trace(mailData);

}

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] HTTP post request in the background

2006-09-20 Thread Bill Abel
How do you post an array to a server side-script without loading the  
script's URL in the browser.


I can post data using Ruby's Net::HTTP and it works great in a rails  
app. I want to do the same thing in Flash.


LoadVars.send will only work if I load the script's URL into the  
browser. This would be fine if I controlled the script, but it's on  
another application server. I need to pass it the data in the  
background. I tried .sendAndLoad, but that has the same problems.


Is there a simple way to do this? Can I use flash remoting and pass  
the data to a PHP script and make the post from there? I see there is  
a way to do this with Cold Fusion using the CF.http() method, so I  
assume there is something similar elsewhere.


thanks.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] HTTP post request in the background

2006-09-20 Thread Bill Abel

Here is what I have now with only the .send method.

I tried using sendAndLoad(url, null, POST)...as well as several  
different ways.


This is my currently working version. I've commented out the parts  
that I need to work. The function process the phone number and then  
puts everything into a LoadVars array to send. Right now it's sending  
it to a formmail.pl script which redirects you.


I need the LoadVars to be posted to the .aspx script. I don't need to  
receive anything back.



function processForm() {
//process phone number
var full_phone_number = phone_tb.text;
split_number = full_phone_number.split();
for (var i = 0; isplit_number.length; i++) {
if (split_number[i] == \r ||
split_number[i] == \n ||
split_number[i] == \f ||
split_number[i] == \t ||
split_number[i] ==   ||
split_number[i] == - ||
split_number[i] == . ||
split_number[i] == ( ||
split_number[i] == )) {
//trace(Found a:  + split_number[i]);
split_number.splice(i, 1);
i--;
} else {
if (split_number.length  7) {
//split into area code, prefix, and line number
var areacodea = split_number.slice(0,3);
var areacode = areacodea.join();
var prefixa = split_number.slice(3,6);
var prefix = prefixa.join();
var linenumbera = split_number.slice(6,10);
var linenumber = linenumbera.join();
//trace(3 parts + areacode +   + prefix +   + 
linenumber);
} else {
// split into prefix and line number
var prefixa = split_number.slice(0,3);
var prefix = prefixa.join();
var linenumbera = split_number.slice(3,7);
var linenumber = linenumbera.join();
//trace(2 parts + prefix +   + linenumber);
}
//number = split_number.join();
//trace(number);
}
}
errorVars = new LoadVars();
formData = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.phone = phone_tb.text;
//formData.homephone1 = areacode;
//formData.homephone2 = prefix;
//formData.homephone3 = linenumber;
formData.email = email_tb.text;
//formData.Protocol = Ing;
trace(formData);
	formData.send(http://www.hallmanhill.com/cgi-sys/FormMail.pl;,  
_self, POST);
	//formData.sendAndLoad(https://www.salescloser.com/ 
XMLAddContact.aspx);

}




On Sep 20, 2006, at 2:57 PM, Gustavo Teider - Adobe Flash Developer  
wrote:



Bill Abel escreveu:
How do you post an array to a server side-script without loading  
the script's URL in the browser.


I can post data using Ruby's Net::HTTP and it works great in a  
rails app. I want to do the same thing in Flash.


LoadVars.send will only work if I load the script's URL into the  
browser. This would be fine if I controlled the script, but it's  
on another application server. I need to pass it the data in the  
background. I tried .sendAndLoad, but that has the same problems.


Is there a simple way to do this? Can I use flash remoting and  
pass the data to a PHP script and make the post from there? I see  
there is a way to do this with Cold Fusion using the CF.http()  
method, so I assume there is something similar elsewhere.


thanks.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


always i used sendAndLoad method to do this ...

its works fine ...

what your code ?

did you create two loadVars ?

one to post , other to get ?

[]´s

--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Re: [Flashcoders] HTTP post request in the background

2006-09-20 Thread Bill Abel

This works. Thanks so much!

Here's the final code...

// *** Post data to Sales Closer ***
import mx.utils.Delegate;

function onResponseComplete(success:Boolean):Void {
trace(Completed);
}

function processForm() {
//process phone number
var full_phone_number = phone_tb.text;
split_number = full_phone_number.split();
for (var i = 0; isplit_number.length; i++) {
if (split_number[i] == \r ||
split_number[i] == \n ||
split_number[i] == \f ||
split_number[i] == \t ||
split_number[i] ==   ||
split_number[i] == - ||
split_number[i] == . ||
split_number[i] == ( ||
split_number[i] == )) {
//trace(Found a:  + split_number[i]);
split_number.splice(i, 1);
i--;
} else {
if (split_number.length  7) {
//split into area code, prefix, and line number
var areacodea = split_number.slice(0,3);
var areacode = areacodea.join();
var prefixa = split_number.slice(3,6);
var prefix = prefixa.join();
var linenumbera = split_number.slice(6,10);
var linenumber = linenumbera.join();
//trace(3 parts + areacode +   + prefix +   + 
linenumber);
} else {
// split into prefix and line number
var prefixa = split_number.slice(0,3);
var prefix = prefixa.join();
var linenumbera = split_number.slice(3,7);
var linenumber = linenumbera.join();
//trace(2 parts + prefix +   + linenumber);
}
//number = split_number.join();
//trace(number);
}
}
var response = new LoadVars();
var formData:LoadVars = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.homephone1 = areacode;
formData.homephone2 = prefix;
formData.homephone3 = linenumber;
formData.email = email_tb.text;
trace(formData);
response.onLoad = Delegate.create(this, onResponseComplete);
	formData.sendAndLoad(http://www.salescloser.com/ 
XMLAddContact.aspx, response);

}


On Sep 20, 2006, at 3:31 PM, Mike Keesey wrote:


You should use something along these lines:

import mx.utils.Delegate;
function onResponseComplete(success:Boolean):Void {
// Do something in response.
}
var request:LoadVars = new LoadVars();
// Set up variables in request.
var response = new LoadVars();
response.onLoad = Delegate.create(this, onResponseComplete);
request.sendAndLoad(url, response);

―
Mike Keesey


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com