Using SharedObjects to load and save data

Hello, i am having troubles with using shared objects to save and load data for my highscore feature of my game i am developing in actionscript 3. This is my main code.
I am trying to update a dynamic text field that acts as an high score function
[as]
package
          // initialize;
          import flash.display.MovieClip;
          import flash.utils.Timer;
          import flash.events.TimerEvent;
          import flash.ui.Mouse;
          import flash.events.KeyboardEvent;
          import flash.ui.Keyboard;
          import flash.events.Event;
          import flash.media.SoundChannel;
          import flash.net.SharedObject;
          import flash.text.TextField;
          import flash.display.Stage;
          import flash.events.ProgressEvent;
          public class Game extends MovieClip
                    public static var _stage:Stage;
                    static var so:SharedObject;
                    static var ship:MovieClip;
                    static var healthMeter:HealthMeter;
                    static var score:Score;
                    static var highScore:HighScore;
                    static var enemyShipTimer:Timer;
                    static var gameOverMenu:GameOverMenu;
                    static var startMenu:StartMenu;
                    static var helpMenu:HelpMenu;
                    static var startButton:StartButton;
                    static var returnButton:ReturnButton;
                    static var helpButton:HelpButton;
                    static var pauseButton:PauseButton;
                    static var playButton:PlayButton;
                    static var mainMenuButton:MainMenuButton;
                    public var currentValue:Number;
                    public var loadingProgress:LoadingProgress;
                    public function Game()
                              loadingProgress = new LoadingProgress();
                              loadingProgress.x = 550;
                              loadingProgress.y = 500;
                              addChild( loadingProgress );
                              loaderInfo.addEventListener( Event.COMPLETE, onCompletelyDownloaded );
                              loaderInfo.addEventListener( ProgressEvent.PROGRESS, onProgressMade );
                    public function showMenuScreen():void
                              _stage = this.stage;
                              Key.initialize(stage);
                              ship = new Ship();
                              healthMeter = new HealthMeter();
                              var score:Score = new Score();
                              var highScore:HighScore = new HighScore();
                              so = SharedObject.getLocal("scores");
                              if (so.data.score)
                                        highScore.bestScore.text = so.data.score.toString();
                              else
                                        highScore.bestScore.text = "0";
                              addChild(score);
                              addChild(highScore);
                              gameScore.visible = false;
                              bestScore.visible = true;
                              healthMeter.x = 2.5;
                              healthMeter.y = 576;
                              gameOverMenu = new GameOverMenu();
                              gameOverMenu.x = 217;
                              gameOverMenu.y = 244;
                              addChild(gameOverMenu);
                              gameOverMenu.visible = false;
                              helpMenu = new HelpMenu();
                              helpMenu.x = 480;
                              helpMenu.y = 312;
                              addChild(helpMenu);
                              helpMenu.visible = false;
                              returnButton = new ReturnButton();
                              returnButton.x = 54;
                              returnButton.y = 52;
                              addChild(returnButton);
                              returnButton.visible = false;
                              gameOverMenu.playAgainButton.addEventListener("mouseDown", newGame);
                              startMenu = new StartMenu();
                              mainMenuButton = new MainMenuButton();
                              startButton = new StartButton();
                              helpButton = new HelpButton();
                              startMenu.x = 151;
                              startMenu.y = 111;
                              startButton.x = 93;
                              startButton.y = 426;
                              helpButton.x = 631;
                              helpButton.y = 386;
                              mainMenuButton.x = 656;
                              mainMenuButton.y = 483;
                              addChild(mainMenuButton);
                              mainMenuButton.visible = false;
                              stage.addChildAt(startMenu, 0);
                              addChild(startButton);
                              addChild(helpButton);
                              startMenu.visible = true;
                              startButton.visible = true;
                              helpButton.visible = true;
                              startMenu.visible = true;
                              startButton.addEventListener("mouseDown", newGame);
                              helpButton.addEventListener("mouseDown", helpGame);
                              mainMenuButton.addEventListener("mouseDown", mainMenu);
                              returnButton.addEventListener("mouseDown", mainMenu2);
                              pauseButton = new PauseButton();
                              pauseButton.x = 896;
                              pauseButton.y = 63;
                              pauseButton.addEventListener("mouseDown", PauseGame);
                              playButton = new PlayButton();
                              playButton.x = 896;
                              playButton.y = 63;
                              addChild(playButton);
                              playButton.visible = false;
                              playButton.addEventListener("mouseDown", PlayGame);
                    static function gameOver()
                              scoreF();
                              mainMenuButton.visible = true;
                              healthMeter.visible = false;
                              pauseButton.visible = false;
                              gameOverMenu.visible = true;
                              enemyShipTimer.stop();
                              for (var i in EnemyShip.list)
                                        EnemyShip.list[i].kill();
                              ship.takeDamage(-ship.maxHealth);
                    function newGame(e:Event)
                              addEventListener(Event.DEACTIVATE, PauseGame);
                              bestScore.visible = false;
                              gameScore.visible = true;
                              addChild(pauseButton);
                              addChild(healthMeter);
                              addChild(mainMenuButton);
                              enemyShipTimer = new Timer(750);
                              enemyShipTimer.addEventListener("timer", sendEnemy);
                              addChild(ship);
                              healthMeter.visible = true;
                              startMenu.visible = false;
                              mainMenuButton.visible = false;
                              startButton.visible = false;
                              healthMeter.visible = true;
                              pauseButton.visible = true;
                              playButton.visible = false;
                              gameOverMenu.visible = false;
                              helpButton.visible = false;
                              ship.visible = true;
                              ship.x = 367;
                              ship.y = 542;
                              enemyShipTimer.start();
                              currentValue = 0;
                              updateDisplay();
                    function mainMenu(e:Event)
                              removeEventListener(Event.DEACTIVATE, PauseGame);
                              bestScore.visible = true;
                              gameScore.visible = false;
                              removeChild(mainMenuButton);
                              removeChild(ship);
                              healthMeter.visible = false;
                              startMenu.visible = true;
                              mainMenuButton.visible = false;
                              startButton.visible = true;
                              healthMeter.visible = false;
                              pauseButton.visible = false;
                              playButton.visible = false;
                              ship.takeDamage(ship.maxHealth);
                              gameOverMenu.visible = false;
                              helpButton.visible = true;
                              returnButton.visible = false;
                    function mainMenu2(e:Event)
                              bestScore.visible = true;
                              gameScore.visible = false;
                              healthMeter.visible = false;
                              startMenu.visible = true;
                              mainMenuButton.visible = false;
                              startButton.visible = true;
                              healthMeter.visible = false;
                              pauseButton.visible = false;
                              playButton.visible = false;
                              gameOverMenu.visible = false;
                              helpButton.visible = true;
                              returnButton.visible = false;
                              helpMenu.visible = false;
                    function PauseGame(e:Event)
                              enemyShipTimer.removeEventListener("timer", sendEnemy);
                              stage.frameRate = 0;//
                              pauseButton.visible = false;
                              playButton.visible = true;
                    function PlayGame(e:Event)
                              enemyShipTimer.addEventListener("timer", sendEnemy);
                              stage.frameRate = 30;//
                              pauseButton.visible = true;
                              playButton.visible = false;
                    function helpGame(e:Event)
                              startMenu.visible = false;
                              startButton.visible = false;
                              helpButton.visible = false;
                              helpMenu.visible = true;
                              returnButton.visible = true;
                    function sendEnemy(e:Event)
                              var enemy = new EnemyShip();
                              stage.addChildAt(enemy, 0);
                              addToValue(1);
                    function addToValue( amountToAdd:Number ):void
                              currentValue = currentValue + amountToAdd;
                              updateDisplay();
                    static function scoreF():void
                              if (so.data.score)
                                        if (getFinalScore()>so.data.score)
                                                  so.data.score = getFinalScore();
                                                  so.flush();
                              else
                                        so.data.score = getFinalScore();
                                        so.flush();
                    function updateDisplay():void
                              if (currentValue>Number(highScore.bestScore.text))
                                        scoreF();
                                        highScore.bestScore.text = currentValue.toString();
                              TextField(gameScore.getChildByName("scoreDisplay")).text = currentValue.toString();
                              TextField(bestScore.getChildByName("bestScore")).text = highScore.bestScore.text;
                              loadingProgress.percentDisplay.text = currentValue.toString();
                    static function getFinalScore()
                              _stage;
                              return;
                              gameScore.currentValue;
                    public function onCompletelyDownloaded( event:Event ):void
                              gotoAndStop(3);
                              showMenuScreen();
                    public function onProgressMade( progressEvent:ProgressEvent ):void
                              setValue( Math.floor( 100 * loaderInfo.bytesLoaded / loaderInfo.bytesTotal ) );
                    public function setValue( amount:Number ):void
                              currentValue = amount;
                              updateDisplay();
[/as]
when i run this, it crashes with this error.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Game/updateDisplay()[C:\Users\Ben\Desktop\SFUR\Game.as:329]
          at Game/setValue()[C:\Users\Ben\Desktop\SFUR\Game.as:356]
          at Game/onProgressMade()[C:\Users\Ben\Desktop\SFUR\Game.as:351]
help would be greatly appreciated.
if you need any more details please ask.
Line 329:  if (currentValue>Number(highScore.bestScore.text))
Line 356:  updateDisplay();
Line 351:
setValue( Math.floor( 100 * loaderInfo.bytesLoaded / loaderInfo.bytesTotal ) );
-Ben

Ok, i have changed my classes a bit to try and fix the issue. I found a tutorial online called MJW avoider game or something and so i split some of my code in to seperate classes. But now the score doesnt update. I have fixed the loading issue (hopefully) i can access the main menu etc... but the highscore doesnt show at all after a game. Here are my classes.
Document class (Game.as)
package
          // initialize;
          import flash.display.MovieClip;
          import flash.utils.Timer;
          import flash.events.TimerEvent;
          import flash.ui.Mouse;
          import flash.events.KeyboardEvent;
          import flash.ui.Keyboard;
          import flash.events.Event;
          import flash.media.SoundChannel;
          import flash.net.SharedObject;
          import flash.text.TextField;
          import flash.display.Stage;
          import flash.events.ProgressEvent;
          public class Game extends MovieClip
                    public static var _stage:Stage;
                    static var so:SharedObject;
                    static var ship:MovieClip;
                    static var healthMeter:HealthMeter;
                    static var score:Score;
                    static var enemyShipTimer:Timer;
                    static var gameOverMenu:GameOverMenu;
                    static var startMenu:StartMenu;
                    static var helpMenu:HelpMenu;
                    static var startButton:StartButton;
                    static var returnButton:ReturnButton;
                    static var helpButton:HelpButton;
                    static var pauseButton:PauseButton;
                    static var playButton:PlayButton;
                    static var mainMenuButton:MainMenuButton;
                    public var currentValue:Number;
                    public var loadingProgress:LoadingProgress;
                    static var highScore:HighScore;
                    public function Game()
                              loadingProgress = new LoadingProgress();
                              loadingProgress.x = 550;
                              loadingProgress.y = 500;
                              addChild( loadingProgress );
                              loaderInfo.addEventListener( Event.COMPLETE, onCompletelyDownloaded );
                              loaderInfo.addEventListener( ProgressEvent.PROGRESS, onProgressMade );
                    public function showMenuScreen():void
                              removeChild( loadingProgress );
                              _stage = this.stage;
                              highScore = new HighScore();
                              ship = new Ship();
                              healthMeter = new HealthMeter();
                              var score:Score = new Score();
                              so = SharedObject.getLocal("scores");
                              if (so.data.score)
                                        highScore.bestScore.text = so.data.score.toString();
                              else
                                        highScore.bestScore.text = "0";
                              addChild(score);
                              addChild(highScore);
                              gameScore.visible = false;
                              bestScore.visible = true;
                              healthMeter.x = 2.5;
                              healthMeter.y = 576;
                              gameOverMenu = new GameOverMenu();
                              gameOverMenu.x = 217;
                              gameOverMenu.y = 244;
                              addChild(gameOverMenu);
                              gameOverMenu.visible = false;
                              helpMenu = new HelpMenu();
                              helpMenu.x = 480;
                              helpMenu.y = 312;
                              addChild(helpMenu);
                              helpMenu.visible = false;
                              returnButton = new ReturnButton();
                              returnButton.x = 54;
                              returnButton.y = 52;
                              addChild(returnButton);
                              returnButton.visible = false;
                              gameOverMenu.playAgainButton.addEventListener("mouseDo wn", newGame);
                              startMenu = new StartMenu();
                              mainMenuButton = new MainMenuButton();
                              startButton = new StartButton();
                              helpButton = new HelpButton();
                              startMenu.x = 151;
                              startMenu.y = 111;
                              startButton.x = 93;
                              startButton.y = 426;
                              helpButton.x = 631;
                              helpButton.y = 386;
                              mainMenuButton.x = 656;
                              mainMenuButton.y = 483;
                              addChild(mainMenuButton);
                              mainMenuButton.visible = false;
                              stage.addChildAt(startMenu, 0);
                              addChild(startButton);
                              addChild(helpButton);
                              startMenu.visible = true;
                              startButton.visible = true;
                              helpButton.visible = true;
                              startMenu.visible = true;
                              startButton.addEventListener("mouseDown", newGame);
                              helpButton.addEventListener("mouseDown", helpGame);
                              mainMenuButton.addEventListener("mouseDown", mainMenu);
                              returnButton.addEventListener("mouseDown", mainMenu2);
                              pauseButton = new PauseButton();
                              pauseButton.x = 896;
                              pauseButton.y = 63;
                              pauseButton.addEventListener("mouseDown", PauseGame);
                              playButton = new PlayButton();
                              playButton.x = 896;
                              playButton.y = 63;
                              addChild(playButton);
                              playButton.visible = false;
                              playButton.addEventListener("mouseDown", PlayGame);
                    static function gameOver()
                              scoreF();
                              mainMenuButton.visible = true;
                              healthMeter.visible = false;
                              pauseButton.visible = false;
                              gameOverMenu.visible = true;
                              enemyShipTimer.stop();
                              for (var i in EnemyShip.list)
                                        EnemyShip.list[i].kill();
                              ship.takeDamage(-ship.maxHealth);
                    function newGame(e:Event)
                              addEventListener(Event.DEACTIVATE, PauseGame);
                              bestScore.visible = false;
                              gameScore.visible = true;
                              addChild(pauseButton);
                              addChild(healthMeter);
                              addChild(mainMenuButton);
                              enemyShipTimer = new Timer(750);
                              enemyShipTimer.addEventListener("timer", sendEnemy);
                              addChild(ship);
                              healthMeter.visible = true;
                              startMenu.visible = false;
                              mainMenuButton.visible = false;
                              startButton.visible = false;
                              healthMeter.visible = true;
                              pauseButton.visible = true;
                              playButton.visible = false;
                              gameOverMenu.visible = false;
                              helpButton.visible = false;
                              ship.visible = true;
                              ship.x = 367;
                              ship.y = 542;
                              enemyShipTimer.start();
                              currentValue = 0;
                              updateDisplay();
                    function mainMenu(e:Event)
                              removeEventListener(Event.DEACTIVATE, PauseGame);
                              bestScore.visible = true;
                              gameScore.visible = false;
                              removeChild(mainMenuButton);
                              removeChild(ship);
                              healthMeter.visible = false;
                              startMenu.visible = true;
                              mainMenuButton.visible = false;
                              startButton.visible = true;
                              healthMeter.visible = false;
                              pauseButton.visible = false;
                              playButton.visible = false;
                              ship.takeDamage(ship.maxHealth);
                              gameOverMenu.visible = false;
                              helpButton.visible = true;
                              returnButton.visible = false;
                    function mainMenu2(e:Event)
                              bestScore.visible = true;
                              gameScore.visible = false;
                              healthMeter.visible = false;
                              startMenu.visible = true;
                              mainMenuButton.visible = false;
                              startButton.visible = true;
                              healthMeter.visible = false;
                              pauseButton.visible = false;
                              playButton.visible = false;
                              gameOverMenu.visible = false;
                              helpButton.visible = true;
                              returnButton.visible = false;
                              helpMenu.visible = false;
                    function PauseGame(e:Event)
                              enemyShipTimer.removeEventListener("timer", sendEnemy);
                              stage.frameRate = 0;//
                              pauseButton.visible = false;
                              playButton.visible = true;
                    function PlayGame(e:Event)
                              enemyShipTimer.addEventListener("timer", sendEnemy);
                              stage.frameRate = 30;//
                              pauseButton.visible = true;
                              playButton.visible = false;
                    function helpGame(e:Event)
                              startMenu.visible = false;
                              startButton.visible = false;
                              helpButton.visible = false;
                              helpMenu.visible = true;
                              returnButton.visible = true;
                    function sendEnemy(e:Event)
                              var enemy = new EnemyShip();
                              stage.addChildAt(enemy, 0);
                              addToValue(1);
                    static function scoreF():void
                              if (so.data.score)
                                        if (getFinalScore()>so.data.score)
                                                  so.data.score = getFinalScore();
                                                  so.flush();
                              else
                                        so.data.score = getFinalScore();
                                        so.flush();
                    function updateDisplay():void
                              if (currentValue>Number(highScore.bestScore.text))
                                        scoreF();
                                        Game.highScore.bestScore.text = currentValue.toString();
                              TextField(gameScore.getChildByName("scoreDisplay")).te xt = currentValue.toString();
                              loadingProgress.percentDisplay.text = currentValue.toString();
                    static function getFinalScore()
                              _stage;
                              return;
                              gameScore.currentValue;
                    public function addToValue( amountToAdd:Number ):void
                              currentValue = currentValue + amountToAdd;
                              updateDisplay();
                    public function onCompletelyDownloaded( event:Event ):void
                              gotoAndStop(3);
                              showMenuScreen();
                    public function onProgressMade( progressEvent:ProgressEvent ):void
                              loadingProgress.setValue( Math.floor( 100 * loaderInfo.bytesLoaded / loaderInfo.bytesTotal ) );
Counter Class (Counter.as)
package
          import flash.display.MovieClip;
          public class Counter extends MovieClip
                    public var currentValue:Number;
                    public function Counter()
                              reset();
                    public function addToValue( amountToAdd:Number ):void
                              currentValue = currentValue + amountToAdd;
                              updateDisplay();
                    public function setValue( amount:Number ):void
                              currentValue = amount;
                              updateDisplay();
                    public function reset():void
                              currentValue = 0;
                              updateDisplay();
                    public function updateDisplay():void
LoadingProgress class (LoadingProgress.as)
package
          import flash.text.TextField;
          public class LoadingProgress extends Counter
                    public function LoadingProgress()
                              super();
                    override public function updateDisplay():void
                              super.updateDisplay();
                              percentDisplay.text = currentValue.toString();
There not all my classes, but they are the classes where the errors are coming from.
Please remember i am an actionscript noob
Thanks again, Nacho

Similar Messages

  • How can I load and save text using FileReference class

    Let me start by saying I have no intention of using php and I can't wait until flash cs5 comes out with its new read/write capabilities
    I want to load and save XML files (stored on my local hard-drive) in AS3.
    I am using the FileReference class.
    Firstly I have noticed that when using FileReference.save if you replace an existing file instead of writing over the file data is appended to the end of the file. Can I make it so the file is overwritten (as it should be) or make it impossible for the user to save in such a situation.
    Secondly I want to load in text from an external file using FileReference.load I know that somehow you use FileReference.browse first to get it to work but I want to know exactly how to do it.
    I have looked for a tutorial about loading text in this manner and have not found one.
    Any help would be much appreciated especially if you could point me in the direction of a relevant tutorial
    Thanks

    the filereference class is for downloading and uploading files.
    if you want to load xml, use the xml class.
    and, if you want to write to an xml file and don't want to use server-side code, wait.

  • How to load and save custom workspaces in PE7

    I've written a little utility which allows PE7 users to load and save custom workspaces. It's attached to post #1 of this thread.
    System requirements
    The utility has been tested with Windows XP Pro SP3 only. It might or might not run under Vista. It will only work with PE7 installations where the executable files are in the default places.
    Installation
    When you have downloaded the utility (it's only 199KB) you can run it from any convenient place in your system - it doesn't need to be installed as such.
    Usage
    It's pretty self-explanatory in use but here's the manual!
    Run the downloaded utility "PE7WS.exe".
    A file selection dialog appears. Choose the workspace layout file you wish to use. "LastUsed.layout" is the last used workspace (that's all you will be offered the first time you run the program). If you press Cancel at this point, the program will exit and nothing will happen.
    Once you have selected the workspace, click "Open" and Premiere Elements 7 will run, using the workspace layout you chose.
    After you exit from Premiere Elements 7, a workspace layout file save dialog will appear. If you made changes to the workspace during your Premiere Elements 7 session, you can now give the revised workspace a name and save it.
    Do not save the workspace in a different directory from that which the dialog offers!
    If you have changed an existing custom workspace, and you want to update the version previously stored, just select the name and over-write the saved workspace layout with the new one.
    If you don't want to save the workspace at all, just click "Cancel" - next time you run Premiere Elements, you can choose the "LastUsed.layout" workspace to use that last used unsaved workspace in any event.
    If you use the PE7WS utility to run Premiere Elements 7, and then you use the menu option "Window > Restore Workspace", then exit, you can either cancel the workspace saving stage, (which will mean that "LastUsed.layout" will contain that default workspace), or you could give that default workspace a name like "PE7 Default" so you can start a future Premiere Elements 7 session with the default workspace, even though you last used a custom workspace.
    If you run Premiere Elements 7 in the usual way without using PE7WS.exe, the workspace that appears will be the last used one.
    The usual disclaimer...
    The utility should be entirely safe in use, but I can't accept responsibility for any loss or damage it might cause. However, the only file manipulation is does is to workspace files in the directory that Premiere Elements 7 uses purely for the purpose - the utility doesn't go anywhere near your precious project files.

    I'm finding it very handy on my particular twin 22" monitor setup to sometimes use a one-screen layout and sometimes a two screen layout. I 'discovered' that having the timeline on the second monitor enables me to tweak edits there while having the playback full size after pressing the "full screen" button on the first monitor. Where the timeline would normally be I have the history, mixer, and other windows always open. As the second monitor is also used by another PC (the one I have the net and email etc on) using "Maxivista" monitor sharing software, I revert to single screen layout when doing stuff like exporting to DVD so I can see what is going on with the render while typing stuff like this.
    Selectable workspaces are dead handy!

  • How can I do to acquire and save date in the same time and in the same file when I run continual my VI without interrupti​on.

    I've attached a VI that I am using to acquire amplitude from Spectrum analyzerse. I tried to connect amplitude ouput to the VI Write Characters To File.vi and Write to Spreadsheet File.vi. Unfortunately when I run continual this VI without interruption, labview ask me many time to enter a new file name to save a new value.
    So, How can I do to aquire and save date in the same time and in the same file when I run continual my VI for example during 10 min.
    Thank you in advance.
    Regards,
    Attachments:
    HP8563E_Query_Amplitude.vi ‏37 KB

    Hi,
    Your VI does work perfectly. Unfortunately this not what I want to do. I've made error in my last comment. I am so sorry for this.
    So I explain to you again what I want to do exactly. I want to acquire amplitude along road by my vehicle. I want to use wheel signal coming from vehicle to measure distance along road. Then I acquire 1 amplitude each 60 inches from spectrum analyzer.
    I acquire from PC parallel port a coded wheel signal coming from vehicle (each period of the signal corresponds to 12 Inches). Figure attached shows the numeric signal coming from vehicle, and the corresponding values “120” and “88” that I can read from In Port vi.
    So I want to acquire 1 time amplitude from spectrum analyser each 5
    period of the signal that I am acquiring from parallel port.
    So fist I have to find how can I count the number of period from reading the values “120” and “88” that I am acquiring from In Port (I don’t know the way to count a number of period from reading values “120” and “88”).
    Here is a new algorithm.
    1) i=0 (counter: number of period)
    2) I read value from In Port
    3) If I acquire a period
    i= i+1 (another period)
    4) If i is multiple of 5 (If I read 5 period)
    acquire 1 time amplitude and write to the same
    file this amplitude and the corresponding distance
    Distance = 12*i). Remember each period of signal
    Corresponds to 12 Inches).i has to take these
    values: 5,10,15,20,25,35,40,45,50,55,60............
    5) Back to 2 if not stop.
    Thank you very much for helping me.
    Regards,
    Attachments:
    Acquire_Amplitude_00.vi ‏59 KB
    Figure_Algorithm.doc ‏26 KB

  • Load and Save MySql Database

    In what way in java can I load and save a full database ,from MySql, in java , a dump operation .

    This is how I am parsing and requesting the information.. I know it's in there somewhere I just can't get the variables, do I need to add them ? It's not making much sense to me at the moment, I'm sorry !! I need to add the variables to the request somehow.. so I can receive the info, no ?
    var tab = "SQLtab";
    var filesend = "path to php file";
    var modesend = "post";
    function variableTransaction(fichier, modesend, tab, var1, var2) {
         var URLload = new URLLoader();
         var URLrequest = new URLRequest(fichier);
         var variables:URLVariables = new URLVariables();
         variables.tab = tab;
         variables.var1 = var1;
         variables.var2 = var2;
         if (modesend == "post") {
              URLrequest.method = URLRequestMethod.POST;
         } else if ( modesend == "get") {
              URLrequest.method = URLRequestMethod.GET;
         if (var1 == false && var2 == false) {
              URLload.dataFormat = URLLoaderDataFormat.VARIABLES;
              URLrequest.data = variables;
              URLload.load(URLrequest);
              URLload.addEventListener(Event.COMPLETE, loadComplete, false, 0, true);
         } else {
              URLrequest.data = variables;
              URLload.load(URLrequest);
              var receiveObject = variableTransaction(filesend, modesend, tab, false, false);

  • Hi,  I'm in Nova Scotia, Canada and when I try to use Siri it loads and loads and then says, "I'm really sorry about this, but I can't take any requests right now. Please try again in a little while."  I rebooted and it didn't fix the problem. I just got

    Hi,
    I'm in Nova Scotia, Canada and when I try to use Siri it loads and loads and then says, "I'm really sorry about this, but I can't take any requests right now. Please try again in a little while."
    I rebooted and it didn't fix the problem. I just got my iPhone 4s (unlocked right from Apple) several weeks ago.

    Siri has been a bit more erratic than usual in the last week or so. Apple has announced a major announcement for 9/12. Conclusions are left to the reader.
    Best of luck.
    (Occasionally from Lower Economy, Colchester County).

  • Hey guys i was wondering if i could downgrade my iphone 5 from ios 7.1.1 to 7.0.6 or .0.4 i have 7.0.6 and .0.4 shsh blobs but when i try to build a custom ipsw using ifaith it loads and never stop loading is there any way to downgrade to older ios 7 ?

    Hey guys i was wondering if i could downgrade my iphone 5 from ios 7.1.1 to 7.0.6 or .0.4 i have 7.0.6 and .0.4 shsh blobs but when i try to build a custom ipsw using ifaith it loads and never stop loading is there any way to downgrade to older ios 7 ?

    No, you cannot downgrade your iOS device. That's not supported by Apple.

  • My final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help

    my final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help me.  I have a 13 inch mac book pro 10.6.8 8gb 2.3 gfz intel core i5

    What did Apple tell you about what they did (or did not) find here?
    See if working on the main disk is any faster.
    USB2 is glacial, as I/O interconnects go.  And USB2 disks have been known to fail, or sometimes to drop back to USB1 speeds, too.  FireWire 800 is substantially faster than USB2, but still not as fast as the internal drive connections can provide.
    Put another way, start varying your configuration, and see which configuration changes (still) have the problem, and which don't.

  • Load and save difficulties.

    I am new to java and do not understand how the load and save functions work.
    I have the following code and would like the load function to open selected files into text area 1 and the save function to save the contents of text area 2.
    Can anyone help me with thuis please?
    //Adding text field one
              TextArea ta1 = new TextArea(15,20);
              textPanel = new JPanel();
              textPanel.setLayout(new GridLayout(1,1) );
              textPanel.setBorder(titled);
              textPanel.add(ta1);
              container.add(textPanel, BorderLayout.NORTH);
              //Adding text field two
              TextArea ta2 = new TextArea();
              textPanel = new JPanel();
              textPanel.setLayout (new GridLayout(1,1));
              textPanel.setBorder(titled2);
              textPanel.add(ta2);
              container.add(textPanel, BorderLayout.CENTER);
              //setting the window requirements 800, 600
              setSize(800, 600);
              setVisible(true);
              setResizable(false);
              Load.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        final JFileChooser fc = new JFileChooser();
                        int returnVal = fc.showOpenDialog(fc);
              Save.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        final JFileChooser fc = new JFileChooser();
                        int returnVal = fc.showSaveDialog(fc);
         });

    Example:
    // Your code
      Load.addActionListener( new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          File file = getFile('o');
    //      final JFileChooser fc = new JFileChooser();
    //      int returnVal = fc.showOpenDialog(fc);
    // end your code
      File getFile(char fcType) {
        int returnVal = 0;
        File file = null;
        JFileChooser fc = new JFileChooser();
        if ( fcType == 'o' )
          returnVal = fc.showOpenDialog(fc);
        else
          returnVal = fc.showSaveDialog(fc);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
          try {
            file=fc.getSelectedFile();
          } catch (IOException e) {
            // show exception or handle it
        return( file );
      }

  • Load and Save a game in director

    hi, i would like to have the option to load and save a game
    that i have created in Director MX 2004. But, I'm unsure what
    script to attach to my LOAD and SAVE buttons. Was wondering if sum1
    has an idea as to what the lingo script might be?
    thanks
    corry

    You can find my reply to this cross-post in the
    Director
    Online forum.

  • How do I load and save to my iMac a dvd purchased elsewhere?

    how do I load and save to my iMac a dvd purchased elsewhere?  Thank you.

    The mods here are adverse to mentioning software to duplicate commercial media, which is called "ripping." However, you can search outside of this forum for the software you need.

  • Illustrator "Not Responding" on load and save

    Good evening..
    We bought a new computer our graphic designer (HP Z400 quad-xeon 2.66GHz, 16GB ram, Quadro 4000 graphic card), installed with Windows 7 64-bit, set it up with the Adobe CS 5.5 Master Collection.
    The problem is with Illustrator, whereas it goes to "Not Responding" on load and save of files. The progress bar when saving stops at 5-10%, but it seems like it's still doing it's thing and it eventually goes through (15-45secs). However, I really hate getting this kind of message, moreso because his current desktop (HP XW4600, Win XP 32-bit, 3BG of RAM, Adobe CS5) is not doing this at all.
    I looked a lot of the forums, and tested what was offered and it still isn't better.
    - I removed an Add-On I had installed, no luck.
    - Removed all network drives, no luck.
    - Unchecked "Create PDF compatible file", no luck.
    Working locally is the same as on the network, which makes me believe the network is not a problem in my case. (Even switched from 100mb network connection to 1GB, which was the first thing I tried)
    Mind you, all these things I've tried were done in addition to the others, so even to total of all these wasn't helpful, and I'm still at square one.
    I'd like to add that all the other applications in the suite are behaving correctly, Photoshop, Premiere, InDesign... Everything else is working great and not freezing at all. Which is why I find this wierd that Illustrator would act like that while all the others are fine.
    Anything else I should be trying?
    Jonathan
    Edit: I checked again on his previous computer, and it seems the issue is there as well, unlike what I mentionned before, which might point to a problem with Illustrator itself, since between CS5 and CS5.5, Illustrator hasn't changed. Altough I'm not sure if it may be that the old computer is just *that* slow...

    Well, it has the Adobe PDF printer (from Adobe Acrobat) and MS XPS Document Writer (from Office), but since they weren't real printer I hadn't mentionned them. Is this what you consider Virtual printer?
    Either way, I've added a printer but it's still doing the same thing.

  • What is the best software programs that I can use to read, write and modify data / files on external HD (NTFS format i.e.  Windows) ?

    Hi guys,
    I’m new to Mac and have a MacBook Pro Lion OS (10.6.8 I think !!!) with Parallels 7 (Windows 7) installed. Can someone please tell me what is the best software program that I can use to read, write and modify data / files on external HD (NTFS format) from the Mac OS ? I heard of Paragon and Tuxera NTFS. Are they free ? Are they good ? Are there any other software programs out there ? I heard that some people have issues with Paragon.
    Thanks.

    Your best bet would be to take the drive to the oldest/compatible with that drive Windows PC and grab the files off, right click and format it exFAT (XP users can download exFAT from Microsoft) and then put the files back on.
    Mac's can read and write all Windows files formats except write to NTFS (and in some cases not read) so if you can change the format of the drive to exFAT (all data has to be remove first) then you will have a drive that doesn't require paid third party NTFS software (a license fee goes to Microsoft) for updates.
    Also it's one less hassle to deal with too.
    .Drives, partitions, formatting w/Mac's + PC's

  • Using OBIEE Scheduler to export and save data in excel/pdf

    Hi
    Is it possible to use obiee scheduler and run particular reports and export the data into excel/pdf and save this file at given location on server.
    env: obiee 11g/linux OS
    Thanks for any ideas.

    Hi,
    Yes it is possible.
    As per my knowledge we don't have such option but we can do one way.
    Using IBOTS you can store specific report and specific time in specific location.
    Note : Using JS script.
    Are you going to implement this way send me your mails id will send you js script for doing this.
    Re: Auto SAVE to excel -- Please refer this thread.
    Create js file using the below script and add this js scrif in your ibot advanced tab.
    var FSO = new ActiveXObject("Scripting.FileSystemObject");
    var foldername = 'D:\IBOT'
    if (FSO.FolderExists(foldername))
    var fileName = foldername + "\\" +Parameter(1);
    var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
    else
    FSO.CreateFolder(foldername);
    var fileName = foldername + "D:\IBOT" + Parameter(1);
    var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
    Thanks,
    Satya

  • Can I use wireless WIFI on a 9650 at home and save data usage

    Hi,
    I am ordering a 9650, and have a wireless network at home. I was going to go with the $15 data plan, because i use email mostly. Someone said I could use wifi on my wireless network at home for web pages to save data not going thru the verizon network? I am new to this, can you really do this?
    Thanks

    Gunit wrote:
    Hi,
    I am ordering a 9650, and have a wireless network at home. I was going to go with the $15 data plan, because i use email mostly. Someone said I could use wifi on my wireless network at home for web pages to save data not going thru the verizon network? I am new to this, can you really do this?
    Thanks
    Hi,
    I think you made a great choice ordering the 9650 Bold.  You can probably save a lot of money on the data plan by using the 15 dollar/month plan.  You can do a lot with your BB with just the WiFi.  I turned my WiFi on and turned off the mobile connection and was able to send/recieve emails, chat on Blackberry Messenger, and surf the internet.  For me, using my home WiFi is a lot faster that using the mobile network.  My only advice is to regularly check your My Verizon for your usage on data to make sure you are not going over the max usage for your plan.  Good luck.
    Doc

Maybe you are looking for

  • Kernel Panic, Mac Pro (model 1,1)

    Attempts to restart and shows the grayish, black screen with a command to manually turn off the computer. Does anyone know how to decipher this? Thank you in advance. panic(cpu 0 caller 0x2aaeab): Kernel trap with 64-bit state thread:0x7aa17a8, trapn

  • Updates won't download

    I have iTunes 8.1.1.10 installed, and when I try to update it, the download starts then stops after 12.1 of 14.7mb downloads. The first 12.1 goes in a minute or so, but it never finishes. I get the same behavior when trying to update Safari. I'm runn

  • Hadbm list hadbm:Error 22012

    Hi all, When i try to list using the hadbm the following error prompts: hadbm list hadbm:Error 22012: The management agent at host localhost is not ready to execute the operation, since it is about to do repository recovery. Please make sure that a m

  • Exporting from IPhoto to Bridge - How do I do it?

    Can I export the all the photos I have in IPhoto to Adobe Bridge and keep each photo in it's respective folder? If so how do I do that? Thanks in advance.

  • Transports not happening in PI system

    Hi Guru's , While trying to import transport , it's in running state from more than 1 hr ( tp_getprots_new ) . I have followed below steps :- 1. Deleted entry from trbat, trjob. 2. Killed all the tp process and tried to re-import in transport. No Luc