Flex :: Placing Images Into A Collage Canvas?

Apr 28, 2010

I've got an array of different sized images. I want to place these images on a canvas in a sort of automated collage.

All my images have heights divisible by 36 pixels and widths divisible by 9 pixels. They have mouseDown functions that allow you to drag and drop. When dropped the image goes to the closest x point divisible by 9 and y point divisble by 36. There is a grid drawn on top of the canvas.

I've sorted the array of images based on height, then based on their widths.

imagesArray.sortOn("height", Array.NUMERIC | Array.DESCENDING);
imagesArray.sortOn("width", Array.NUMERIC | Array.DESCENDING);

I'd like to take the largest image ( imageArray[0] ) to put in corner x,y = 0,0. Then randomize the rest of the images and fit them into the collage canvas.

View 3 Replies


Similar Posts:


Actionscript 3 :: Flex - Placing Items On The Canvas Element?

Oct 11, 2009

I am writing simple game on flex. In the game there are 2 objects Board and Stone (both are extended from the Canvas super class)When I started to place Stones instances to the Board Canvas, I come across the problem, I can't understand how to set Stone on the defined position on the board.So if for example board (canvas) has following attributes: x = 25, y = 25, height = 100, width = 100How can I for example place a Stone (canvas) in a point 25, 25.

View 1 Replies

Flex :: Put Images On A Canvas And Have Them Be Moved Around By The Mouse?

Jan 11, 2010

I want to dynamically create and put some Image (mx.controls.Image) objects on a Canvas and I want them then to be able to be repositioned by the user via the mouse. Can this be done? Note, I am not looking for drag and drop. I just want to change the X and Y coordinates of Images with the mouse.

View 3 Replies

Flex :: Give MS Word Like Interface To User To Expand Or Contract Display Object's Like Canvas, Images

Dec 9, 2009

How to give a ms word like interface to a user so that he can enlarge and contract the display objects like Images, canvas, Hrules etc. at runtime in an web application?

View 1 Replies

Flex :: Dynamically Add Different Items To ThumbContent Canvas And Use Scroller Canvas To Scroll

Jun 5, 2009

I have the following code in my flex project.

[Code]...

I want to dynamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.

View 1 Replies

Flex :: Skin A Canvas With Image And Scale It To Size Of Canvas In It?

Apr 9, 2011

I'm trying to skin a canvas with an image (which is essentially a custom border for the canvas). I've been trying the backgroundImage style as well as the borderSkin style. I can't get the image to scale to the full size of the canvas though. I was wondering what the best way to go about this is.[code]...

View 2 Replies

CS3 Placing Images In Flash?

Apr 6, 2010

I'm designing a website in flash & have imported my images into the library & have placed them on the stage, but when I go to "test movie" to preview my page, some of the images look like this [URL] the funny thing is, when I look at the images on the stage they look fine, it's only when I test my movie that they look cut off.

View 3 Replies

Professional :: Make Photo Collage

May 30, 2010

I use vuvox which is a flash app that makes photo collages but I would even make a similar to so I can host it but it must be vertical

View 6 Replies

ActionScript 3.0 :: Placing And Sizing External Images

Nov 28, 2011

For some background: I'm creating some e-learning modules using a client's existing Flash/AS/XML template. There is another separate file that is loading XML content and directing the "flow" or progression of the module. Basically, it is broken up into three parts:
 
1. Chapter = a selection made from a main menu (<chapter> in the XML) and is a large section; it is comprised of one to several "pages"

2. Page = sections within the chapters that users can progress to via navigation buttons; each page represents a separate Flash/SWF file with several clips (driven by audio clips played by another AS file from the XML direction). Also, each page has a certain AS file (only ONE) associated with it to either create interactivity, an activity, or text placement.

3. Clip = audio-driven parts of each page; represented within each 'page' FLA/SWF by keyframes. These modules are being produced for two languages - thus the use of AS/XML to pull in text from two different files. We also have the need to pull in images using AS from the XML files. These images are essentially screenshots; some are large, some are small. Depending on text placement, we may want to resize images to make them fit within a certain space. Can you all suggest the best way to resize/scale these images dynamically. Basically, if the image's width is over 570 pixels or the height is greater than 550 pixels, I want to resize it so it fits within that 570x550 space. You can see the code that I tried (in "//") that didn't work. Feel free to comment on other aspects of the code.

[Code]...

View 3 Replies

Hiding Images Outside The Canvas?

Jul 9, 2009

whenever I publish a FLA file I have, and load it onto a website, I see elements which aren't suppose to be within the frame sitting outside the frame.These elements are outside the canvas in flash and come in for brieft flashy moments but then fly back out again.How do I hide all files outside the canvas? I tried masking the top layer and adding everything underneath it and locking it but that never worked.

View 3 Replies

ActionScript 3.0 :: Benefit To Load External Images Over Placing Them All In FlashIDE

May 18, 2011

The end result won't matter, once the program is finished (images sitting in IDE or images loaded externally)I work off of a laptop most of the time, cheap laptop, so if I have 5 Megs of images sitting in my Flash IDE, every time I troubleshoot (run the movie, F5), it takes at least 5 seconds before I can test my movie, and when you have to test it 4000 time a day it adds up . If I were to load everything externally, would this knock off the testing time drastically, considering I am not adding the images to the stage (just have them load, and stored in arrays)?

View 2 Replies

IDE :: Adding Multiple Cliparts/images To Canvas?

Apr 2, 2009

I am working on application similar to [URL] how to add multiple clipart to the center rectangle. I can add one clipart but then adding second clipart/image replaces the first one.

View 1 Replies

Actionscript 3 :: Flex - Possible To Have Flex DataTips On Canvas Rather Than Chart Objects

Jan 17, 2010

Flex charts, like AreaChart, have wonderful built-in support for displaying data "tool tips" when a user hovers over a point supplied in the data of a graph. You can hover over any of the bar graph examples on this page for a demonstration. I have a graph situation where I optionally draw in some dots as reference points on CartesianDataCanvases supplied to my AreaChart through it's <mx:annotationElements> and <mx:backgroundElements> tags.

I would like to have the same hover data-tip functionality that the AreaChart has, but applied to these dots. I realize that I am just drawing on canvas, and that no actual dataProvider supports these dots, but if there was a way to supply the CartesianDataCanvas with an array of data values or something to that effect,

View 1 Replies

Flex4 :: Placing Flex-component In Middle Of Screen

Sep 6, 2011

When using BasicLayout (i.e. absolute positioning) - what is the best approach to place a Flex component in the center of the application?In the test case below I'm using x="{width/2}" but this gives me at least 2 problems:How do I account for the component dimensions (the ProgressBar in the test case)?Is the binding {width/2} a good idea to use? Wouldn't it send unnecessary DATA_CHANGE events in some cases?And finally I wonder, how this all applies to full screen applications using StageScaleMode.SHOW_ALL - because currently my application is aligned to the top-left in the full screen mode and there is a white dead zone on the right of it. (Which is at least a change from pure Flash/AS3 behaviour, where the full screen content is displayed in the center of the screen and 2 dead zones on the left and right).[code]

View 2 Replies

Flex Get Canvas Id?

Jan 20, 2010

I'm developing an engine to generate components.I been wanting to get my xml script that read and create a component to be load into 'content' canvas. I not sure how do I get the addChild work correctly as in 'content'.addChild instead of the one shown below:[code]

View 1 Replies

Flex :: Scroll A Canvas Up?

Dec 27, 2009

The basis for the chat window is a canvas. I've got that showing, but how do I make it scroll up? I want to clip the window so only the last 15 lines are shown.[code]...

View 1 Replies

Aligning The Canvas To The Right In Flex?

Dec 8, 2010

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Canvas width="100%" height="100%">
<mx:Canvas backgroundColor="#A8A8A8" height="100%" right="0" top="0" width="100">
</mx:Canvas>

[Code]...

My code above works absolutely fine, until i resize my browser window to a size below 800px width. When the browser window is make of lesser width than 800px, the canvas with background color #A8A8A8 is on the right of the window, but the problem is, when I move the scroll bar, the canvas should remain on the right of the window. Which does not happen, and that is what my problem is.

How can I solve this issue. What should I do to keep my canvas be on the right=0 all the time.

View 1 Replies

Flex :: Lie Two Canvas At One Tab Navigator?

May 18, 2011

I want to lie two canvas at one Tab Navigator. when I use <mx:local it created multiple tab.

View 1 Replies

Flex :: Drawing Squares On Flex Canvas?

Dec 23, 2009

I'm trying to write some code to an animated images of squares on a Flex Canvas There's something wrong with my code below because it becomes progressively slowerI assume I'm supposed to clear the old squares or something.What am I doing wrong below?:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();">
<mx:Script>

[code].....

View 1 Replies

ActionScript 3.0 :: "mouse Off Canvas" - Go To Frame2 When The Cursor Leaves The Canvas

Feb 24, 2011

Basically I want to go to frame2 when the cursor leaves the canvas. The code below contains no errors when tested but it still does not work.

[Code]...

We know that the function gotoAndStop(frame2); works in multiple situations which means the first 3 line is fine. I don't know if the problem is the MOUSE_LEAVE event or this.stage which i suppose is the identifier for the canvas. I sure that there must be an alternative code for the identifier this.stage or the whole code. Any solution on how to fire the given function in the event when the cursor leaves the canvas?

View 2 Replies

Flex :: Zoom A Canvas Through Hslider?

Jun 19, 2009

i am required to zoom a canvas through Hslider. The problem is after zooming the canvas i cannot scroll to the extreme left and top of the canvas i.e some part of left and top canvas are not visible. i cannot find the reason. The source code for the example is given below.

[Code]...

View 3 Replies

Flex :: Disabled Canvas Look And Feel?

Jul 27, 2009

Is there a way in Flex by which a disabled canvas looks exactly the same as an enabled canvas? I haven't been able to make sense of disabledOverLayAlpha and disabledColor properties for a Canvas component.

View 1 Replies

Flex :: Resize Loaded SWF To Fit In Canvas

Jul 29, 2009

a .fla is 500 x 300. Inside, content moves OUT of the 500 x 300 stage so that it appears like it hides or moves off of the screen. .fla complied... loaded into Flex via SWFLoader:

<mx:Conainer width="500" height="300">
<mx:SWFLoader width="100%" height="100%" />
</mx:Conainer>

Loaded .swf file shows outside of the 500 x 300 Container in Flex. How can i get it so that only what is INSIDE of the Container is visible?

View 3 Replies

Actionscript :: Flex Scrolling The Canvas To Its Top?

Aug 3, 2009

Is there a way to programmatically scroll the canvas to its topmost position?

View 2 Replies

Flex - Unable To Get Focus On Canvas?

Dec 13, 2009

I am creating a canvas in actionscript like :

private var cvs_preview:Canvas = null;

[Code]....

So on the focus change i want to run the "end_preview_on_focus_change()" but this is not working. As per my understanding, i think the canvas not getting any focus in the first place. I was trying to use focusManager.setFocus to do that after the canvas's creation complete. but even that is giving me an error.

[Code]...

View 3 Replies

Flex :: Giving Border To Canvas?

Jul 26, 2010

In flex, I am using

canvasEdit.setStyle("borderColor", 0x0134FF);
canvasEdit.setStyle("borderThickness", 3);
note: canvasEdit is of type Canvas.

But I am not able to put border on the sides of canvas.

View 1 Replies

Flex :: Canvas - 3 - Custom Tab Navigator

Aug 4, 2010

I'm trying to create a custom tab navigator that has to look like. Also, when there's a rollover, the borders of the arrow have to be in blue (like the label in the current tab). For that purpose, I've created a custom component: a hbox containing a label and a canvas with 3 images inside (for the arrow tip that has to change depending on the currentState). Then, I thought of overlapping the components in order to get the blue highlight color (ex: arrow button 3 is over arrow button 4. The image of the arrow tip in button 3 will be transparent outside the arrow, so that we can see the black color of the following button).

I'm now trying to position the components inside the canvas ... but I cannot. After the creationComplete event, I assign the label text and I was calculating the coordonates of the component but it doesn't take into account the label width... -_-'

View 1 Replies

Flex - Erasing Components On Canvas?

Oct 6, 2010

The problem is when background of top or below label is changed, the top or below button is erased.

<mx:Canvas width="100%" height="100%">
<mx:LinkButton icon="{icon1}" width="25" x="10" y="10"/>
<mx:LinkButton icon="{icon2}" width="25" x="10" y="100" />
<s:VGroup width="100%" height="100%" id="lst" click="highlight(event.target as Label)" gap="0">
<s:Label />

[Code]...

So do anyone know the possible solution for this problem?

View 1 Replies

Flex :: Nothing Displays When Add UIcomponent To Canvas?

Oct 22, 2010

i am trying to add a uicomponent which contains an object of a custom class the extends UIcomponents and i want to display this uicomponent to canvas i have done no error compile or run time but it does not display the Uicomponent.

here is code;

var item:RecordRanderer = new RecordRanderer();
item.randerItem(child);
item.x=20;

[Code]....

View 2 Replies

Flex :: Add Childs To Canvas In Various Orders?

Oct 24, 2010

add childs to canvas. I want to add childs to canvas in top-down direction and left-right direction? I'm using the addChild function but I don't want to calculate the X and the Y for each Item. is there a way to do that?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved