ActionScript 1/2 :: URL Decode Street Addresses From PHP
May 6, 2009
I had a php programmer write me a script to download information from a local real estate board, and it works great, but we had to have it download to an xml file using urlencode in php (there were characters in the listings that caused problems - ie. > < & "). Anyways, now I'm parsing the information in flash, and still left with a few "+" signs between street names (ie. Bear+Mountain Road).
I tried adding:
var loadVars:LoadVars = new LoadVars();loadVars.decode(i.attributes.street);trace(i.attributes.street);
In my actionscript, but I still end up with "Bear+Mountain Road."
I guess either the "decode" function doesn't work to remove "+" signs, or I'm using the wrong thing. Right now it seems to be ONLY "+" signs, so even if there is a way to search the attribute and remove them that would be great!
I have a (flex) app that, on the click of a button, resize a div (in javascript) at the bottom of the page and shows your position in google street view in it.
The things is that if I open the browser at 80% of width, click on the button and then maximize the window, the div won't take 100% of width. I have a function that his being called 'onResize' on the body tag of the page, but it doesn't seems to work. Here is the code :
function handleResize() { document.getElementById('streetviewDiv').style.width='100%'; } ... <body onResize="handleResize()">
How can I achieve the auto-resize of the street view? There must be a specific id for that object so that we could get it by javascript, but I haven't found it.
In my project, I need to get all IP adresses from my PC. I find out, that if I have more than one LAN it is quite problem. I use ZINC to get IP adress from my PC: var ipAddress:String = mdm.Network.IPAddress; but this get me only one IP and no all of them.
I want to make a *.SWF in which the user inserts an address in the first frame, then in the second frame Google Maps shows that place. The problem is that I don't know how to zoom on a point without LatLng parameter. Probably, Geocoding would be the solution, but as I said earlier, I don't understand how it works in Flash. Could someone please either post a few lines or direct me to an example of geocoding in Flash?
How would I use ASFunction with dynamic texts? Can someone gimme a example (code not .fla)...How would I display the IP address of a person with flash?Complicated:A person views my signature. It shows the IP Address of a person along with a input box for their name. They type in their name. How would I make it so that, after a name is typed in and a button is pressed, both the name and the IP address are sent to a file? Only I can view the file. Well, the file could be called list.php or list.txt...and then I can CHMOD it so others can't view it...
Basically at my school we are doing a project that allows you to walk around the school like you can on "Google Street View". Me being a geek, the teacher asked me to make a prototype using my house to see if this idea would work. So today I went on Flash and made two working Flash/SWF files, one being a "Google Street View"type of thing of my upstairs and one of my downstairs of my house. I made two SWFs because at school there are many different people working on the project so there will be many different SWFs to combine.
So after making the two SWFs (the upstairs one called Untitled-2 and the downstairs called downstairs) I tried to merge them together. Each one of the SWFs have action script on these" Arrows" that allows you to guide around my house. The action script on all the arrows is:
on (Release) { gotoAndStop(Frame Number); }
I made a new Flash Document and one the first scene I had a Button That Said "Begin". Once Pressed, it takes you to scene 2. On scene two I went to File > Import > Import to Library and Selected Untitled-2.swf. Untitled-2.swf was then in my library. I clicked and dragged it into the stage of Scene 2 and in the timeline only 1 keyframe pooped up. I thought it would work so I previewed the Flash Movie. The Begin Button show up, and when I clicked it preview file Flashed each Keyframe in Untitled-2.swf even though the first frame in Untitled-2.swf has the action script: stop(); The whole thing is uncontrollable and I dont know what to do. I hope you understood what I wrote (Im not the best with spelling and grammar). So in a nut shell, how can I combine 2 SWF files In Flash, whilst maintaining all the action script in each file.
Right now I am using ArrayCollection. But I want to change that to Set as I want make sure do duplicate values come.
var addressList:ArrayCollection = new ArrayCollection();
One way is I can use Dictionary and store addresses as a key. And I can just use keys to iterate. But I am looking for Java HashSet like implementation.
I have managed to install the trial version of FMS - developer 4.5 using the defaults including Apache, and it works reasonably well. However it has used-up all the available IP addresses so that IIS does not now work. I need IIS and FMS to reside together on the same server, as IIS provides document download and upload for our web-site on a different server. I have tried changing the FMS.ini file to limit the IP and Ports used, but to little use. My server is Win2k8 R2, and IIS V7.5 + V7.0 for FTP; all 64bit.
I'm using the weather.com XML service to retrieve forecast data. I created an instance of UrlLoader and passed the entire HTTP address including credentials, location and other parameters to it. This works very well in tandem with the XML(urlLoader.data) functionality in that I get the result for the specified location ID. I then use E4X to trace just the nodes needed.
The tricky part is that I have to do this for 19 additional cities. I've done the initial work in the Main class, Main function, private function onXmlLoaded. I tried creating a new public function getCityName making the new URLRequest, tracing XML and adding values to my components. However, when I attempt this, I receive
Error 5006: An ActionScript file cannot have more than one externally visible definition.
How can I easily setup the URLRequest to request data for all 20 cities, and parse the results thereafter? Do I pass an array of location IDs to URLRequest, because that's the only part of the HTTP request that's different. Do I create separate ActionScript files with their own class and functions for each of the 20 queries?[code]...
I have a comboBox that I need to associate different email addresses with the different selections (the "selections" are the labels of the comboBox - not the data... the data fields for the comboBox are blank). right now, as written it returns "email2" no matter which I pick.
Code: if (comboBoxName.getValue() == (("selection1") || ("selection2") || ("selection3") || ("selection4") || ("selection5") || ("selection6") || ("selection7") || ("selection8"))) { var comboSelectionEmail = "email1"; } else { var comboSelectionEmail = "email2"; } Also, is there an easier way to do this than by using the if statement?
I am trying to add the event target name to the string addresses. The MC I am trying to target is called 'scotlandAddresses'. I tried the code below.[code]
How would I use ASFunction with dynamic texts? Can someone gimme a example (code not .fla)...How would I display the IP address of a person with flash?Complicated: A person views my signature. It shows the IP Address of a person along with a input box for their name. They type in their name. How would I make it so that, after a name is typed in and a button is pressed, both the name and the IP address are sent to a file? Only I can view the file. Well, the file could be called list.php or list.txt...and then I can CHMOD it so others can't view it...
I am new to flash and am trying to achieve the following: My website for Salou currently has a static image of google street view, i want to incorporate a live version that will be available on the ipad and ipod touch, will this work as i am told that google street view uses a flash plugin.
way to convert an email address once entered in a textfield as an object like shown in this image on MS office outlook ;
the point is that now in outlook as my cursor is positioned just after "user2@gmail.com" if I click backspace I will delete the entire email address, as if it was one object and not simple text entered.
I'm trying to make a button to load an input text field for email addresses. I've been trying lots of different approaches but nothing seems to be working.Code:Quote:
on (release) {loadVariablesNum("subscription.php",0,"POST"); gotoAndStop("thanks"); }
I just need the button to communicate with the PHP code I have setup.
I am wondering how to make a 360º view bubble, like they use for Google Street View, but have no idea how to go at accomplishing this task... i have the string of photos that i attached in photoshop(so that if you connected the left to the right it would be a full 360º view).
I have a problem with getting a string from server. When I get the string, it is encoded and I don't know how to encode it. In the string are normal characters and instead of special symbols are eg u010d, u011b and others. Are there some function to decode it?
If I URL encode my flashvars, is there a prefered technique/method(s) for handling them inside as3?
During some of my testing, I recently url encode the = and & symbols, but my AS did not seem to translate them when using LoaderInfo(this.root.loaderInfo).parameters (Maybe I was doing it wrong... Hehe, it has been known to happen.) Question: Using AS3, should I decode the parameters? Or, does that happen automatically?
I assume I need to run some sort of url decode. What is the best way to handle Flashvars? Do you folks have any tips?
Simply said, I want to have an inputtextfield, a button that is linked to the textfield and a dynamic textfield as an display, to display stuff, which comes from the inputtextfield and the button.Then, I want to have items in the actionscript, like item1 = 5, or item1 = 1a, or 1a = item1. Just some code that equals to another code. But for now item1 = 5.For the button that is linked to the input textfield, has to calculate something when pressed and the dynamic textfield will display it. So if I would type in the inputtextfield 5 and press the button, it will be as example multiplied by 2, so the dynamic textfield will show 10.
Still following? The point is, I know how to set something like that up, but what I want is that when I type item1 in the textfield (which equals to 5) and press the button the dynamic text will show 10, because "2 x instance name inputtextfield" (in which intem 1 is typed, which equals 5) should be 10 right? But when I try to do this, the dynamic text will show nothing or some error. but when I type directly in the code "2 x item1" and press the button it will show 10. But I want it to double link, so "2 x (instancename inputtextfield which equals to what is typed in the field, this case: item 1 which equals to 5) and not that it stops to item1, so it will freak.
I want to know if it is possible to get the decoded frames from FLVPlayback, or if it is known another alternative to access the decoded frames from a flash player. What I want to do is to manipulate the decoded frames before they get rendered on screen. The video source could be an RTMP stream or a FLV (F4V) file.
At the moment it seems I've tried every trick in the book trying to get this to work. I need some way of encoding AMF requests and then decoding the responses. At this point I don't care what language it's in, as long as it's doable and free (as in to me), however I would prefer PHP.I don't know what other information is needed