If I have a sprite, with which I have drawn some stuff, how do I erase part of what I have drawn? Preferably I could use drawRect with some "alpha=0" paint. However, I don't believe beginFill lets you set an rgba color (like you can in bitmapdata). Setting alpha = 0 in beginFill doesn't really do anything -- it just draws nothing. In my particular use case, masking isn't an option. Also, calling clear() isn't a good solution since it clears away everything.
I am making a flex whiteboard application where lines are drawn over an image here is the scenario:
1: main canvas holding the background image and drawing canvas 2: user can move image by dragging image 3: user can draw over image, which is actually drawing on canvas over image.
I'm having problem on erasing lines like it eraser in paint. Searched evry where but didnot find a way to erase drawn lines
I have one simple app, loads an image and then via class that extends shape the user is able to draw. Now I want to create an eraser tool so the user could erase something that he dislikes. As far as I know the easiest way is to make:
I want to create worm game with actionscript. First of all, i will create the ground with vector draw. By using actionscript, is there a way to edit or delete part of the vector draw(ground) when the target(shooting) hit the ground?
I want to create worm game with actionscript. First of all, i will create the ground with vector draw. By using actionscript, is there a way to edit or delete part of the vector draw(ground) when the target(shooting) hit the ground?
Im building a pretty simple drawing board in flash, i got this code from this forum and it works fine (there is more to it but this is the drawing part)[code]This works fine. But i want to be able to erase the drawings, step by step this is ths tricky part, ive looked everywhere(ok not everywhere) but in a whole lot of places but the only thing i found is how i could delete everything with removeChild and that in not what i want. Maybe i need to change the function abowe? Please help me to get in the right direction. What should i read about /look at?
I'm trying to draw a shape but am having a weird issue. I'm not getting any errors, but no shape will show up. I get a blank white canvas when I run the .swf with the following class:
I need to underline particular character of the tab header(like Account) A has to be underlined. We are using tab navigator and canvas container controls to create the tabs in our screen( Canvas label has to be underlined).
I've been trying to implement and make classes out of some code that was written in the timeline by someone else; some problems have inevitably arisen. One of these problems is that I can't seem to compile a specific part of it concerning vectors, given that it tells me that there were no property definitions for the variables and that upon importing, these definitions could not be found:
[Code]....
It also tells me that Vector is not a compile-time constant, and its methods or properties could not be found. Besides this, I can't seem to find the definition for BlendMode for applying a filter with the BitmapData draw() method. Below I list the pertinent piece of code for you to be able to help me in case there's something wrong in my writing. Oh and BWT, what does this declaration mean? var i:Vector.<int>=new Vector.<int>([1,2]); I don't understand why the array brackets inside an int Vector.
I have the code to copy parts of a huge loaded BitmapData to a target BitmapData that is just the size that I can display. I think I have set the scroll bars of an enclosing Canvas to show the size of the larger image and allow the user to scroll. Now I need to put the selected pixels on the screen. When I try to add a Bitmap component as a child of the Canvas, it get an error because Bitmap is not a UIComponent. What's the best way to put the target BitmapData into an Image component?
It's probably a no brainer, but I've spent the last 40 minutes or so looking for it to no avial.
I have a Canvas control with a fixed width and a horizontal scrollbar.I'm trying to find the actual width of the control.The .width (fixed width) + the part being revealed by the scrollbar.I tried explicitWidth, width + maxHorizontalScrollPosition, and some other combos but non of them hit the spot.
I have this file http:[url].... Basically lines gets drawn where ever I tween the animation.arrow MovieClip. What I'm wanting to do is be able to rewind the MovieClip and have the line erase its self step by step.
Is there any algorithm to perform erase operation in a bitmap? I would like to create functionality similar to how photoshop or other graphic application performs erase. Is erase operation so difficult that there isn't much help (for bitmaps) available? I am OK even with name of an algorithm, I can proceed from there.
I have two layers in Photoshop: 1 -- a texture, 2 -- a semi-transparent image that overlaps texture. The combination of the two looks nice in Photoshop. I export them separately from Photoshop saving them as 24 bit PNG with transparency and colors converted to sRGB. (Working color space of PS is sRGB.) The result of importing them into flash makes me cry (see images below, note what areas around crosses look like).
I tried both loading PNGs dynamically and directly importing them into fla (compression type: lossles, allow smoothing: false). Looks like semi-transparent areas are saved inaccurately on export. What's more puzzling to me is why the results differ between dynamic loading and direct importing. Here is that psd I'm stuck upon. Inside the zip you'll find transparency.psd, which has only two layers. I still have no luck in placing them into fla: transparent areas get dirty. [URL]
The documentation for the List component at[URL].. states "A list can also display graphics, including other components," but nowhere can I find an example of HOW to make this happen. Can anyone please point me to a working example, I really need to be able to leverage this functionality, but I cannot for the life of me find anywhere it's being done.
Regarding the code below, when Document class is "Main" [the intended default condition] I do not get the graphics declared in class Thing (ie., in object myThing:Thing) put on stage. Why??? Whereas when I define Document class as Thing, then yes theses graphics do appear on stage. So the syntax itself is OK
How to display a section of a sentence? (the final 3)E.g.THE MOUSE CAUGHT THE RAT AT POST 324S58. - I want to display "S58" in a text box.THE MOUSE CAUGHT THE RAT AT POST 345P87. - I want to display "P87" in a text box.THE MOUSE CAUGHT THE RAT AT POST 311V02. - I want to display "V02" in a text box.
I am using a third party flash as3 code to load graphics using sprite. There is a class (load) that takes care of the loading of the graphics.In a new class(getname), I want to be able to1. Load the graphics (done)2. On mouseover change the color of graphics(done)3. Display name of rolled over graphic (not working). I have tried the following in getname:var feature : load;feature.name; I get a null object error. Now I have used the mousevent routine(e.target.name) and can display the instance #(instance149). But what I really want is the name of the graphics that the load function loads (graphics and the dbf with all the attributes including the name).
Once I met a task to put filter (blur for instance) onto only a part of a display object.As for bitmaps I just made two of them: filtered upper and unfiltered lower. And then just masked the filtered one with a proper shaped mask. It worked.
As for random display object, the same idea is coming. Draw the display object to some bitmap, put that bitmap higher and mask it with some shape.
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 have a flash movie in which I've created something that functions similarly to a calculator. When the user clicks a button, depending which button was pressed and in which order, a series of movie clips is displayed from left to right in specific positions, using addChild. I have a button on the calculator which I would like to have function similarly to a 'clear' button on a real calculator. When clicked, it would remove only the movie clips that were displayed by clicking the calculator buttons. how I can remove only the movieclips that are part of the calculator display? Here are some
code samples.
var mcSelection:MovieClip = new MovieClip(); //check to see how many times a calculator button was clicked function checkTime() {
[Code].....
I've tried different variations of removeChild and removeChildAt, but either parts of the calculator are getting removed, or I remove the parts of the display one clip at a time instead of all together, or I get out of range errors. How do I target a certain range of movieclips to remove? Do I need to assign a specific range of levels when the new movieclips are added and then remove that range? It will be different number of clips and combination of clips every time.
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()