MovieClip sprite vs drawing with graphics
Hello! I have a program that dynamically draws a polygon anywhere where the user clicks on the screen. (using lineto, moveto) However this polygon is always behind the other symbol of objects on the screen even if his last added in the childlist is. Is there a problem with the depth when you draw symbols vs drawing with lines? How can ensure me that my smart object will display in the face?
Thank you
Will be
OK the problem is that you have the graphics in the main class through the polygon class to draw
which works great but all the objects in the main class, if they are added before or after the polygon will appear above any line draw
to work around this problem
change the DrawPolygon() function do not take a target
so
public void DrawPolygon() (x: Number, y: Number, sides: uint, RADIUS: Number, angle: number = 0): void
adjust the call to this function in hand in the appropriate form
then in DrawPolygon() instead of references to target just replace them with graphics this will draw on the contrary to the purpose of polygon graphics
Note You can put calls Graphics.Clear and graphics.lineStlye early DrawPolygon() so
We can then remove the clear and graphics.lineStyle calls in your main class
hope that makes sense
Tags: Adobe Animate
Similar Questions
-
Drawing with the sprites in a framework of
Hello
I use Sprites to draw quite large graphs. For me to do this interactively, I joined the nodes/edges in the graph in a UIComponent defined in the mxml file. I would also like to the UIComponent to be within a Panel, and therefore the content of this component should not be visibly this sign outside.
The problem is that I'm unable to set limits for this UIComponent, and so the graph occupies most of the screen beyond the Panel container area. (height/width for the UIComponent attributes do not address this).
What is the appropriate way to have the curve in a canvas with limited arae (with scrollbars so the graphic content is bigger than this region) so that it not overflow not display area desired?
In the code below, for example, I would like to the UIComponent (to which I add children Sprite) have limits so that it does not appear anywhere on the screen.
Thank you very much.
Define a mask.
-
Drawing with a graphics tablet in Flash
Hey community!
I recently received the latest version of Flash and wanted to do a little drawing with my graphics tablet, but every time I try to draw a line by hand, using the pencil tool or a brush, and then for some reason, he traces a straight line leading to the bottom left of the screen, and I don't know why it does this.
When I use the tablet to draw in Photoshop, then it works quite well, but not in Flash
Any help will be great!
Thank you
Hello
This problem has been resolved internally and difficulty for this will be available with the next release of Flash Pro CC.
Thank you
Sangeeta
-
Create/class library with graphics drawn in flash
Hello
I'm new to the forum and I use flash for a short time...
I would like to create a library that contains the objects designed in flash and classes that manage.
An example: the use of flash I want to create a user profile box. This box contains a circle (profile picture) and a label (username).
After that I would create an ActionScript class to insert the image in the circle and the name on the label. In the end, I have a class that manages user profile area.
After I would use this class in another flash project.
I hope that I was clear...
How can I do?
Thanks to all those who wish to respond.
Create a new movieclip and draw your graphic elements on the stage of this movieclip. assign to each object you want to control with actionscript, an instance name.
assign this movieclip a class (for example, by double clicking in the column link from the library panel adjacent to the movieclip symbol). Right-click as movieclip and click on Edit class. create the code required by your class.
You can use this movieclip and class to any other project pro flash by dragging the movieclip symbol in the library of the other project and moving the class file to the new project class path.
-
Hi all
I'm experimenting with graphics api.
Although I used it until I'm still not very confident on this subject. So, I want to build a strong foundation in this area. I looked online but couldn't find something really useful and what explains the basics.
For my first mission I want to draw a rectangle in the middle of the screen. Now, for this I used a verticalfieldmanager and I replaced its sublayout method.
In the sublayout method, I use the getgraphics() method to create the instance of the graphics class. Now, type the following lines:
g.drawRect (width/2, height/2, 70, 30);
g.fillRect (width/2, height/2, 70, 30);
Super.paint (g);
setExtent (width, height);
but all I get is a white screen... can't use a graphical object directly in a fieldmanager? do I have to draw the rectangle in a separate field (perhaps a labelfield), then add it to the fieldmanager?
as you can see my bases regarding the user interface graphics and custom api are not very good and that's why I need all the help I can get here.
Thank you!!
For one you super.paint () to call after you did you paint that will erase everything you have done. There is no need to call super.paint () If you make your own custom paint job.
-
Learn to draw with the mouse on Html 5 canvas inside the browser (using createJs).
Hello world
In Flash AS2/3, we can draw with the mouse in the browser (of course within the Flash Player). How can we do that in DC Flash Canvas using CreateJs (the result should be in canvas not in flash player). Something like this http://www.codicode.com/art/how_to_draw_on_a_html5_canvas_with_a_mouse.aspx
Thanks in advanceHere's the code if anyone is interested.
form of var oldX, oldY, size, color;
form is new createjs. Shape();
stage.on ("stagemousemove", function (evt) {}
If {(oldX)
shape.graphics.beginStroke (color)
.setStrokeStyle (size, "round")
.moveTo (oldX, oldY)
.lineTo (evt.stageX, evt.stageY);
internship. Update();
}
oldX = evt.stageX;
oldY = evt.stageY;
internship. Update();
})
stage.on ("stagemouseup", function (event) {}
color = createjs. Graphics.getRGB (50, 100, 150, 1);
});
stage.on ("stagemousedown", function (event) {}
color = createjs. Graphics.getRGB (50, 100, 150, 1);
size = 4;
});
stage.on ("stagemouseup", function (event) {}
Color = "";
});
stage.addChild (shape);
internship. Update();
-
Satellite A300-146 - cannot play games with graphics
I have Toshiba Satellite A300-146, model No.: PSAJ0E, 1 GB of RAM, Intel Dual core 1.87 processor, chipset Mobile Intel (r) 965 family.
I can play some games like hitman silent of assasin on fullscreen and with graphics.
But the problem is that a game could not open correctly IE after you open the game, he becomes 16-bit or not graphicsless. I tried these games = need for speed - pursuit and need for speed - undercover, the same problem occurs. I tried in windows XP and Vista.
We all know Roadrash. I played this game in computer III pentium no value correctly... but I can not play in my laptop...
Please help me to recover from this problem with the graphics.
Sul
Hello!
Check the system requirements for the game. Satellite A300 is not a high-end gaming laptop and maybe some new games couldn't work on this laptop.
Maybe you need to reinstall your laptop with the Toshiba recovery disc. I put t have another idea so try and post your result.
Good bye
-
HP pavilion f002sm 17: hp pavilion 17 f002sm problem with graphics card
OK Hi again, you help me with my problem with graphics card yesterday I install the driver for my laptop and I can play games, but I I look for tools of diagnosis and is in writing which is r5 graphics card which is built on my laptop and I have A7 graphical please help amd a8 6410 win 7 32-bit
Hi @zumzo ,
I understand that you have installed the driver and it works fine. When you checked the diagnostics you became confused because it says graphic R5 but you R7.
According to the specifications of your laptop you have AMD Quad - Core A8 - 6410 APU with graphics Radeon R5 (2 GHz, 2 MB cache).
Here is a link to the 17-f002sm HP Pavilion Notebook product specifications to confirm this information. I hope that this eliminates any confusion.
-
ordered a pavilion with graphics card upgrade, upgrade used only 16-bit location
ordered a pavilion with graphics card upgrade, upgrade used only 16-bit location. I want to connect a second monitor, can I use the parent connections card currently have coverage through them that say "do not remove"?
Hello
If you use an adapter, then you have the choice on the end to use the adapter based on the adapter that you use. Buy cable HDMI to DVI and save frustration adapter problems and possible.
-
Resizing of bitmaps with Graphics.drawTexturedPath - bad ratio
Hello
I used to resize bitmap images (to have the similar physical size on different phones) in my project with the following code - found in this thread:
Without creating an encoded image bitmap image resizing
public static Bitmap resizeBitmap(Bitmap image, int width, int height) { int imageWidth = image.getWidth(); int imageHeight = image.getHeight(); // Need an array (for RGB, with the size of original image) int rgb[] = new int[imageWidth * imageHeight]; // Get the RGB array of image into "rgb" image.getARGB(rgb, 0, imageWidth, 0, 0, imageWidth, imageHeight); // Call to our function and obtain rgb2 int rgb2[] = rescaleArray(rgb, imageWidth, imageHeight, width, height); // Create an image with that RGB array Bitmap temp2 = new Bitmap(width, height); temp2.setARGB(rgb2, 0, width, 0, 0, width, height); return temp2; } private static int[] rescaleArray(int[] ini, int x, int y, int x2, int y2) { int out[] = new int[x2*y2]; for (int yy = 0; yy < y2; yy++) { int dy = yy * y / y2; for (int xx = 0; xx < x2; xx++) { int dx = xx * x / x2; out[(x2 * yy) + xx] = ini[(x * dy) + dx]; } } return out; }
My problem with the code was that it was quite slow - larger images would take almost a second (!) on the older phones (8830) scale. It did not prevent UI - I have the code running in a separate Thread - but it has considerably delayed showing the image on the screen.
Recently, I started to experiment with Graphics.drawTexturedPath and I really like this method. However, I found a weird problem while reducing images. For example, I need to put a picture of 48 x 48 up to 42 x 42. The most important parameters for the scale are dux and dvy (of the four walk coordinates vector only these two are zero). So now my code object looks like this:
XYRect area = getExtent(); // ourBgImage is the unscaled Bitmap - our background image int imageWidth = ourBgImage.getWidth(); int imageHeight = ourBgImage.getHeight(); int[] xPts = {0, 0, area.width - 1, area.width - 1}; int[] yPts = {0, area.height - 1, area.height - 1, 0}; int dux = (int) ((((long) imageWidth) << 16) / area.width); int dvy = (int) ((((long) imageHeight) << 16) / area.height); // Keep aspect ratio and make image fit fully dux = dvy = Math.max(dux, dvy); g.drawTexturedPath(xPts, yPts, null, null, 0, 0, dux, 0, 0, dvy, ourBgImage);
which is a little shorter and much more fast-work (especially on older phones as 8830).
However, the image is truncated on the right and down - looks like two pixels are missing on one of these two parties. This was not the case with the old algorithm. I am specifying all the wrong settings?
Final nail in the coffin of drawTexturedPath:
I decided to check how drawTexturedPath resizes checkerboard (mainly the scale down). And the results are pretty ugly - it seems to use the algorithm "nearest neighbour" without any means. The project with which I tested it is attached. Once you have it running, use Alt + move to shrink and Alt + down to stretch. Observe the results.
The decision is, of course, to remove this method and resize Bitmaps the old way
-
Adobe Illustrator draw with COMPATIBLE Zenfone 2 from Asus with Android 5.0?
Adobe Illustrator draw with COMPATIBLE Zenfone 2 from Asus with Android 5.0? Because Google play lets do not install and tells you how incompatible and device meets all the requirements draw Illustrator. We're not because I have this app on the iPhone 4, which is much lower than Zenfone 2.
Yes.
After days Google game to set up prevention and warning of incompatibility, earlier in the store combatibilidade can read and install.
Soni J
-
having problems with graphics acceleration in lightroom with card amd 2015 running drivers latest
having problems with graphics acceleration in lightroom with card amd 2015 running latest drivers. It crashes every time that you do something to make anything with acceleration for example. develop module or turn it off
Version of Lightroom: CC 2015.1 [1025654]
License: Creative Cloud
Operating system: Windows 7 Ultimate Edition
Version: 6.1 [7601]
Application architecture: x 64
System architecture: x 64
Number of logical processors: 6
Processor speed: 2.8 GHz
Built-in memory: 16383,3 MB
Real memory for Lightroom: 16383,3 MB
Real memory used by Lightroom: 841,5 MB (5.1%)
Virtual memory used by Lightroom: 853,0 MB
Memory cache size: 261,4 MB
Maximum thread count used by Camera Raw: 6
Camera Raw SIMD optimization: SSE2
System DPI setting: 96 DPI
Composition of the Bureau enabled: Yes
Exhibition: 1) 1600 x 900, 2) 1600 x 900
Entry types: Multitouch: no, built-in touch: No, built-in pen: no, touch external: No, external pen: no keyboard: No.
Graphic processor News:
AMD Radeon HD 6800 Series
Check the supported OpenGL: past
Vendor: ATI Technologies Inc.
Version: 3.3.13397 context 15.200.1046.0 the base profile
Renderer: AMD Radeon HD 6800 Series
LanguageVersion: 4.40
The application folder: C:\Program Files\Adobe\Adobe Lightroom
Library path: K:\hdd\photos\Lightroom\Lightroom Catalog.lrcat
Settings folder: C:\Users\nathan\AppData\Roaming\Adobe\Lightroom
Plugins installed:
(1) Behance
(2) substantive canon Plugin
(3) Facebook
(4) Flickr
(5) irista
Config.LUA flags: None
Map #1: Seller: 1002
Feature: 6738
Subsystem: e178174b
Revision: 0
Video memory: 1011
AudioDeviceIOBlockSize: 1024
AudioDeviceName: Speakers (Corsair Gaming H1500 helmet)
AudioDeviceNumberOfChannels: 2
AudioDeviceSampleRate: 44100
Build: not initialized
Direct2DEnabled: false
GPUDevice: not available
OGLEnabled: true
You can disable the GPU manually by changing the preferences file to LR with a text editor such as notepad and change the line useAutoBahn = true to useAutoBahn = false. You do not want to do with LR does not.
On Windows, the LR file is located here:
C:\Users\- yourusername -\AppData\Roaming\Adobe\Lightroom\Preferences\Lightroom 6 Preferences.agprefs
You could make a backup copy of a file agprefs on your desktop, firstly, in the case where mess you something.
-
Publish reports migration with graphic functions.
Hi guys,.
I'm working on the relationship between 10g and 11g migration and I have a problem with the reports that contains a chart. They give the following error when I run them against the report of 11g Server (they work very well against the server 10g with on all issues)
The report stopped with the error:
REP-56048: engine rwEng-1 crushed., job Id: 24.
I searched on Google for a solution to fix them, the closer, I found was install Oracle Graphics 6i engine in a House separate from the Oracle, but this has been said for 9i and 10g, you can find that in the oracle document below:
http://www.Oracle.com/technetwork/middleware/reports/graph-FAQ-with-style-094084.html#Q101
Do anyone knows if I can 6i engine install Oracle Graphics in a separate Oracle 11 g House too?, so that they work at least, if not to change those that exist?
Thank you
Sona.Hello Sona,
Unfortunately installation chart 6i to one OH for 11g will not work. This option is possible as long as 10g as a temporary option during migration to the BI beans new chart features in gr 10, 2 and 11 g.Reference
http://www.Oracle.com/technetwork/middleware/reports/graph-FAQ-with-style-094084.htmlMigration Oracle Graphics graphics 6i
How can I migrate my Oracle graphics cards to the new chart format in reports of Oracle9i or Oracle10g reports?
Oracle9i Release 1 go, graphical reports from Oracle was desupported. Reports of Oracle9i and Oracle10g use BI beans to generate graphs. Because of the underlying technology, there is no way to direct migration of Oracle Graphics to the bean BI graphing functionality. Therefore, the user will need to rewrite all their new graphics with the graphic Wizard in Report Builder.
Top of Page
Can I still use my Oracle Reports Developer 6i existing reports with graphical charts Oracle Oracle reports?
As stated in the declaration of the Oracle reports, Oracle Graphics is no longer ships with Oracle Reports. However, as part of the migration route, you can still run Oracle Oracle reports graphic graphics if you install Oracle 6i graphics engine in a separate Oracle home. You must only maintain graph Oracle 6i as a temporary measure while redesign you your new charts using the chart wizard. For more details on configuring Oracle to use Oracle Graphics 6i, see Migration of graphics in the Oracle9i Application of Oracle9iAS version 1 (1.0.2.2.x) Server Migration manual version 2 (9.0.2).
Top of Page
Can I change or add diagrams of 6i, Oracle Graphics to my reports with Oracle9i reports or reports from Oracle 10 g?
N ° you must have a separate installation of Oracle 6i graph generator to change your existing graphic Oracle 6i graphics since Oracle Graphics is not delivered with Oracle Reports. We strongly recommend that you migrate your cards to the new standard in the Oracle reports.
Thank you, RZ
-
The difficulty of drawing with the pencil while zoomed in?
When I draw on the stage using the pencil tool, while zooming in, the line I draw looks huge when I click and drag. When I let go, the line matches the size of other lines that I paint.
Therefore, it is difficult to draw with any degree of detail when I zoomed in. Is it possible to change the 'preview' of the line that I paint everything by dragging?
Here are some images showing what I mean:
http://I39.Tinypic.com/2vjo6s7.PNG
http://i43.Tinypic.com/mj0aid.PNG
Also, I don't like the fact that the lines appear pixelated/pellet when I paint them, and then they become smooth, when I finished draw them. I would like if they would smooth look while I'm trying to actually draw them. Is it possible to change this?
Thank you!
[display left forum general forum by moderator - not a discussion AS3 AS3]
[it's not clear it's a matter of flash pro cc, be - mod kglad]
This behavior has been changed in Flash CC. Now when you draw with the pencil, even in maximized mode, live preview appears as the proper thickness (as if the drawing scale mode).
-
Creating visible buttons with graphics
After you have created the button with graphics.
Button layer... See the CIRCLE, MORE white poster, down the place of show, STRUCK by the black circle.
Can you tell me it's OK because after I add layer to ActionScript still getting errors.
I want to assure you that I have up to this point.
a big thank you to you guys who helps others
What you are doing inside the both graphic key have no impact on issues relating to the code. The CLICKED image specifies only the clickable area for the button, it is not an image that is displayed at any time. It is usually used if the clickable area must be different from that of the top lowest areas.
If you get any errors, you must copy and paste errors in your ad and view the code associated with them.
Maybe you are looking for
-
My theme is always lost when I restart firefox. Why is this?
When I put a theme on firefox whole im ok wile navigation, but when I close mozzila it changes back to default!
-
How I previous page / dn on MAC
How I previous page / dn on MAC system
-
I installed 64-bit jdk7 and same set the new path, but the browser is not identify the jre... only 32-bit jre6u29 works and even which must be downloaded via Setup online... the offline version does not
-
How to clean a hard drive? Used computer purchased
I bought the computer. Needs cleaned completely, how do I?
-
concentrator 3000 2 lan lan VPN with NAT
I need to configure a vpn lan-2lan between 2 3030 concentrators (separate companies) on the Internet. My company assigns a small subnet for hosts sitting on the client network. The customer wants to use their own IP subnet and assign IP addresses wit