ActionScript 3 :: Flex SDK 4.6 - Using FXG File For Simple Graphics
Mar 1, 2012
I have flex sdk 4.6 installed and I want to compile AS3 class that uses FXG file for simple graphics. I have and fxg file called Speaker.fxg and I tried to import it like a package
import Speaker;
But when compiling it returns
Error: null
Also tried this
[Embed(source='Speaker.fxg')]
private var Speaker:Class;
private var sp:Sprite = new Speaker();
[Code] .....
I used the fxgeditor air app from here [URL]. I also tried using A. Illustrator exported fxg file and it compiles but the swf is blank.
View 1 Replies
Similar Posts:
Dec 20, 2009
can i import vector graphics file *.ai file(illustrator generated) into flex3 ??
View 2 Replies
Apr 9, 2005
I was wondering about MC and hey can help to lag a game out. I set up an advanced class system so i don't have to use MC to simulate walls, all i use isthe x,y,width and height. Well anyway since i don't need MC anymore I was wondering if there is a way to attach Graphics instead of MC cause a Graphics file size is relatively small than that of a graphic, I think. If anyone could tell me thats true and show me a way to attach graphics that would be nice. I haven't tried it yet but maybe if I exported the graphic from the library imihgt be able to call its name, but it doesn't have an instance name so im stuck.
View 2 Replies
Oct 27, 2009
I want to use vkontakte's new wrapper feature, that enhances your application abilities by running under SWF wrapper. This is a sample application that uses this mechanism. It uses pure action script to display it's contents rather than an mx:Application.
Using the wrapper on my mx:Application failed due to the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::FocusManager/activate()[C:autobuildgalagaframeworksprojectsframeworksrcmxmanagersFocusManager.as:702]
at mx.managers::SystemManager/activateForm()[C:autobuildgalagaframeworksprojectsframeworksrcmxmanagersSystemManager.as:2493]
at mx.managers::SystemManager/activate()
[Code]...
Unfortunately - it also failed, and the question remains, how to start Application from a simple AS file?
View 2 Replies
Jul 13, 2010
I'm trying to implement a simple application which uses Flex on the front end and a Spring/Hibernate application on the back end, with communication between the two going over a BlazeDS channel.
I'm seeking direction as to the best and/or simplest way to approach this. I have the UI set up in such a way that the user is presented with a file chooser in which they pick the image file they want to upload. When this is chosen and submitted (as a form submission) then the server side should receive the image file data as well as some related metadata such as a description and date, then populate a Hibernate entity/POJO with the image file data and related metadata, and then persist the entity/POJO into the database.
I have found some examples of how you would do a file upload and download using servlets here and the FileReference class (here and here) but these don't appear to address the problem in a way which leverages BlazeDS and/or Spring/Hibernate. I want to put the image file data and related metadata (description, capture date, etc.) into a value object within the Flex application and then send this over BlazeDS to a service provided by my Spring/Hibernate application running on Tomcat. In this service I want to extract the image data (both the actual JPG/PNG/GIF data and the related metadata such as description, etc.) from the value object sent from the Flex app into an entity/POJO which is then persisted via Hibernate in my database.
Can this be done, and if so what's the best way to go about it? Am I mistaken in assuming that if I use BlazeDS then I am somehow bypassing the need to provide HTTP-based services such as servlets on the server side and instead I can use my Java services as "RemoteObjects"? Is there necessarily a one-to-one mapping between Java POJO/entity class and the Flex value object class when making this sort of transfer? If so is there a tool which creates corresponding Flex value objects from Java POJOs or vice versa.
Update: Some code to make this more clear:I have this as my value object in Flex:
package valueobjects
{
import flash.utils.ByteArray;
[Bindable]
[code]....
When I set a breakpoint in the method above and look at the image variable it looks to be empty, so I'm assuming that the transformation from the Flex value object to the Java POJO did not go as expected and that there's more to it than just adding a RemoteClass alias in the Flex value object class.
View 1 Replies
May 27, 2010
can anyone explain when I goto publish my flash file certain graphics and text are disappearing from the swf file?
For instance just some static text and also a graphic i've copied three times.. two show up but the third doesn't? really annoying help!
View 2 Replies
Feb 2, 2010
I copied code from one site and saved as Test3D1.as. The code is:
Code:
package
{
import flash.display.*;
public class Test3D1 extends Sprite
[code]....
and tested it again. I got message "test" in output window, but still no graphics.
Code:
import flash.display.*;
var ellipse1:Sprite = new Sprite();
ellipse1.graphics.beginFill(0xff0000);
[code]....
View 3 Replies
Oct 8, 2009
i am trying to receive in my function as a parameter either a shape or a sprite and then access their graphics property, but this gives me an error:
Code:
public static function makeRect( obj:DisplayObject, ...
var g:Graphics;
if(obj is Sprite){
[code]...
//1119: Access of possibly undefined property graphics through a reference with static type flash.display:Graphics.
View 1 Replies
Dec 17, 2009
I have 2 questions regarding bitmaps. Say I'm loaing graphics from a game off a server into a .swf file:
1) Which format is the best to use - gif, jpeg,png? (for non transparent images)
2) When a user plays a .swf movie it gets saved to their browser cache and its loaded the next time they access the same file, but when your externally loading images does flash have to re-download all the images or is it all stored in the browser cache?
View 2 Replies
Dec 20, 2009
I am trying to display photos as a slideshow with some transitions effect. I am having error when using TransitionManager, the error code is
"1067: Implicit coercion of a value of type flash.display:Loader to an unrelated type flash.display:MovieClip."
To me it seems like TransitionManager can only be used in MovieClip and the XML file is link to .jpg.
Is there a code to convert the Graphics into MovieClip and make the code work. Or is there a better way to do the slide show using XML data.[code]...
View 2 Replies
Feb 1, 2011
I just need a simple code of drawing a text curve in flex
View 2 Replies
Oct 21, 2011
I know flex is a client side technology, but our customers are asking us to e-mail them reports (i.e. graphic images) that look just like the flex graphics we show them on the desktop on a nightly basis.
View 3 Replies
Aug 4, 2010
I've got a project that has an FLV with cue points controlling when graphics appear in the swf file. The graphics are being loaded into empty movie clips via AS on the stage (everything is being loaded and unloaded into the first frame of the main stage). What the client wants is a pause button that will pause/play both the FLV and graphics being loaded in the swf.
View 1 Replies
Jul 7, 2009
I have a client who wants some graphics to appear "coming onto the screen from the sides." They are flames, to be exact. She does not want them to just come in inside the "box" (stage). She wants them to appear coming in from the sides of the browser window. Is there a way to do this? That is, can you make graphics or movie clips that start off outside of the frame appear in the browser when the swf file is saved?
View 2 Replies
Jun 16, 2010
When it comes to imported vector graphics are there any methods to decrease the swf's file size as much as possible? So far I have:
- imported an illustrator ai file (strokes 'expanded' in illustrator and unneeded swatches/ brushes etc. deleted and with no raster images embedded)
- exported the file in illustrator as swf and imported that swf into flash
- imported ai file and breaking it down to flash shapes
- optimized those shapes as much as possible
I rather use vector as much as possible. For a banner for examle, I've imported vector images of trees. I couldn't get it below 40 kb so I exported all illustrator files to png files which helped. Can detailed vector images be optimized just as much? Or is it better to use bitmap files when it comes to more detailed graphics? Does it matter if it is a vector images made in flash or a imported vector file even if both have the same number of paths?
View 1 Replies
Mar 9, 2011
I'm going to create a iOS app in flash and convert. I'm thinking I may want to load graphic assets at runtime. I'd like these assets to be vector graphics so they can be resized easily with no quality degradation. I usually use SWF files ofr this purpose. Unless I'm wrong, a converted iOS app probably does not load SWF files. So I'm wondering what kind of vector graphics file format can iOS load at runtime?
View 1 Replies
May 7, 2011
I am getting below error when I try to use hudson and maven [code]...
View 1 Replies
Oct 31, 2011
I'm using flex and drawing a circle using the Spark Ellipse primitive. I am setting the x,y coordinates of the circle myself. I am drawing them within a TitleWindow component. Is it possible to force the circle to not be allowed if I specify a coordinate that is outside the TitleWindow? Or do I have to check the coordinates manually myself?
View 1 Replies
Oct 19, 2011
Is there anyway I can effectively call the equiv. of setText on a Flex Graphics object ?Specifically I'm using a custom cell renderer to display data in a datagrid. The renderer uses the Graphics object to set the background colour of only a portion of the cell (say the left half) based upon the underlying data. I would like to be able to have text over only that portion of the cell which has the background colour (eg centred within the left half). I know all the widths (of both the cell itself and the graphics object) but I don't know how I can set text (centred) over the graphics object.
View 5 Replies
Nov 3, 2009
Is there anyway I can effectively call the equiv. of setText on a Flex Graphics object ?
Specifically I'm using a custom cell renderer to display data in a datagrid. The renderer uses the Graphics object to set the background colour of only a portion of the cell (say the left half) based upon the underlying data. I would like to be able to have text over only that portion of the cell which has the background colour (eg centred within the left half).
I know all the widths (of both the cell itself and the graphics object) but I don't know how I can set text (centred) over the graphics object.
View 4 Replies
Aug 9, 2010
I need to create flash content dynamically- towards that need to build images. I need help on two points
a) are vector graphics always better than raster graphics on size/ do vector graphics take longer to render
b) do we have open-source tools to create fxg files to import into flex builder
View 3 Replies
Nov 25, 2010
how do you know the parameters (eg height and width) of the element, if the constructor is passed only his Graphics?
View 1 Replies
Apr 21, 2011
I have created a few flex primitives on screen via action script. Now based on business logic, I need to make changes to some of these primitives such as: changing thickness, direction of arrowhead etcOne thought was to assign id's to these primitives as they are built- how do I do that?e.g. I get a line built as below
var myShape:Shape=new Shape();
myShape.graphics.lineStyle(thickness,color);
myShape.graphics.moveTo(XFrom,YFrom);
[code].....
View 2 Replies
Apr 27, 2011
I am building a flex project involving drag+drop of fxg graphics. My graphic is instantiated as below:
<graphics:arrow2 id="object" mouseMove="mouseMoveHandler(event);" />
I get an error: "Call to a possibly undefined method Graphic."
This works if I change my drag-object to Image and replace the 'Graphic' below with 'Image'. What should I use to be able to reference the fxg graphic in the drag-drop? My drag drop functionality is as follows
private function mouseMoveHandler(event:MouseEvent):void {
var dragInitiator:Graphic = Graphic(event.currentTarget);
var ds:DragSource = new DragSource();
ds.addData(dragInitiator,"gph");
DragManager.doDrag(dragInitiator, ds, event);
[Code] .....
View 1 Replies
Feb 28, 2012
I'm drawing a line using this code:
this.graphics.moveTo(posx, posy);
this.graphics.lineTo(2*posx,2*posy);
But now I want to remove it, but I can't clear the whole this.graphics object because it contains more information that is useful for me. How can I remove this line without clearing this.graphics object? Is there any method to draw a similar line over it to hide or replace the line?
View 2 Replies
Sep 28, 2010
If I skin a button and use the AS3 graphice.clear() and graphics.lineTo and beginFill to create a shape, the button overlaps other items in the container.
When I use the and mxml to create the same shape, the button is neatly positioned inside the container.
View 2 Replies
Dec 28, 2010
Is it possible to draw 2 rectangular shapes of "Box A" and "Box B" and place them apart, next, adding a magnetic line (black line) between them which will keep them connected without having to manually update the line xy position?
View 1 Replies
Feb 20, 2011
Is there a simple way to draw a circular arc in MXML graphics that doesn't involve beziers? Or should I create my own component?
View 4 Replies
Apr 4, 2011
I wanted to check if there is a easy way to build an arrow for a line... currently I am trying to draw a triangle at end of the line- doable but a load of geometry to handle as the line could be at any angle and- anything build-in available?
View 3 Replies
Dec 30, 2009
how to create a button class that looks something like this: Taken from this tutorial page. I'm struggling to figure out what combination of filters I need to use to achieve the glossy effect. The rounded corners and bevel/glow effect are simple enough. But how can I add a gloss gradient over only the top half of the button?
View 2 Replies