my problem relies in here, even though i never specified a fillcolor it's filling my bitmap with white, and i don't know how to undo it, the only way is if i remove every parameters such as width and height, but i need to resize it so, you know.
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..
This is somewhat of an unusual topic, but hopefully you guys will have a reply that will allow me to go on. I am working on a 2D game following an unusual workflow that is very much 3D based. The workflow is 3D based but the game is flat! This is very important: Graphics are flat images.
Here's the general question. I need a Flash library that loads and is able to deal with 3D models, orient them and convert them in various ways to 2D BitmapDatas. Do you know anything that can do this? To elaborate, I was thinking of the best possible workflows for myself and artists' needs and there is one that I would really enjoy but need serious help to break through. Here it is: Import a textured 3D model from 3DS Max or other similar tools, into Flash At runtime, orient the model the way I want and draw it to BitmapData as a flat 2D colored image. This image is what is supposed to be displayed ultimately. Ideally there shouldn't be a need to display the model at all; just like you can draw MovieClips into BitmapDatas without adding them to the display list. The 3D model is non existent to the user, it's only a workflow convenience for developers, it's a data holder as well as a means to reduce file size.
- Still at runtime, I have to be able to generate a height map: Basically a BitmapData entirely black with, instead of the real texture, a gradient along the 3D Y axis that would have the same 2D shape as the model under its current orientation (i.e. it overlaps perfectly with the flat 2D colored image we made earlier; let's call colored images diffuse maps.) Remember it's along the 3D model's Y axis: If it's a character and its orientation makes the model's shoulder have the lowest Y 3D coordinate while his hips are the highest, the gradient will start from the shoulder. (i.e. it's not always "feet to head", depends on the model's orientation.)
If anyone has a framebuffer implementation, could you please share some performance benchmarks? Or at least tell me how much difference are there in your point of view. I need to make a flash game which has almost 1K 50x50 bitmaps moving on screen(more than 10K display object in display list), and want to know if flash can support it well on a normal PC with at least 30FPS.
I am trying to capture video from my webcam to a video display. I created a button on my main application and it gets my webcam just fine. When I try to use the same code inside a class I created it does not work. Does anyone know what could be the problem? Here is my code to capture the webcam.
I have been trying to convert [URL] into as3. I am am very unfamiliar with flex. I have set the buttons for transform and loading the image but its just not working at all.
Here is the image distortion class Code: package { import flash.display.Shape; import flash.display.MovieClip; import flash.display.Sprite; import flash.display.Bitmap; [Code] .....
I`m using flash cs3 for my works , but i have one problem!when i use File=> Import=> Import to Library... or Import to Stage...the flash environment becomes terminated.I changed my flash version to CS4 and I have this problem again.
How much of an impact does import flash.display.* over individual loading make? I'm using FlashDevlop so its auto created but the list is getting huge. Is there a significant savings by not adding all of them. Or better question if its imported but not used will it be added at compile time?
I am having an issue with compiling a .swf. I get the following error on what seems to be related to the images. There is about 40 that are all very similar the the error code listed below:
5000: The class 'com.decalmywall.Emb_EMB_BORDER' must subclass 'flash.display.BitmapData' since it is linked to a library symbol of that type.
When I publish the file, I'm getting the following error message in the Output panel:
**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 7: The class or interface 'BitmapData.loadBitmap' could not be loaded. var plaid:BitmapData.loadBitmap("plaid");
I've been using BitmapData.copyPixels() to draw graphics onto a canvas (Bitmap).I need to rotate the resulting graphics without the use of draw() because it's vastly slower.How can I rotate the target graphic? I'm assuming that there might be a formula or library that I can use which will first reorganize the pixels that make up a graphic based on an origin (point) and radians.I'm pretty certain that I'm not capable of creating such logic, so if there are any known libraries that do this, that would be awesome.I'd like to achieve something similar to XNA's SpriteBatch.Draw() method, which accepts rotation as its 5th argument.
how to use the bitmapData collision method. Now I'm trying to figure out if there is a way to see at what angle or coordinate of the bitmapData the collision happens? I need it in order to figure the accurate bounce angle after the collision occurs.
I'm currently working on a flash game and I need to know how to addChild a BitmapData or draw a BitmapData to screen. If I can't than how can I give a DisplayObject my BitmapData?
I've made a mobile version of my software, with low-res images and such, and I can now fully buffer all my content (including a 360 frame animation which is buffered to memory). Problem is, that everytime I update the view, more memory is used.When I write image = new BitmapData();, does it store the previously created BitmapData's in memory? Do I have to flush the memory somehow before I draw my second picture in BitmapData?Example:
ActionScript Code: // In this example I draw using the same bitmapData several times, also //overwriting the first image. Do I have to somehow delete the data first, to
Hi guys I get this coercion error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Shape@41754601 to flash.display.
When I create an instance of a MovieClip from my library:
var childmc:ChipEasy = new ChipEasy(); Canvas.Map.Tiles.addChild(childmc);
When I try to access all the children like: for (var i:int=0; i<Canvas.Map.Tiles.numChildren-1; i++){ var mc:MovieClip = Canvas.Map.Tiles.getChildAt(i); }
I am having an issue with using BitmapData.draw(stage). I am getting the following error:
SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: file:///C|/Documents%20and%20Settings/bla...bla...bla.swf cannot access null. No policy files granted access. Here is a portion of my code:
var bd:BitmapData = new BitmapData(2800, 2100); bd.draw(stage);//this is where the error happens All of the files referenced (.xml/.jpg/.swf) are located in the same local folder as the main .swf. How do I get around this error? The main objective is to print the stage using PrintJob(). I am using Flash Professional CS5.5 and publishing to Flash 10.0/10.1. Let me know if I need to supply any more info.
I'm currently working on editing the pages on my website but for some reason these errors are apearing. Also some of the text that should be on the .swf disapears. Any help will be apreciated
This is error I am getting:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::SimpleButton@40692fa1 to flash.display.MovieClip. at flash.display::Sprite/constructChildren() at flash.display::Sprite() at flash.display::MovieClip()
i have a Tweener question....here is the lib..so here is the error i get?
## [Tweener] Error: [object Loader] raised an error while executing the 'onComplete'handler. TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Loader@2035d1c1 to flash.display.MovieClip.[code].....
and here is why:
Code:
import caurina.transitions.*;[code]....
i tryed to use just the loaders...not working..its just for mcs i think...
When using Loader class to load display objects (bitmaps, SWFs...) from remote URLs, is there any way for them to be instantiated (referenced as we know, by Loader::content property) as some user specified valid subclass? For example if I had a class that extended a Bitmap, is there any way for the loaded object to be of this class?
Is there any way to display flash objects which are outside the display area when flash is embeded in HTML The reason i ask is my current project has a rotating + enlarging effect which is largely dynamic so sometimes an object may clip the edge of the stage areathis looks messy but i dont want to increase the stage area to cover the largest possible area any object could enter because most of the time the objects are at the center and small so i would end up with a lot of white space
I have a list containing display objects from throughout the application (insertion order). I want to process the list either top-down (parent, child) or bottom up (child, parent). The only requirement is that either a parent is processed before any child or vice versa a child before its parent. What is a good approach? This question is not about sorting a list. It's about retrieving the depth of a particular display object.
Example Display list: A (root) B1 C1 C2 D1 B2 ......
My list: list = [E1, F4, A, B2, B1, C3, ..., N9, N8]
Bottom-up: N9, N8, F4, E1, C3, B2, B1, A
Top-down: A, B2, B1, C3, E1, F4, N9, N8 Does not matter if N9 before N8 or N8 before N9. Important is that any N is before M (first run) or any M before its children N* (second run).
The title might be a little misleading. Look at my code and I will explain
public static function loadTile(tileDir:String = "empty"):void { if(tileDir != "empty") { tPoint = new Point(0,0); tRect = new Rectangle(0,0,30,30);
[Code]...
I am trying to do tiling with sprites. I want my tiles to be interactive, so that is why I am using the sprite object instead of using regular bitMaps to represent my tiles. You might be wondering why I wouldnt just use graphics.beginBitmapFill(tImage); and graphics.drawRect(0, 0,tWidth ,tHeight ); to pick out the tiles I want to use. Well reason being is because it turns out that drawRect() first and second parameters actually alter the location of where the actual sprite sits at.
So if I set the x and y properties of the sprite to x = 20, and y = 20. then I set my drawRect(20,20). it actually adds an extra 20 pixels to my x and y coords of my sprite. And I know the reason why, I just need to know a better way.
package { public class priyan { public var a:String = "priyan"; public var b:String = "bhagavath"; public function method():void { trace(a); trace(b);
The above script, i got it from one of the ActionScript 3.0 book. i just work it out in flash. But it shown error 5000: The class 'priyan' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
I'm trying to load several jpeg images dynamically XML into bitmapdata object in fla. I can see them on the stage of this .swf file.However, I load it into another .swf which is my main to call while clicking on one of menu option.I got this error:Error #1034: Type Coercion failed: cannot convert com::Fashion@1daf4ca1 to flash.display.MovieClip.Does anyone know how to convert that??
private function initBitmapFile(file:String):void { loadBMP = new Loader();