Flex :: Draw Custom Bullet Points?
Mar 29, 2010how I can draw Bullet Points using Flex? instead of using image for 1, 2 and 3?
View 2 Replieshow I can draw Bullet Points using Flex? instead of using image for 1, 2 and 3?
View 2 RepliesI have embedded my font using the embed meta tag, along which the entire range of Unicode characters... here is my CustomTextField class[code]...
View 2 RepliesI've made a scrollable text field with the UIScrollBar component. Now I need bullet points in that text. How do I create them?
View 1 RepliesI have added some bullet points in dynamic text but the gap between each one is massive, how can I get it so they are directly under each other.I am using the tag <li>
View 1 RepliesHow would one create a custom MXML component in flex which is based on an existing component but draws an overlay over this existing component in certain situations.
Ideally, the new component should be based on (derive from) the exiting component so that occurrences of the existing component could just be swapped out with the new one.
I tried to override updateDisplayList() in the new component and to paint the overlay using this.graphics. This resulted in the overlay being drawn underneath the children of the existing component. I also tried to do the drawing upon receiving a render-event which lead to similar results.
When the external condition which should trigger the display of the overlay changes, I call invalidateDisplayList() on my new component. That works to trigger the drawing for both cases described above. The remaining problem seems to be to figure out how to draw on top of all the other components once they are added.
The following example should illustrate what I tried to do; when overlayEnabled was set and the component's invalidateDisplayList() method was called, the red rectangle would get painted in the background.[code]...
I'm currently making my own shoot'em up game where the player can switch between two player types which will fire their own bullet type in this case, squares and circles. I've setup the player switch function via pressing "space" button (switching between the two player types) and the default bullet type is "squares" and I'm not sure to approach the coding with changing the bullet type to "circles".I've written 2 classes for the bullet and player setup:Player Class: Creates instance of bullet on screen and enables the switch player type function
Bullet Class: Enables bullet properies and bullet types Player Class: Code:function onKeyDown(event:KeyboardEvent):void {if (event.keyCode == 32) //// pressing/holding "space bar" to function
[code]....
I'm trying to make my platform game character shoot a gun, my character and gun are one movieclip and the bullet is another. The bullet mc starts on a blank frame with a stop() function, when I press the space bar the bullet mc plays from frame 2 which is a motion tween of the bullet quickly moving across the page. I've set the bullet's y and x values relative to the character mc so that the bullet always comes from the gun.
My issue is that if I press the space bar a bullet will fly out of the gun (great!) but if I press the space bar again, the first bullet disappears and the bullet animation starts again. I want to be able to shoot a new bullet every time I press the space bar without effecting the bullets that have already been shot.
[Code]....
I have an array of points and I need square planes to be drawn between these points and distorted if points change their coordinates (see what I mean in the attached file).So what is the best practice I should use to create such set of planes knowing just coordinates of the points (planes vertices)?
View 4 RepliesI am looking to draw a curve through N points. The control points will be constantly moving so ill need to keep updating the line ON_ENTER_FRAME.I have looked on Google, and i found some dedicated libraries,URL...But i dont have a clue how to use it.Does anyone have any advice for me on how to draw the curve?
View 2 RepliesI'm projecting some vectors using the Utils3D.projectVectors() method. This gives me the (x,y) screen points. Then I'm using graphics.drawGraphicsData(); to draw a GraphicsTrianglePath containing these points.
The points are drawn at the top left (0,0) of the stage, but I want them to be at the middle (275,200). I know there are several ways of doing this, like for instance, adding 275 to all the screen points x values, and adding 200 to the y values, but I think that would be a massive operation.I can also set the sprite containers x and y, but I want its position to stay in the top left.
Simple way of drawing it in the middle?
i have 2 classes, one for ship one for bullet.i was trying to set the bullet.x to ship.x in the bullet class but it keeps telling me undefined. but clearly it is in my ship class.
View 10 RepliesI am trying to draw a continuous curved line in flash. There are many methods but none of the ones I have found so far quite fit my requirements. First of all, I want to use the flash graphic api's curveTo() method. I DO NOT want to simulate a curve with hundreds of calls to lineTo() per curved line segment. It is my experience and understanding that line segments are processor heavy. Flash's quadratic bezier curve should take less CPU power. [code]...
View 3 RepliesI'm having issues with drawing a circle. The code seems to work for drawing all the required segments except one, but tracing the points of the drawing looks correct.This is the class that generates the segments:
package views
{
import flash.display.Sprite;
import flash.geom.Point;
[code]....
I am struggling with an issue where I want to create a function that draws an outline of any object and I want to use this outline as curve path so I can animate objects on this path using Tweener. Like that:
Code: Select allvar path = new Array();
path.push({x:300, y:0});
path.push({x:200, y:400});
[code].....
I'm attempting to make a curve drawing tool a bit easier to use.Rather than drawing a basic curve and then clicking on the control point to change it, I would like the user to be able to click on the curve itself to change it, much as you do in the FlashIDE.So, given start and end points, and a point on the curve, how do you determine the control point for use with the MX API?(I googled this, but found mostly info on cubic rather than quadratic curves)
View 3 RepliesI'm attempting to make a curve drawing tool a bit easier to use. Rather than drawing a basic curve and then clicking on the control point to change it, I would like the user to be able to click on the curve itself to change it, much as you do in the FlashIDE.
So, given start and end points, and a point on the curve, how do you determine the control point for use with the MX API?
I am facing a real nightmare. I have many Assets which use strange origin points. I need to essentially draw these assets to a BitmapData, but the origin point causes all kinds of problems. StackOVerflow does not let me attach an image so I will try to describe. Imagine you have the shape of a digit "8". You have 3 of these shapes.... Each shape has a different origin:
1) The middle of the "8" shape
2) The centre of the top "o" part of the "8" shape
3) The centre of the bottom "o" part of the "8" shape
How, with a single drawing routine, can I correctly draw each of these instances to a BitmapData? Ideally I want to find the top left part of any Sprite bounding box, and bitmapdata.draw() from there. But after 2 days, all of my attempts either get clipped.... or using matrices, they do not work for every origin point and different drawings get clipped in different locations.
i have custom flvPlayBack player, i want to do like add Custom CuePoints using ActionScript and making one button Event , On click of that button , Flv should seek to that CuePoints added using ActionScript . I am using below code to do that.
var rtn_obj:Object; //create cue point object my_FLVPlybk.source = "sj_clip.flv";my_FLVPlybk.addASCuePoint(0, "abs",CuePointType.ACTIONSCRIPT);my_FLVPlybk.addASCuePoint(4, "abs",CuePointType.ACTIONSCRIPT);my_FLVPlybk.addASCuePoint(8, "abs",CuePointType.ACTIONSCRIPT);my_FLVPlybk.addASCuePoint(12, "abs",CuePointType.ACTIONSCRIPT);my_FLVPlybk.addASCuePoint(16, "abs",CuePointType.ACTIONSCRIPT);my_FLVPlybk.addASCuePoint(20, "abs",CuePointType.ACTIONSCRIPT);my_FLVPlybk.addASCuePoint(24,
[code]....
I thought ,this code should work properly.. but when i run this code , it give me next cuePoint which i find using findNextCuePointWithName() method but it does not seek to that point , which i thought seekToNavCuePoint() method should do.
I have a FLV with two Cue Points that I have created:
1. Music
2. Remote Access
[URL]. So this code works perfect with a componant button but I can't make it work with a normal one. Why? What is so different about them. Why can't I make a normal button and give it the same name "my_button". Why can't I make a custom button work?
Could I make my own Slider descendant (extends Slider) with thumb and scale drawn by ActionScript only?
View 1 RepliesThis is NOT duplicate of my earlier post (its is slightly different)But this is similar issue with similar error but its not the same error The error I am getting now is below while dispatching the custom event from my custom component
TypeError: Error #1034: Type Coercion failed: cannot convert events::MapEvent@a74ab51 to flash.events.MouseEvent.
dispatchEvent(new MapEvent(MapEvent.CLICKED_ON_MAP));
Note: The error in my earlier post is giving below error message
Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent
The difference here are two things, the earlier error is while converting flash event to custom event and now this one is while converting custom event to flash event and secondly, I have no clue why it is trying to convert to the mouseevent where I am just dispatching my custom event with proper listeners.
This is my custome event
package events
{
import flash.events.Event;
import ui.map.MapElement;
[code]...
i have the custom flv player which reads an XmL and draws circles on Flv video. Postion and time is specified in the XML. I did calculation with as3 getTimer() function. It works fine, no matter how long u pause and then play again. Circles are shown at right time.Now i have two problems
1- How getTimer can be reset?? it is required when user is allowed to play another swf..
2- Is there any other way besides getTimer calculation. I am not using Timer Class as it is Dependant on Frame-Script Execution time and may yield wrong result so this is not as accurate as getTimer() function.
3- As i am using Custom Slider , so i have to do calculations each time when user click or drag slider w.r.t getTimer() function and then subtracts seconds and all that. but again it goes very hard when user plays another swf as my calculations are based on getTimer() Funtion.
I want a custom Event class which draw something to requesting object.
View 9 RepliesHow to tell BitmapData do draw MC on custom coordinates?
when I call draw function, it has not got argument of coordinates, where to draw, and It draws on x=0 and y=o coordinates, and if I want x=50?[code]...
When I add a custom cursor it won't draw because when the mouse is down it's referencing the cursor and not the board. So drawing doesn't = true.
I can fix it by changing the eventlisteners to "stage" instead of "mBoard" but when I do that it will draw the the coordinates of where the mouse is on the cursor and the board.
So the Cursor could be x= 255 and y = 200 it will draw that coordinate but it will also draw the coordinate of where the mouse is over the cursor which could be x = 1 and y = 1. It will also draw that on the drawBoard.
Here are the examples in case I didn't make myself clear.
example 1 example 2
Here is the simplified code
Code:
package {
import flash.display.*;
import flash.events.*;
[Code].....
I'd like to be able to use a pencil image (custom cursor?) to draw in a defined area - its the 'ol pencil drawing a line idea on a pad. I don't know how to define the area? I've tried creating either a btn or mc instance called pad_mc & trying rollOver/Out which confines the pen but not the line. This is what I have so far, which works (ie it draws the line) but obviously it goes everywhere, not just over the mc of the pad.
Code:
createEmptyMovieClip("Line",1);
Line.lineStyle(1, 0x666666, 65);
onMouseDown = function () {
Mouse.hide();
pen_mc.startDrag(true);
[Code] .....
Also, I've got an onClipEvent on my pen_mc to try & define where its allowed to be dragged.
I'd like to learn how to create classes. For instance, I'd like to create a class that draws a custom shape. Like an arrow that is just a rectangle with a triangle on the end. I'd like to be able to do this sort of thing:
myArrow = new Arrow();
myArrow._x = 10;
myArrow._y = 50;
myArrow._width = 100;
etc . . .
This is my first custom class and I'm having a few problems. I just want it to draw a line (for now) using variables from Flash. The .as file is attached. My Flash AS3 script is: var newLine:Myline = new Myline(20,210); I don't know why it won't just draw a line from 20 to 210? Here is the error I get:
[Code]...
i have a class thats create a class with bitmapData that merge 2 IBitmapDrawable. one of them is 24*20 while the other is 16*16.i want to draw the smaller first in a bitmapData object which its width and height are 24*20 but i want to draw it in the center of the big bounds.
[Code]...
[URL]
Are they just constantly adding MC's to the display list as the mouse is moved around? Doesn't that kill memory?
Is there a way to draw lines with Flash's core graphic class but attach a custom bitmap to that line?