PHP :: ZendAMF Returning Invalid XML And Causing Bad Version Error
Sep 1, 2010
I am trying to use ZendAMF to do remote method calls to a MySQL database from Flash and I keep recieving the NetConnection.Call.BadVersion error.
My Server is working correctly. Apache 2.2.14
My PHP is working correctly. PHP 5.2.11
My Database is working. MySQL 5.0
My first problem was a security error in Flash. If you try to run a local SWF from the Flash IDE to a web service online, you'll get a security warning which will throw the BadVersion error. However, the security error won't show up if you 'TEST MOVIE' so it took me a while to realize that. I changed my testing process to remove this variable. I am now able to implement my php class code successfully using AMFPHP, which essentially rules out my class as the issue (I think). It seems to be a problem with the Zend implemntation of AMF.
I have followed a tutorial from Lee Brimlow here: [URL]. I was unable to get this to work locally, and I've moved my content onto a web server and can call the Class and Method from my SWF. I've used Charles to view the response. When I go to validate the response in Charles I get this:
Validator: Failed to Parse XML Document.
Reason: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
Line: 65 Column: 87
Can it be handled in PHP?
Here is my ZendAMF code:
<?php
error_reporting(E_ALL|E_STRICT);
ini_set("display_errors", "on");
ini_set("include_path", "./frameworks");
require_once 'Zend/Amf/Server.php';
require_once 'Animal.php';
[Code] .....
View 3 Replies
Similar Posts:
Sep 23, 2011
I am trying to run the following function where car is a movieclip:
[Code]....
View 1 Replies
Jul 7, 2010
i am currently trying to learn ZendAMF, but i have a hard time troubleshooting which makes learning it quite hard. Is there a way to make the PHP file throw an exception that gets traced as an error message in AS3 (not Flex), the only error i seem to be able to get is "Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.Failed", but it tells me jack ****.
i have gotten ZendAMF working, i just want to know how i can make error handling better, so that as an example can use PHP to tell flash that no results were found, or that the typed text was invalid. Is it better to use AS3 to check if the field was filled properly?
View 1 Replies
Jun 19, 2010
Working with a SWf where it's worked all along, loading data from url...But, now, if you switch from Flash Player 10 to Flash Player 10.1, I get the standard security sandbox violation:[code]The crossdomain.xml is still in place and if I downgrade to FP 10 (or earlier), it works as expected.
View 5 Replies
Oct 23, 2011
Code:
addEventListener(Event.ENTER_FRAME, Pixel_Perfect);
function Pixel_Perfect(e:Event):void
{[code]....
Enemy1 is a class is that makes a difference
I didn't write this code as i am not this advanced yet but really needed this script, this script normally works but now i am recieving errors
Error: ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData/ctor()
at flash.display::BitmapData()
at IceMountain_fla::MainTimeline/Pixel_Perfect()
View 23 Replies
Jul 14, 2009
I identify my current installed debug version? Basically, I am using Flex 3, for past 2-3 days whenever I launch any Project or debug it, I get the message box saying "Flex Builder requires a more recent version of Flash Player." It says my curent FP as 9.0.115.0 and debug version as 9.0.45.0. However, my actual FP version if FP 10.0.22.87. I don't understand why this confussion! I don't know how can I know my actual version of Debug player.
View 2 Replies
May 4, 2010
I'm getting an Invalid BitmapData Error #2015 at flash.display::BitmapData$iinit() that points to the line of code below where a BitmapData object is created. I am using this function to create only a few hundred Item objects, each of which is only 166 px by 96 px in size so I don't believe that the problem has to do with running out of memory. I also used system.totalMemory to trace memory consumption but it showed that only a few tens of megabytes were used when the error occurred. I have tried setting the BitmapData and Bitmap objects to null because that was a solution I found on another site. That didn't work. I tried dispose(). The error occurs intermittently, sometimes after running my app a few times and sometimes when I first load it. I am not refreshing my browser over and over in order to run the app. I cannot figure out the exact sequence of events that leads to this error. In earlier versions of my app, I was able to successfully use the exact same function (minus the lines where the BitmapData and Bitmap objects are set to null).
public function cloneItem(item:Item):Item {
var itemClone:Item = new Item(item.ID, item.name, item.bpCost, item.bcCost, item.quantity);
var tempBitmap:Bitmap;
[code]....
View 1 Replies
May 12, 2010
I am writing a slideshow that takes a random image from a media RSS feed and creates a bitmap and adds it to the stage in a random position on the stage so that each new image lays on top of the last. The actionscipt works fine, but after a time, the computer runs out of memory and I get a ArgumentError: Error #2015: Invalid BitmapData. error.
My thought was, instead of adding child on top of child, I would just add the new image to the original bitmap or perhaps a copy of the bitmap and swap from old to new with each newly added image. Is this a possible solution and can anyone help with some code ideas? All the examples of BitmapData.draw() show only addig one object at a time per bitmap. I don't know if it is possible to add/merge/combine bitmaps.
View 2 Replies
Dec 31, 2009
private static var tileDir:String;
[Code]...
tileImage is valid, I've used the variable in the code below and it works. But above doesnt. Don't know why.
[Code]...
View 1 Replies
Apr 3, 2011
I have the following code which loads a sound, 'test.mp3', and then lowers its pitch, also slowing it down. The sound plays correctly at the lower pitch but at the end of the sample, I get this error: 'RangeError: Error #2004: One of the parameters is invalid.'. What am I doing wrong and how can I fix this problem?
[Code]...
View 2 Replies
Jan 24, 2011
I'm getting the Error #2015: Invalid BitmapData. in this function. It works until I add too many images around 40 then I get the error:
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData/clone()
at PictureViewer_fla::MainTimeline/setupThumbs()
[code]......
View 9 Replies
May 2, 2010
I'm getting an Invalid BitmapData Error #2015 at flash.display::BitmapData$iinit() that points to the line of code below where a BitmapData object is created. I am using this function to create only a few hundred Item objects, each of which is only 166 px by 96 px in size so I don't believe that the problem has to do with running out of memory. I also used system.totalMemory to trace memory consumption but it showed that only a few tens of megabytes were used when the error occurred. I have tried setting the BitmapData and Bitmap objects to null because that was a solution I found on another site. That didn't work. I tried dispose(). The error occurs intermittently, sometimes after running my app a few times and sometimes when I first load it. I am not refreshing my browser over and over in order to run the app. I cannot figure out the exact sequence of events that leads to this error. In earlier versions of my app, I was able to successfully use the exact same function (minus the lines where the BitmapData and Bitmap objects are set to null).
public function cloneItem(item:Item):Item {
var itemClone:Item = new Item(item.ID, item.name, item.bpCost, item.bcCost, item.quantity);
var tempBitmap:Bitmap;
[Code].....
View 4 Replies
Jan 9, 2010
I am having problems loading a bitmapData. I am getting the following error
Engine Init //trace
loadimage//trace
ArgumentError: Error #2015: Invalid BitmapData.
[code].....
View 5 Replies
Jul 15, 2009
I am stuck in custom video player for a long time. The original example of the thumbnail buttons are jpg image. They work. However, instead of stable place of the thumbs, I changed the thumbs to swf file with motion.
I got the error.
Select allVideoError: 1004: Invalid source
at fl.video::NCManager/connectToURL()
at fl.video::VideoPlayer/[URL]::_load()
at fl.video::VideoPlayer/play()
at fl.video::FLVPlayback/doContentPathConnect()
at fl.video::FLVPlayback/set source()
at MyVideoPlayer_fla::MainTimeline/playVideo()
Here is my AS3 code
Code: Select allimport fl.video.*;
var thumb_width:Number;
var thumb_height:Number;
var thumbs_x:Number;
var thumbs_y:Number;
var video_x:Number;
var video_y:Number;
[Code] .....
View 2 Replies
Nov 13, 2009
i have an air app that i put some updater code into and i keep getting 1 of 2 errors.When i test the app in Flash i get Error ID: 404. Invalid HTTP status code: 404.when i install the application and run it i get Error ID: 2032. Error #2032. the error windows are the windows that are written into the code to come up so i know that part of the code is working. Any ideas or similar experiences?
var appUpdater:ApplicationUpdater = new ApplicationUpdater();
var window:NativeWindow;
var windowContent:myWindow = new myWindow();[code].....
View 5 Replies
Dec 16, 2009
I am getting runtime error #2136 'The SWF file at %1 contains invalid data' (I know, %1 is a reference to the file producing the error) All I did was change some button graphics to movie clip types and have solved all the type mismatch and other syntax errors. This is a file I have been working on and posting about. This is getting annoying. What would be causing this type of error??
View 8 Replies
Jan 19, 2010
I have an air application that loads an external swf when prompted by the user. In the external swf, I have a class that loads all the necessary fonts for that particular swf. When my air application attempts to load the swf I get ArgumentError: Error #1508: The value specified for argument font is invalid.
View 1 Replies
Aug 6, 2007
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.applicationDomain = ApplicationDomain.currentDomain;
var loader:Loader = new Loader();
[code]....
in the server all is working good.compile from local Main.as heres my error
ArgumentError: Error #1508: The value specified for argument font is invalid.
at flash.text::Font$/registerFont()
at Fonts$iinit()
View 4 Replies
Aug 7, 2009
I am trying to rebuild "Pixelator" class writen by Eric Hallander, becouse I need it for my personal site, and orginal class doesn't give me all that I need. I thought I have everythig right scripted but after compilate debuger gives me an error:
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData$iinit()
at tmk::Pixelate/::pixelateOut()
This is code of my MainClass - calling a Pixelation effect:
Code:
package src {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.display.Bitmap;
import flash.display.BitmapData;
import tmk.Pixelate;
[Code] .....
View 5 Replies
Feb 6, 2010
I am trying to make a game like the escape game you might have seen on the internet. I have got all the movement pretty much sorted its just I cannot get the game to restart. I am relatively new the AS3 so bear with me on this. I have a Main class, an enemy class, a player class and a button class. The button class creates the restart button and from the main class, when certain conditions are met, an event listener is added to this button instance to say "on click... do this...". I do not no what to put to make it reset the game however. I have tried to clear all the objects when the game is over but I cannot get the game to restart on click. I figured if I can just add a new Main class instance then the game would be reset but I cannot seem to do it...
Main.as
package Game{
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.*;
import flash.utils.Timer;
import flash.text.TextField;
[Code] .....
This is where I figured I needed to create a new instance of the main class but it just won't work. It comes up with an invalid data error in the output panel. By this point in the program, practically every object has been removed from the stage and display list and the game is over and is ready to be reset...
View 8 Replies
Apr 26, 2010
I have two classes. One is my Document Class, and another extends my Document Class. It doesn't work, and gives me this error "Error #2136: The SWF file MyGame.swf contains invalid data."
View 4 Replies
Feb 3, 2012
I have this code:
<script>
function cargar(url){
var iframe = $('<iframe>');[code]....
That generates an iframe (containing a panorama viewer with JavaScript and Flash) and inserts it in a div.The thing is that this code, in local, Firebug jumps:
Elemento referenciado por ID/NAME en el ámbito global. Use el estándar del W3C document.getElementById() en su lugar.Element referenced by ID / NAME in global scope. Use the W3C standard document.getElementById () instead.And online it doesn't jump any error or warning but the script doesn't fully work: http:[url]... (the controls are missing and the autoplay is not ON)
View 1 Replies
Aug 26, 2009
I got a problem with adobe flash cs4 : I can't launch it normaly and its says that a fatal error has occured.. I really don't know what I must do.. Please, help me.... I've just lost like 3 or 4 files of adobe by trying to reinstall it.
View 3 Replies
Jan 18, 2010
I've been working on a simple mosaic generator for a project and have been crashing Flash consistently by trying to add too many bitmaps to a Sprite. I can crash Flash every time with the following:
for(var i:int = 0; i < 10000; i++){
var d:BitmapData = new BitmapData(20,20);
addChild(new Bitmap(d));
}
I get a 2015 error - invalid BitmapData.9000 works without issue... 10000 crashes. Problem is I need 10000.Is this a known limitation? I could try using multiple sprites and adding say 5000 to each, but that wouldn't be easy with this project. But if I have to I have to...
View 6 Replies
Apr 24, 2009
Environment: I am using Flash CS3 and targettting my application for Flash Player 9, I have installed Flash Player 10 on my machine. I am getting a flash player 10b.ocx error, which causes into crash of the browser. I am loading a bunch of images in this application. (20-30 at a time). using Loader class.
I have three questions: Is it the flash player error causing the browser to crash or something in my code is wrong?what possibly can go wrong in AS3 code to cause this error if it is not a flash player error?What could be the possible resolution for the same?
View 11 Replies
Aug 25, 2005
i managed to get my photogallery up and on my site but i'm having a problem. It loads a few of the pictures but then it quits working. After it quits working and i close the browser it gives me this error:
iexplore.exe - Application Error
The instruction at "0x10005f6c" referenced memory at "0x10005f6c". The memory could not be "read".
Click on OK to terminate the program You can go to [URL].. and try for yourself. Under the Pictures of Iraq page it should only load up till the 3rd picture. Anything after that and it quits working. Somebody please help me fix this.
View 11 Replies
Oct 29, 2009
I have tried to work my way through it.I can't understand why my button actions are causing an output error,the first two on this keyframe work just fine, but when I add the third it causes this error...
TypeError: Error #1009: Cannot access a property or method of a null object reference.at clear_fla::MainTimeline/frame86()
Here is the script
stop ();
function clickFunction(evt:MouseEvent):void {
gotoAndPlay(87, "Scene 1" );[code]........
Like I said, sg_btn and ak_btn work, but az causes the error...They are all on the same keyframe, dont know if that matters
View 3 Replies
Jun 7, 2010
I am a flash amateur. I have a movie clip in frame 1. The movie clip is a series of images that is similar to Apple's wait mouse cursor. I have written the following script hoping it will act as a preloader.
Code:
var total:Number = stage.loaderInfo.bytesTotal;
do {
var loaded:Number = stage.loaderInfo.bytesLoaded;
} while (loaded<total);
gotoAndPlay(3);
But, I get this error in the output window. Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds. All I can see is the preloader, but frame 3 is never loaded.
View 3 Replies
Jan 24, 2009
I have a movie that loads swfs into a loader within and MC on the main file/stage. The code within the movie clip housing the loader is (NOTE: I worked up an simplified fruits/veggies example to work out issues, I am not a fruit/veggie expert or anything):
[Code]....
That repeats every time either button is clicked after that. NOTE: I tested this after removing the preloader code(and moving the frames around to remove the blank first frame) in the external swfs and it worked fine jumping back and forth between them. I have already plugged away at this solving a series of issues to get to this point and I have the feeling this is a pretty simple fix, but I am not sure whether I should be looking in the external swf file itself or in the loader code in the main file to solve it.
View 2 Replies
Mar 20, 2012
I have just added a menu screen to my game and I get the following error:
ActionScript Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MyGame()
[code].....
View 4 Replies