Link to home
Start Free TrialLog in
Avatar of billybrown1
billybrown1

asked on

sms interaction with flash

I have a 3D papervision component which displays rotating JPG thumbnails in a 3D space. Each thumbnail will have a code on it that when texted via sms it plays this thumbnail in full screen which would be an external swf. If you preview the file and mouse click on a thumbnail it does just this (some swfs arent loaded yet so it just displays a jpg) what i need it to do is the same thing but be triggered by an sms message as opposed to mouse interaction.

I was working on another version of this which was just a 2D interface and had some as code which queried the sms software xml file every few seconds checkin for new texts then going to the chosen video (frame label) when it received one. What im having trouble with is getting it to work with the 3D component. Below is the original code i was using;



Project Link: http://uploading.com/files/RTVDDP44/INTERACTIVE SMS.zip.html

Many thanks in advance.


import mx.xpath.XPathAPI;
 
var request_xml:XML = new XML();
var response_xml:XML = new XML();
response_xml.ignoreWhite = true;
 
response_xml.onLoad = function(success:Boolean) {
	trace("XML Loaded" + this);
	
	if (success) {
		var thePath_str:String = "/response/data/message/messagedata"
		//var thePath_str:String = "/rss/channel/item/title";
		var title_array:Array = XPathAPI.selectNodeList(this.firstChild, thePath_str);
		trace ("XML Message length=" + title_array.length);
		
		if (title_array.length > 0){
			frameTarget = title_array[0].firstChild.nodeValue;
			trace("Frame Target="+frameTarget);
			if (frameTarget == "101"){
				gotoAndPlay("101");
			} else if (frameTarget == "102"){
				gotoAndPlay("102");
				
			} else if (frameTarget == "103"){
				gotoAndPlay("103");
				
			}
		}	else {
			trace ("no message in xml");
			gotoAndPlay("checkInbox");
		}
		
	} else {
		trace("error loading XML");
	}
};
 
 
 
 
function loadRSS():Void {
	trace("loading RSS");
	request_xml.sendAndLoad("http://127.0.0.1:9501/api?action=receivemessage&username=admin&password=abc123&folder=inbox&limit=1&afterdownload=mark", response_xml);
}

Open in new window

Avatar of rascalpants
rascalpants
Flag of United States of America image


the code you posted does not have any button interactions in it...  can you post your code that controls the mouse states of tthe thumbnails?

but basically, you would just tap into the same code that controls the mouse click...    you fire off that function based on a unique identifier...


rp / ZA
Avatar of billybrown1
billybrown1

ASKER

the button interaction is within the component itself i think, the only thing you can control is the parameters of the component. I made a text box with for what i need and in theory i should just need to replace this interaction with my original code but i cant seem to get it too work with the component. See example attached, thanks :).

can you point me in the direction of the documention for the component... almost always, a component will have an open API to methods available, or at the very least allow you to use event callbacks.

rp / ZA
http://www.flashloaded.com/flashcomponents/3dwall/

 On the right hand side of the page is a link ('3D wall 'PRO' userguide') to the PDF guide. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of rascalpants
rascalpants
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i had a look and im not sure exaclty how i would implement this, my knowledge of as is very basic.