Flash - AS3: Invalid Bitmap - Error #2015: Invalid BitmapData
Sep 23, 2011I am trying to run the following function where car is a movieclip:
[Code]....
I am trying to run the following function where car is a movieclip:
[Code]....
I am trying to use the reflect class from "http://pixelfumes.blogspot.com/2007/03/reflection-class-v3-with-source .html" but I keep getting this error:
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData()
at Reflect()
at Site_fla::GalleryPage_29/loadThumbs()
at Site_fla::GalleryPage_29/sortXML()
[Code]...
btw, first I used assigned thumbContainer as the mc argument (outside the loadThumbs() function) and it worked but not exactly what I wanted... because I thought it is supposed to update when the movieclip is animated but it actually didn't... when I use a scroller, only the thumbs that are first loaded to the stage get the reflection..
I am having problems loading a bitmapData. I am getting the following error
Engine Init //trace
loadimage//trace
ArgumentError: Error #2015: Invalid BitmapData.
[code].....
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]....
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.
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]...
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]......
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].....
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...
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] .....
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()
in my class, if I create bitmapData like this
private var tImage:BitmapData;
public function object():void {
tImage = new BitmapData(30,30,false,0x000000);
}
I get the following error
ArgumentError: Error #2015: Invalid BitmapData.
But if I declare the varible inside the method
public function object():void {
var tImage:BitmapData;
tImage = new BitmapData(30,30,false,0x000000);
}
It works fine.
I started converting this flex application to run on android using the new flex hero sdk.i already replaced all mobile-incompatible components and got it running a few times succesfully.
When I use the same libraries running the original webapplication it works perfectly.The big problem however are these random Invalid BitMapdata errors while starting the mobile application. Here's the whole output.
[Code]...
Now it seems to me that, wile running the mobile application, it is unable to find the image, as when I run the webapplication, using the same library where the above line of code is, it is able to find the image.
This problem has been haunting me for days now and I'm really starting to think this is a bug, especially because it sometimes DOES run. Or is there something I'm missing here.
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 RepliesI 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]...
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] .....
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] .....
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].....
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 RepliesI 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 Repliesvar 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()
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...
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 RepliesI have this particular script that runs so that the flash elements don't show up on top of my slide out navigation. This redraws that flash element with wmode as opaque and so it shows up under the navigation. Works perfectly with Chrome and FireFox but not with IE. In IE I get an Invalid Argument in jquery.min.js code 0 Line 103 char 460. Can anyone help me as to why? If I comment out the second line of code inside the function then there is no error, but then doesn't work in FireFox.[code]
View 1 RepliesI am kind of frustrated, as I am trying to have a little flash downloader download a file. However, I keep getting:
Code:
Error: Error #2039: Invalid remote URL protocol. The remote URL protocol must be HTTP or HTTPS.
[code].....
I built a little game in the spare time.I've a DocumentClass and four other classes. Once I realized I could not restart the game when finished playing, I thought I should create a new instance of the main class (DocumentClass) to launch it again.The problem is that, by doing so, I get Error #2136,"The SWF file contains invalid data". What happens?
View 1 RepliesThis is my EnglishFonts.swf application that contains embedded fonts:
package
{
import flash.display.Sprite;[code]...........
Font.registerFont() throws this error:
ArgumentError: Error #1508: The value specified for argument font is invalid. at flash.text::Font$/registerFont()
I have a problem with creating instances from classes created from embedded data taken from an external .swf which has loaded into its library various images exported to ActionScript as BitmapData.What confounds me is that, of 22 images that I'm loading, 14 of them work fine and can be instantiated and displayed to the screen in a test program. The rest of them throw Error #2136, "The SWF file contains invalid data."I'm using Flash CS4 with Flex 3.4.
-----
Attached is a .zip of a few files:
library_tester.fla - contains the code for testing the library
Assets/GridGame/grid_Library.fla - contains the library
[code]....
Right now, the code in library_tester hits the error when it attempts to create Logo after creating two other variables set onto the stage.
This is my application that contains embedded fonts:
ActionScript Code:
package
{
import flash.display.Sprite;
public class EnglishFonts extends Sprite implements IFontApplication
[code]....
Edit:I only get this error when I debug my Flex project in Flash Builder and see the output in the stand-alone Flash Player. When I open my SWF in the browser, everything works fine.
So I have this preloader and some sounds I want loaded before the game starts. I have tried the standard 3 frame trick with the first frame containing the preloader graphics, the second frams containing an Asset holder movieclip (which contains all of the library symbols) and a 3rd frame that loads up after the preloader is done. All the library symbols except the preloader have "Export to first frame" unchecked.
Here's my problem. I have the sounds placed in the AssetHolder movieclip (on separate frames for accessibility). When the game loads and I click the keys that should trigger the sound, I get an error saying "Invalid sound". However when I check the "Export to first frame" box of the sound files, they work fine in game but load up before the preloader. Also, most of the graphic symbols are arranged manually on the stage in different frames. They aren't added to the stage via code. Would I even need an Assetholder type movie clip when they already exist in the timeline?