Flash :: Displaying An Image In Flex
Mar 25, 2012
I worked with HaXe and actionscript programming, but I'm new to flex. Here's my question. If I want to get image from server (blazeds) in AS3 I'll load it to Loader a loader and then add it to some e.g. MovieClip. Should I do the same to load an image in flex? Or there some common for flex schema for doing that? Another question is. If I have an Image on blazeds server what will a better way to get it: to pass it through java (i.e. read it, and then pass to client) or directcly with Loader?
View 2 Replies
Similar Posts:
Apr 20, 2010
I'm trying to extend the Image class but hit a problem that I can't get past. I have a private image (img) that loads an image and a function that takes that image and copies it onto the parent. The debug function "copyit2" displays the image fine (so I know it's loaded OK). But the function "copyit" doesn't work - it just displays a white rectangle. I can't see how to make copyit work so that the original image is copied to the BitmapData and then subsequenty copied onto the parent?
(The idea is to do some processing on the Bitmap data before it is displayed, although this isn't shown here to keep the example simple.) I suspect it is something to do with the security of loading images, but I'm loading it from the same server as the application is run from - so this shouldn't be a problem?
[Code]...
View 1 Replies
Dec 22, 2010
I have a Datagrid with an ItemRenderer assigned to a column which is a Currency column(String). The renderer is mean to display the Flag of the currency eg; for USD it should display a USD flag image etc. At the moment the column is appearing Blank without an image. I have the following renderer (which extends UIComponent). I am dynamically loading the images in the commitProperties() method. At the moment I have hard-coded it to the USD image to get it to work
public class CenteredEmbedImage extends UIComponent implements IListItemRenderer,IDropInListItemRenderer
{
private var _loader:Loader;
[Code]....
View 1 Replies
Jul 31, 2009
I'm trying to show image files (jpg, png, gif) that can be larger than the available display area. I've embedded an Image inside a cCanvas (to get scrolling), but the large images are not completely displayed.
Very large images (e.g. 2480 x 3507) have the top or the top and bottom of the image clipped withing the scrolling Image.
What is the largest graphic one can display using the mx.controls.Image ?
View 3 Replies
Sep 6, 2011
I would like to display a spinning image, when my application is not connected to the socket server and is in an "offline" state.
So I've tried using an ajax-loader.gif, courtesy of http://www.ajaxload.info/
<s:Image source="@Embed(source='assets/ajax-loader.gif')"
horizontalCenter="0" verticalCenter="0" includeIn="offline" />
but unfortunately the bitmap is not animated (does not spin).
Is there a way to do that, how do you approach displaying a "loading indicator" in your Flex 4.5 programs?
Or do I have to fallback to mx.controls.ProgressBar?
View 2 Replies
Aug 6, 2009
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?
View 1 Replies
Aug 23, 2010
I'm displaying a .jpg image by xml in Flash. The problem is the output quality of the image looks terrible (pixelated and text unreadable). The image is 72dpi at 1150px X 750px. The display movie clip area is also 1150px X 750px. Is there any hints or settings I might be missing to display this image at a higher quality ?
View 7 Replies
Jan 7, 2009
I am dynamically loading my images thru XML and noticing that sometimes the image is not displaying even when at the bottom of the bar it sais that it is "done". How do I get Flash to check that the image is displayed?
View 5 Replies
Feb 7, 2011
I have a simple Flash gallery which reads from a xml file. Everything worked well but suddenly one of the images (image10.png) doesn't show up, all I get is an 'X'. All the images are in the correct folders as I haven't moved them. It's the second item that doesn't work (in bold).
Code:
<?xml verticalsion="1.0" encoding="utf-8"?>
<gallery
width="800"[code]..........
View 2 Replies
Mar 6, 2012
What I'm trying to do is quite simple. Load an image externally, then display it (addChild it) multiple times, in different places, without loading it again and again. (Granted, caching means the image won't be downloaded multiple times, but I'd like to avoid those annoying disk accesses as well.) I know that flash doesn't actually support this. A while ago I was trying this same thing, I dug around for hours, and there was no real solution.
View 2 Replies
Nov 6, 2009
getting data from a database and displaying it in a Flex (Flash) swf. Currently I have some C# code that gets the data from the DB and saves it to an XML file on my site. Then the .swf reads that xml file.
protected void Page_Load(object sender, EventArgs e)
{
DataTable _dt = new DataTable();
_dt = ProductList.GetProductssForAdmin(10);
[code]....
View 4 Replies
Jun 10, 2010
I have a bit of a memory leak issue in my Flex application, and the short version of my question is: is there any way (in AcitonScript 3) to find all live references to a given object? What I have is a number of views with presentation models behind each of them (using Swiz). The views of interest are children of a TabNavigator, so when I close the tab, the view is removed from the stage. When the view is removed from the stage, Swiz sets the model reference in the view to null, as it should. I also removeAllChildren() from the view.
However when profiling the application, when I do this and run a GC, neither the view nor the presentation model are freed (though both set their references to each other to null). One model object used by the view (not a presenter, though) IS freed, so it's not completely broken. I've only just started profiling today (firmly believing in not optimising too early), so I imagine there's some kind of reference floating around somewhere, but I can't see where, and what would be super helpful would be the ability to debug and see a list of objects that reference the target object. Is this at all possible, and if not natively, is there some light-weight way to code this into future apps for debugging purposes?
View 2 Replies
Jan 17, 2011
I have the following Actionscript code in my Flex 4 app to display images on a Sprite. Works perfect in the local flash player while developing this:
private function initializePhoto():void {
var photoLoader:Loader = new Loader();
photoLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onPhotoReady);
[code].....
View 2 Replies
Aug 27, 2006
I've been trying to find an elegant way to display MovieClip symbols from a Flash 9 swf in a Flex app. I am rewriting my old game ChipWits (google it) and have a bunch of graphics which I need to repeat for walls, floors... All the graphics are in Symbols with auto-generated classes (coffee class for the coffee symbol).I have it working in a very inelegant manner by putting named instances of each of the Symbols on the stage. In Flex I call a function in the swf's Document class that moves the symbol to 0,0 and makes it visible in the swf:
private var mc_Item:MovieClip = null;
public function showInstanceInSWF(itemName:String):void {
// If it has the property draw it[code].....
and then to take the MovieClip and addChild it in my app outside the loaded SWF.This has me pulling my hair out. I am breaking my swf's up so there is one symbol in each, but again this is very kludgy.
View 1 Replies
Aug 23, 2010
Made this class that loads pictures for me. You pass on the picture URL, the object that the picture needs to be added to and a function to do after the image is loaded.Here is the class:
Code:
import flash.display.Sprite;
import flash.events.*;
[code].....
View 13 Replies
Dec 15, 2011
In my flex 3.5 project, I have a class (MyItem) extending Canvas. In this I have declared a private variable named itemInfo which is type of ItemInfo (which is another subclass of Canvas).
I wrote code to hide/show the iteminfo when the mouse is over/out of MyItem. I am not getting any error but it is not showing the itemInfo as expected, when debugged the code, surprisingly the variables tab in debug window does not have the variable itemInfo at all.
I have declared a dummy:int variable and it is also not visible.
View 2 Replies
Jan 13, 2011
I have the following AS:
function clicButton(e:MouseEvent) {
//if (MovieClip(root).gallery_category_num !== numButton && _root.gallery_flag_animation==true) {
[code].....
View 1 Replies
Oct 28, 2008
it is possible to display an image in a TextField by using html and the img-tag. The image is identified by an URI:
textField.htmlText = 'An image: <img
src="c:\myImage.png">';
Now here's my question: Is it possible to refer an image which is in the same .swf-file as the code?
View 1 Replies
Jan 25, 2012
I am changing image through flex every time i change it saved into server directory with same name(which i am referring to show). So when i refresh my page my browser didn't send new request to server since it's already in request.so didn't getting new image.Tip:- when i clear browser history it will come with new image
View 2 Replies
Feb 9, 2010
isnt there a way to get an FLVPlayback component to display its FLV's first frame until it has enough frames buffered to start playing the video? I can add a preview to it that i can see while im authoring the flashfile the component is in, but it just shows up as a white frame for a second at runtime.. id like to get it to display its first videoframe instead of that. The component inspector assures me there is a way to do this using actionscript, but leaves me hanging on exactly how its done, or where to discover such information
View 7 Replies
Dec 12, 2008
I'm trying to load an image for displaying in a container which have been loaded from the Library and placed on the stage.Loading the image for which to use is no problem but algning it to the center of the stage is a problem.Now, keeping in mind that loaded images usually are placed at the top-left corner of the stage I tried to solve the problem like this...:
a = stage.stageWidth/2 (finding the center of the stage)
b = image.width/2
c = a-b (giving us the result of which to place the image)
image.x = c;
The formulas above make sence... in theory. In real life (at least on my computer) it doesn't work.Now, there might be some factors to consider when doing simple math like this...: - Can it be that the container is not the same size as the image loaded? - Can it be that I have to keep the x and y of the container (although I have aligned it so it's placed at the center of the stage)?
View 3 Replies
Jun 8, 2009
loading my images (from an xml) and text, to a movieclip instance.i completed the parsing but i can't load it in my mc instances.
[Code]...
View 1 Replies
Mar 14, 2010
I need info regarding ScrollPane tool in Flash CS4. As I need to display a image in it. I have a "zoom" effect set up to where when the user pushes the + button,the x and y scale is increased. But when I does so Scroll bar does not get resized automatically. And thus due to increased size only half of the image remain visible.
View 3 Replies
Nov 19, 2009
Trying to display an image in a Dynamic Text Field that reads in an html file: using the <img> tag. The text shows up just fine, but the image is not being displayed ??
View 1 Replies
Mar 11, 2010
I am trying to display am image within flash using CS3.
I have a text field with the following code.
feedback.htmlText = "<img src='Logo_small.png'</img>"
nothing displays. The image and flash document are at the same level, so that is why I am using a relative link. Do I need to use a full (absolute) link to the image?
View 6 Replies
Nov 25, 2004
I am new for Flash Action Script 2.0 .I have made one script to dynamically load the images depends on the data came from database.This images can be of any size in the directory.I want this images on perticular height and width.so i wrote like UserImage._xscale=35 and UserImage._yscale=47.but i do not get the image of that size.I tried to set _height and _width property the it is not displaying image.so what should i do to get the image of my size?
View 2 Replies
Apr 14, 2007
I have some problems with Bitmap displaying properly loaded image, when providing variables as width and height in the constructor as opposed to numbers, example:
[Code]....
Running the app with this code cuts away half of the picture from right and half of the picture from the bottom. Since the BitmapData is filled with solid white background, the clipping is clearly visible. When line marked with [*] is commented out, and line marked with [**] is uncommented instead, the whole picture displays and all is just as expected. The only difference between those two lines of code is, that in line [*] are used some properties+variables, and constants are used in line marked with [**].
View 5 Replies
Jun 1, 2009
[URL]
Go here, click on Folios, click one of the albums, then move the mouse close to the footer to get the thumbnail nav to pop up.
She wants to replace all the numbers for "Image" and "Total" to her handwritten numbers. How would I go about doing this?
View 4 Replies
Jul 28, 2011
I am trying to place an image besides the label in y-axis. So I have created a custom label renderer(A HBox containing and ). The source for the image has to be set based on a property present in the data provider. The problem is, I am not able to access the BarSeriesItem in the fnSetSource() method.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
width="1280" height="750">
[code].......
View 2 Replies
Sep 25, 2010
I want to create a list of progress bars and update the list accordingly.I have group data in an Array as
<mx:Array id="arr">
<mx:Object label="Group One" min="0" max="200" currentValue="60" />
<mx:Object label="Group Two" min="0" max="300" currentValue="50" />[code]....
The values in the array object indicate name of group,minimum,maximum and current value for the group (to be used in progressbar).I used the list with "mx.controls.ProgressBar" as itemRenderer as
<mx:List width="100%" dataProvider="{arr}"
itemRenderer="mx.controls.ProgressBar"/>
Now what I need is whenever currentValue field of Array "arr" changes i want to update the progressbar "progress" value to currentValue (where min and maximum value of progressbar are stored in Array "arr").
View 3 Replies