Perception
05-25-2005, 01:21 PM
I currently developing an application to be able to use a third party service for SMS messaging, the code works but opens a browser window which I do not want to do, the app will run in the flash player only (this is for security as the app is only intended for local use not internet)
simplified:
I have a text input box (_level0.phone) where the phone number is to be entered and a button that sends the message.
the code behind the button is as follows (Passwords and secure info removed)
on (press) { // send sms text or flash message using http protocol
var user_name="User Name"; // Enter Server User Name
var password_account="Password"; // Enter Server Password
var text="Text to send"; //Message section
var msg_type="TEXT";
// the next line puts together the http header
var header_http='http://THIRDPARTYURL?user=' + user_name + '&passwd=' + password_account + "&text=" + text + "&msg_type=" + msg_type + "&sendto=" + _level0.phone ;
trace ("httpstring=" + header_http);
//getURL(header_http) // works correctly but opens new window
}
i have tried using LoadVars.sendAndLoad(header_http)
but get an error
The property being referenced does not have the static attribute.
I can send the SMS using getURL, but because the application will run only in flash player i do not want the browser window to open
any assistance greatly appreciated (Timescale)
simplified:
I have a text input box (_level0.phone) where the phone number is to be entered and a button that sends the message.
the code behind the button is as follows (Passwords and secure info removed)
on (press) { // send sms text or flash message using http protocol
var user_name="User Name"; // Enter Server User Name
var password_account="Password"; // Enter Server Password
var text="Text to send"; //Message section
var msg_type="TEXT";
// the next line puts together the http header
var header_http='http://THIRDPARTYURL?user=' + user_name + '&passwd=' + password_account + "&text=" + text + "&msg_type=" + msg_type + "&sendto=" + _level0.phone ;
trace ("httpstring=" + header_http);
//getURL(header_http) // works correctly but opens new window
}
i have tried using LoadVars.sendAndLoad(header_http)
but get an error
The property being referenced does not have the static attribute.
I can send the SMS using getURL, but because the application will run only in flash player i do not want the browser window to open
any assistance greatly appreciated (Timescale)