LoadVars doesn't work everytime

On both my offline pc in using "test" withing Flash 8 and AS
2.0, and on my unix webhosting server,
I wrote a php script that saves name-value pairs from mysql
(Yeah ! Finally - if you read my other posts here!)
&keyword10=keyword1&keyword11=organelle&keyword12=photosynthesis&keyword13=digestion&keywo rd14=&keyword15=&keyword16=
However, both in the flash enviroment using "test" and in
executing the swf after uploading to my server
http://www.4themax.com/education/regents_quest/quiz.swf
sometimes the LoadVars loads and decodes the name-value
pairs, and other times doesn't.
Any insight? I haven't uncovered anything in searching this
forum nor in googling.
The LoadVars AS 2.0 is (which is in the main timeline):
traces were inserted for debugging during the AS development
process.
//sqlcache
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function (success:Boolean):Void {
if (success) {
//Convert the variable string to properties
my_lv.decode(my_lv.toString());
//trace(my_lv.toString());
// Iterate over properties in my_lv
i=0;
for (var prop in my_lv) {
//trace(prop+" -> "+my_lv[prop]);
//trace(i+" prop : "+prop);
//trace("my_lv: "+my_lv[prop]);
i++;
t = i-2; // used to find total array elements because the
decode process populates the elements in reverse order
//trace(t);
} else {
trace("Unable to load external file.");
my_lv.load("sqlcache.txt");
//sqlcache.txt
//sqlcache repeat
var my_lv2:LoadVars = new LoadVars();
my_lv2.onLoad = function (success:Boolean):Void {
if (success) {
//Convert the variable string to properties
my_lv2.decode(my_lv2.toString());
//trace(my_lv.toString());
// Iterate over properties in my_lv
i=0;
for (var prop in my_lv2) {
//trace(prop+" -> "+my_lv[prop]);
j=t-i;
_global.keywords[j] = my_lv2[prop];
//trace(j+" "+_global.keywords[j]);
//trace(j+"my_lv: "+my_lv2[prop]);
i++;
} else {
trace("Unable to load external file.");
my_lv2.load("sqlcache.txt");
//sqlcache.txt repeat

Again, you're welcome.
Using LoadVars is only one way to do this. And you should
urlencode your values in your serverside script before returning
them. That way you can pass "?" or "=" in the values if you need
to, they will just be encoded to allow that to work properly (this
is important because there will be other values like "%" that will
be affected as well I believe).
Other ways to do it include: flash remoting,which lets you
pass complex objects as well as returning complex objects, xml
which lets you represent complex objects (in whatever way you
choose) more easily, and even json -javascript object notation-
which can also represent complex objects and is fast to encode on
the server (e.g. with php 5) but is a little slower to transfer and
to decode on the flash side compared with remoting/amfphp for
example (see json.org for actionscript classes - I use this on my
own website for pseudo-ajax style dynamic content loading).

Similar Messages

  • Bookmarks doesn't work everytime there is a firefox update.

    Bookmarks doesn't work everytime there is a firefox update. Its a recurring problem
    The most recent update is to firefox 3.6.8.
    == Operating system ==
    vista

    See http://kb.mozillazine.org/Locked_or_damaged_places.sqlite

  • Satellite 1900-803: Hi-Speed USB 2.0 card doesn't work

    i have a satellite 1900-803 laptop. I recently bought and installed a Belkin Hi-Speed USB 2.0 Notebook Card but it doesn't work. the card's manual says that after successful installation i should see a second "universal serial bus controllers" heading which i didn't. i even had it replaced it with another one thinking that there might be some problems with the drivers, but it still doesn't work. everytime i plug in a device such as an mp3 player, a digital camera or a usb storage device, windows just suddenly locks itself up, the cursor won't move, the ctrl-alt-del function doesn't work, and the worst of all, i can't turn off the machine!
    the card says that it runs on any 32-bit slot.
    i've browsed the user's manual and the device manager to see if mine is a 32-bit one, but i can't really find it. is this probably the reason why it won't work? or is there any other reason for it not working? if this is the reason, is there a way where i can upgrade my laptop's pc card slot to make it work?
    please help.
    i've posted this question yesterday morning and haven't got a single reply. is it because it has got to do with an older laptop? please, anybody, help..........
    Message was edited by: wes0702

    Hi
    Did you check the Bios? I assume the Toshiba Bios was preinstalled on your notebook. Am I right? There should be an option for changing the PC card controller mode.
    There you can change the controller mode to auto-selected, PCIC compatible or Card bus/16-bit.
    If the card supports 32 bit so you shouldnt use the 16bit option.
    I think you should play a little bit with this option and possibly the card will work.

  • Updated iTunes to 10.5, iTunes won't work now! Everytime I open iTunes it just freezes and I can't click on anything. It says to take it out of compatibility mode and still doesn't work! any help??

    Updated iTunes to 10.5, iTunes won't work now! Everytime I open iTunes it just freezes and I can't click on anything. It says to take it out of compatibility mode and still doesn't work! any help??
    Thank you. Nick

    Okay, we'll try the technique from the following post. Be sure to be logged in to your usual user account when doing so. (Otherwise you'll be editing the wrong set of HKEY_CURRENT_USER keys.)
    Re: How do I turn off the compatibility mode for ITunes.
    Does that clear up the compatibility message?

  • I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    Freezing, or crashing?
    ID on the Mac can produce reports that may (or may not) prove helpful in diagnosing the problem. I suspect this is something not directly related to InDesign, and maybe not to any of the Adobe apps directly since you seem to be having a problem in more than one. That often inidcates a problem at the system level.
    Nevertheless, it won't hurt to try to gather the reports. You'll find driections for how to generate them, and to post them on Pastebin.com (then put a link to them here) so we can see what's going on at Adobe Forums: InDesign CS5.5 Not Responding
    Do you happen to run a font manager? If so, which one, and waht version?

  • TS2289 I don't what's going on but everytime i press my spacebar to see my movie it doesn't work at all!!! What can i do?

    Can someone helpe me with this??? Everytime i press my spacebar to see how my movie is going it doesn't work at all!!!!!!!!

    Did it run OK under a new User-Account ?
    If so - then the need to clean out iMovie to re-install will not help at all but just be complicated.
    If it did run OK - Then
    • Delete iMovie pref. file
    iMovie pref. file resides.
    Mac Hard Disk (start-up HD)/Users/"Your account"/Library/Preferences
    not the Library at root level = first window when opening Your Macintosh HD (Mac OS) Start-Up HD
    and is named. (one or more of these)
    com.apple.iMovie.plist
    com.apple.iMovie3.plist
    com.apple.iMovie7.plist
    com.apple.iMovie8.plist
    com.apple.iMovie9.plist
    com.apple.iMovieApp.plist
    and find
    com.apple.iApps.plist
    While iMovie is NOT RUNNING - move this/these file/s out on to desk-top.
    Now restart iMovie.
    If You run Mac OS X.7 or more - then the Library in the User-account folder is invisibly and need to be set to be viewable. IT IS NOT in the Library on Root level (when opening MacintoshHD - first window = root level)
    ( It can be done like this: Open Terminal, then enter: chflags nohidden ~/Library
    Press return, then restart, and it will always be visible until the next major update, when you do the same thing again. )
    To find all parts of iMovie to trash to make a Clean Install - is not easy and there will be others that can guide You trough this process. - I never needed to do that - and I used iMovie since iMovie (1) > 10 Years
    Yours Bengt W

  • G'day, my name is allysa and I'm only 13 y/. I have a really big problem to my iPod, my home button doesn't work so I can't go back to any application everytime I want, what should I do ? Please help me

    G'day My name is allysa and I'm only 13 year old, I have a really big problem at my iPod touch. I'm really worried about my iPod touch home button doesn't work I'm not sure why is it broken,I never drop it or put water on it. Please apple support community please help me. I bought my iPod touch 2 years ago.

    Hi,
    You can use the alternative called assistive touch to enable assistive touch go to settings>general>Accessibility>scroll down to the bottom of the page and enable assistive touch a white dot at the bottom right of your screen will appear press the white dot and you will see the home button
    Hope this helps
    N.B. book an appointment with an apple genius although they will charge you if you get your iPod fixed by their repair services due to your warranty expiring 

  • Paste to another instrument doesn't work...

    Paste to another instrument doesn't work. Paste function work only in the same instrument.
    Everytime when I try to "CMD+V" Logic crashes...

    Help us understand your problem.
    What exactly are you trying to copy and paste?
    If it's MIDI data from one istrument track in Arrange to another, this should work.
    If you're trying to copy settings (ie a particular sound) from one software instrument to another, that's obviously not possible as all AU's (Audio Instruments) have different parameters and are unique, so their settings will only work for each instrument.

  • As hwd doesn't work anymore... [SOLVED]

    As hwd doesn't work anymore, I have a problem with installing and maintaining Xorg on my Arch machine. I recently reinstalled Archlinux on my desktop machine, and was unaware that Xorg had been updated.
    So when I tried to do my normal installation routine of installing all the necessary drivers, xorg and hwd, I ran into a problem. When I ran hwd -u + -xa, it said No X server installed. I searched around and found out that hwd was not supported any longer.
    So I figured i'd just do the manual configuration of Xorg. So I ran X -configure, and then ran the server. Everytime I did this, the computer would freeze up upon entering the environment.
    So I tried doing nvidia-xconfig, and ended up actually getting into the environment, but after all the xterm windows had popped up, it froze again everytime.
    After reading abit articles on the subject, I tried letting Xorg simply use HAL for it's hardware recognization. This time it worked, and I was able to enter the environment with no problem. So I went with this alternative, and installed Openbox.
    Now, the problem shows up when I enter the environment. I can clearly see that there's somewhat of a problem with the graphics. So I tried configuring a minimal xorg.conf to run along side HAL. This still didn't fix the problem. The problem is, there are areas of the screen that are SLIGHTLY blurry. For example, if I write something in xterm, then move it to certain parts of the screen, the text becomes mildly blurry. It's not a big problem, just irritating. But this little problem may be an indication of a bigger problem. I'm sensing I don't have 3D capabilities, but haven't tested yet.
    Another thing is; When I write something in xterm while in the environment, and I hold down the backspace button... Xorg simply crashes without any particular error.
    Anyway, my point is; I had an idea that, is there some way to make hwd recognize the xorg server as a older version, making it configure a file for it? I've never had any problem with xorg up until this new update, which irritates me alot, making me want to find some other distrobution of linux.
    I hope someone can help me fix this.
    Last edited by SomeoneWithAPurpose (2009-05-15 22:24:17)

    you could roll back your Xorg version to continue using hwd in the meantime...
    I'm assuming you've followed http://wiki.archlinux.org/index.php/Xor … _xorg.conf to try without xorg / with minimal xorg.  Have you ensured that your drivers are up to date?  I would attempt reinstalling video drivers, trying HAL again with NO xorg file, and if that fails, try it with minimal xorg.
    Hopefully someone comes along with a more concrete solution...I'm just hoping to steer you down a path of some new ideas (if you havent already tried this...)
    I had some trouble with the latest version.  Reinstalling video drivers and running with no xorg.conf was the fix...I know you said you tried this same thing, but you havent specified how new your drivers are or anything... Good luck and free bump!

  • Self assigned IP Address, wireless doesn't work

    After upgrading to Leopard I keep getting "AirPort has a self-assigned IP address and may not be able to connect to the Internet." when I try to connect to the wireless network. Thus, wifi does not work at all. I've researched it best I can and it seems to be a problem with the router assigning an IP address to the mac, but why didn't this happen in Tiger? However if I play around with it for awhile it will randomly start working, but the same method doesn't fix it everytime. It also works fine in bootcamp. If I physically plug into the router, it works fine. This problem didn't exist in Tiger at all.
    Message was edited by: SuperDupe453

    Follow-up:
    On the two laptops, I finally managed to get on line by switching to a different wireless access point, on a different modem. I surmise that the communication between the Macbook DHCP client and the modem/router's DHCP server is less than 100% effective. Looking at the modem/router, I could see that all of the Macs had active connections. But, instead of showing the names of the Macs, the page showed a star (*) for each Mac. I had to compare Mac addresses to verify the connections. The MAC address, of course, is hard-wired into the computer's network interface. It appears that either the DHCP client didn't know what question to ask when it broadcast for an IP address, or it couldn't interpret the answer. Except in the case of the iMac, which worked perfectly.
    I upgraded the MacPro last, since it is my primary machine. Same story--connection with self-assigned address, which is useless. However, this time, having nothing left to lose, I restarted the modem/router, which presumably dumped any inactive connections and issued new DHCP leases.
    However, I do have a few words for the Apple GENIUSES! The Leopard network preferences page puts me in mind of a maintenance free battery. A few of the older folks will remember when you bought a car battery that had to be filled with distilled water to reconstitute the electrolyte. Then, periodically, you check the level of the liquid in the battery, and added distilled water when required. Adding water was required on occasion because some of the water would boil off under certain conditions. Then, we got the maintenance free battery, which is virtually identical to the older battery design, except that you don't have to perform the maintenance of replenishing the water. It turns out, however, that maintenance free batteries do vent on occasion, and should have water added. But, you can't add water because the battery is sealed. So, the difference between conventional and maintenance free is not that the maintenance free battery doesn't need maintenance, it is that you can't perform the maintenance without voiding the warranty.
    The Leopard network preference page won't let you set the parameters that could restore a connection. If the DHCP client doesn't work automatically, you're stuck.

  • Systemd network-route configuration: defining source-ip doesn't work

    I have a machine that has multiple outgoing IP -addresses (one of which is a Keepalived VIP) and I want to force outgoing traffic to use a certain IP. This is what I thought would be the best solution:
    [Match]
    Name=eth0
    [Network]
    DNS=8.8.8.8
    DNS=2001:4860:4860::8888
    Address=a.b.c.d/24
    Address=x:y:z/64
    Gateway=x:y
    [Route]
    Destination=0.0.0.0/0
    Gateway=a.b.c.d
    Source=a.b.c.d/32
    However; it doesn't work. `ip route` still shows "default via a.b.c.d dev eth0" without a source IP. If I manually execute `ip route del default via a.b.c.d dev eth0  proto static` it works fine
    Last edited by Spider.007 (2015-01-19 13:27:29)

    A small update.
    The collisions happen everytime you try to do something (dhcp and ping). It doesn't collide with any of the other computers so the problem is 100% on the computer or between it and the router.
    Edit: only at the computer, router is working fine with the computer since it works when you try with the livecd.
    The computer can't seem to reconnect after the router been down too (the router recognises a network connection but it isn't in the list of attached devices).
    I should try with an older kernel later since it works on the livecd and has been working before.
    I'm not entirely sure the tlan module gives what it should, anyone one knows if this output seems ok?
    TLAN: eth0: Starting autonegotiation.
    TLAN: Giving autonegotiation more time.
    TLAN: Please check that your adapter has
    TLAN: been properly connected to a HUB or Switch.
    TLAN: Trying to establish link in background...
    TLAN: eth0: Autonegotiation complete.
    TLAN Starting internal PHY with HALF-DUPLEX
    TLAN: eth0: Link active
    The tlan module is pretty weird but what I remeber - the output looked like that when I had it working too.
    Last edited by Lonsas (2008-12-25 17:57:31)

  • Hey Guys. I have a 1st gen dual 2.3 powerPC G5. I just recently upgraded my OS to Leopard 10.5. I cannot for the life of me, get FlashPlayer to work. I Downloaded and installed the archived 10_1r102_64 version, but it still doesn't work. Help?

    Hey Guys. I have a 1st gen dual 2.3 powerPC G5. I just recently upgraded my OS to Leopard 10.5. I cannot for the life of me, get FlashPlayer to work. I Downloaded and installed the archived 10_1r102_64 version, but it still doesn't work.
    Everytime I click on a video it says I need to update to the newest version of flash, but my computer doesn't support the updated version. So I feel like I'm in a Catch-22. 
    Any suggestions?

    Jay, you may very well be up a creek without a paddle.
    See in each Browser which version of Flash it thinks it has...
    http://kb2.adobe.com/cps/155/tn_15507.html
    Then Test Adobe Shockwave & Flash Players...
    http://www.adobe.com/shockwave/welcome/
    If it in fact says you do have 10.1.102.64, & some sites say you need higher, it is a catch 22.

  • Adobe reader X (10.1.2) Zoom and Copy doesn't work

    Hi guys,
    I installed Reader X yesterday and now I'm stuck with these 2 problem
    I cannot zooming by using ctrl+mouse wheel (up or down), zooming with ctrl+(plus or minus) still work. This feature also work fine on FireFox, Chrome and other programs. In addition, I cannot left click to drag pages down with hand tool.
    Another problem is everytime I copy text from a pdf file, there is a message that "There were an error while copying to the Clipboard. An internal error occured".
    All above features works fine on Reader 9 and older versions. I'm using Windows 7 Home 64-bit.
    Please help

    v10.1.3 seems to solve this issue, but...
    For me Ctrl+minus doesn't work... it confuses it with Ctrl+6 
    Maybe because I'm on AZERTY keyboard and - and 6 are on same key

  • I have a problem with my iMac (intel). Youtube doesn't work for almost a year, and now even the flash games (like facebook's games) doesn't work (sorry for my english)

    Hi, i have my iMac from 2008 and it's always work but for almost the lasy year youtube doesn't work. That's wasn't a problem but. right by now, everytime i tried to watch a video the mac start to freeze and i must close all the application which are working and, sometimes, i need to shut down the entire sistem. I tried to reset safari, delete chache and cookies, whatever...but nothing.  What can i do?
    P.S. Even the flash games, like facebook's games doesn't work...they are slow and sometimes they freeze all. Sorry for my english

    Pick and download the latest Flash Player for your OS.

  • Flash Player Suck It Doesn't Work

    I'm SO Pissed off i cant watch any videos what so
    ever on My Computer everytime i try it says Javascript may be
    turned off or my Flash player need 2 be updated i tried 2 download
    this Flash Player @ least a Hundred times and it stil doesn't Work
    Personally I Think The Adobe Company need 2 Resolve this issue as
    soon as possible I need my PC To Play these Videos I Have Homework
    2 do I'm a College Student i tried everything and Nothing Work i
    think they need 2 fix this product cause many people are
    experiencing the same problem so obviously it's the player itself
    and not our computers so please have a t echnician fix the
    flashplayer immediately thanks sincerely Shane W!

    Hi, You didn't say what operating system or browser(s) you are using. If you are using IE, go to your manage add ons
    and look for Shockwave Flash Object..and see if Flash10e.ocx is listed with it and it is Enabled. If you use FF, find the plug-in SWF and it is 10.0.45.2 and enabled.
    You can also check your Flash files to see if all of the old FP was removed and the new was installed.
    Thanks,
    eidnolb

Maybe you are looking for

  • Missing Parts report for Purchase Orders

    Hey Gurus, We are running the availability check for Purchase orders and the user group is wondering if there is a standard Missing Parts report in SAP similiar to transaction CO24 for Purchase Orders so that they can view all of the Purchase orders

  • Message has error status on outbd. side (error in Moni)

    Hello All, Iam doing soap to idoc scenario, the scenario was working fine since long time....but yesterday we had an issue...we can see the message was sucessfully processed in XI monitor and RWB, but idoc not got created in sap ecc system. when i ch

  • WRT160Nv3 issue with Mac laptop

    Mu daughter came home from school and connected wirelessly. She said it was slow and after a day could not connect to the network at all. I am on a pc,connected to the cable modem and router, and there is a pc across the room connected wirelessly. Ca

  • Error writing to file during backup

    I have Photoshop Elements 12. I can backup a catalog to my Mac, but not to an external drive. I have tried two different externals. Both work with my PC, but not the Mac. I created a new 1 photo catalog as a test. It will back up to the Mac, but not

  • Problem using Dust and Scratches filter in Photoshop CS6

    Using the 64-bit extended CS6 version under Win 8/64.  Am I not using the filter correctly, or is this a limitation regarding its use? I duplicate a layer and apply the filter.  I then add a white mask and invert it to get black.  I change the layer