Flash :: Resizing A Child Canvas In Flex?

Jan 18, 2012

I'm trying to figure out how to resize a child canvas but I can't quite figure it out. I have a bunch of mini canvas' around a parent canvas like this:

<mx:Canvas width="10" height="10" backgroundColor="#040404" top="0" left="0" id="anchorTL" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" right="0" top="0" id="anchorTR"

[code]......

View 1 Replies


Similar Posts:


Flex :: Random - Canvas Child Randomly Resizes

Mar 25, 2010

I have an application with a viewstack that contains all the components that need to be displayed. The navigation is defined in the main application. All the components are based on canvas. The main application looks like that:

[Code]....

View 1 Replies

Flex :: Get Individual CreationPolicy On Canvas Child Of A TabNavigator?

Oct 19, 2010

Having read about Container creationPolicy (thanks all the references in StackOverflow)I have a TabNavigator and AS code in the initial Tab needs to reference components of second tab (a Canvas with multiple children).But the components of the second tab are null until that Tab is rendered.

According to the documentation as I read it, I should be able to set creationPolicy on the second tab/Canvas to "all"; the TabNavigator will instantiate all its top-level children, even with its multi-view creationPolicy="auto"; and I was hoping that when creating the child Tab/Canvas, that the creationPolicy="all" of that single-view Container would be honored.

But it appears that this is not the case; if the TabNavigator has creationPolicy="all" then the second Tab is populated (but so are the third, fourth, ...); but with "auto" the second Tab is created, but not populated, even though its creationPolicy="all".Is there a way to get just selected Tabs to pre-instantiate?

View 1 Replies

Actionscript :: Dynamically Adding Child Components To Canvas Vs Group In Flex?

Aug 4, 2011

I've a custom component where I do some graphics (e.g draw a line) and dynamically add a subcomponent (e.g a label) to it.

If I base the component off Group (which is recommended as per docs since its a spark component) then when I dynamically add a label the graphics part disappears.

However if I base it off Canvas this doesn't happen.

Why is that the case?

Here is the code.

MyComponent.as
public class MyComponent extends Group
{
public var x1:int;

[Code].....

View 2 Replies

Flex :: Resizing A Container When Child's Visibility Is Changed?

May 28, 2010

When I set the visible property to false for a child in a container, how can I get the container to resize? In the example bellow, when clicking on "Toggle", "containerB" is hidden, but the main container's scrollable area is not resized. (I do not want to scroll through a lot of empty space.)

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[

[Code]....

View 2 Replies

Flex :: Add Child On Canvas And Set It "on-top" When Clicking Mouse?

Nov 21, 2010

I need to add an UIComponent (Label for example) as a child on a canvas and I need to set it on-top (when user click on the label with the mouse, the target event will be the label and not the canvas)I'm sure flash has a solution for that but I can't find it on the net.

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

ActionScript 3.0 :: Get The Child Of Canvas?

Aug 26, 2009

I have a Canvas(oldcanvas) whose child is a Panel [and is the only child].

Now i want to drag and drop that panel on to someother canvas(newcanvas).

But by using newcanvas.addChild(oldcanvas.getChild(0)) is not working.

I am able to add the complete oldcanvas to the newcanvas but not able to get the child i.e the panel inside that.

View 1 Replies

ActionScript 3.0 :: Flash Resizing And Centering Child Holder On Stage, After Loading External Photo?

Apr 5, 2011

im loading photos of different aspect ratios with a loader onto a child holder frame_mc. I wanted to know what AS3 commands do i need to work on to get the frame_mc to resize to the new childs dimensions and centerize itself on the main stage? (as in event listeners, functions, vars etc)

View 3 Replies

Actionscript 3 :: Way To Tell Canvas To Dispatch Event Only If Not Over Child?

Oct 2, 2011

I got a square component inside a canvas which when clicked shows a glow effect-indicating selection-while clicking somewhere else this effect is removed-indicating deselection.The problem is that the canvas always dispatches the "deselect" event, even if the mouse if over the square.I worked around this by defining a circumstantial function which removes the child's width,height from the parent's "clickable" area.Is there a better way to tell the canvas to dispatch his event only if not over the child ?

View 1 Replies

ActionScript 3.0 :: Recognizing The Child Elements Of A Canvas?

May 14, 2010

I am trying to develeop a Graph Structure with drag and drop features in Flex. I have to connect various components/children on the canvas. Once i drag n drop the components on the canvas, i am using SystemManager event handlers to draw connectors between the components. But, as i click on one component and drag the mouse, the line is drawn on the canvas as long as my mouse stays only on the canvas. If the mouse moves over a component/child(that has been dragged and dropped onto the canvas), the line is drawn to the origin of the canvas from the first clicked component. How shud i recognize the component when i move my mouse over the component? I want the line to be drawn connecting the components once my mouseup event is called.

View 3 Replies

ActionScript 3.0 :: Way To Prevent Resizing Child

Jun 25, 2009

I have square which has child - the textField. I want to prevent text resize while I'm resizing parent. I tried removing child before resize and adding it after but it doesn't help. Also when i try to add completely new textField it seams to be already resized. Btw text is embedded.

View 6 Replies

Child Of Child Movie Clip Are Null In Imported Object From Flex To Flash Right After Being Created?

Dec 16, 2010

I have an Movie Clip in Flash that have subobject of button type which has subobject of input text and movie clips. Right after creation core Moveclip all subobject are set to null, when I expect them to be valid objects.

[Code]...

MC_Core_design was created in Flash and exported to Actionscript. I've done this for button_1 class aswell. The code was written using Flex. When I comment out both lines that result in error I get correct view of the core Movie clip with all subobject. How can I set subobject properties right after object creation?

View 2 Replies

Flex :: Flash Printing Only Prints What Is Visible On A Canvas

Jul 18, 2011

I am building a very basic report writer for an AIR application that I am developing. I am using the Flash PrintJob class to output the contents of my report (in which pages are stored as Canvas objects in a ViewStack object).The problem is, only the content that I see in the report preview screen gets printed.Is there a way that I can print what the Canvas object contains not just what is visible? Here is a code snippet that I am using:

protected function doPrintReport(event:Event):void
{
var pj:PrintJob = new PrintJob();

[code]......

View 1 Replies

ActionScript 3.0 :: Adding A Child To A Movie Clip And Resizing?

Nov 20, 2009

I am transitioning into AS3 and I'm working a block that I can't quite figure out. I need to add a child (external image) to a movie clip and resize it. This is what I have thus far and it loads the image just fine:

var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest(myOBJ.image));
productImage_mc.addChild(imageLoader);

[code].....

View 2 Replies

Flash - Flex Canvas With Many UIComponents If One Moved Are Others Redrawn/reprocessed?

Jul 18, 2010

I have a canvas called Host with many UIComponents as children, sometimes up to 1000 or 3000 items. This is fine for now, as they are not interactive. But, I have added a 'marker line' (a 1 pixel wide UI Component with a colored background) to the canvas which follows the mouse movement. When this UIComponent is added to the Host canvas and moves, everything slow down to a crawl i.e. takes ages for the UIComponent to move.

View 2 Replies

Javascript :: Client Technology Choice - Any HTML5/Canvas Libraries As Capable As Flash/Flex?

Jan 7, 2011

I built a prototype in Adobe Flex, they (customers) liked it. Everything was fine until they later told me that iPads / iOS needs to be supported too.I checked out Adobe's Packager for iPhone. We're evaluating that and we will know if it works out in a couple of days. (We need to get through Apple's red tape and certificates raj so this angle is delayed by a few days!)

There is a growing voice for using HTML5/Canvas as a technology platform itself. And despite being quite proficient in Flex, I think this makes sense.

I'm in need of a HTML5 library that can:

Render "widgets" i.e. containers with forms and components(this should be easy and possible using POHJC - Plain old HTML,JavaScript and CSS )Provide a Tree like control for laying out some data Provide a Canvas where data structures can be represented as basic shapes Provide drag and drop capabilities between Trees, Buttons and Canvas Provide some sort of Tab Navigator container (I guess JQuery works here) Interact with back-end services (JSON/XML calls will be okay, but mapping directly with back-end entities will be awesome!)Renders on latest versions of major browsers, Android OS and iOS (WebKit for mobile?)

I'm ready to give JQuery & JQuery UI a try. I looked at Sencha / ExtJS but it seems we need to maintain two code bases one for normal browsers and the other for mobiles (is that correct?)Single code base, I don't want to suggest to them that multiple code bases for the client need to be maintained. That's a last resort option and would lead to complete ruling out of HTML5 with Flash apps and native apps being developed.Canvas capabilities - I don't want to work with raw canvas and shape tags. This too is a last resort option. Is there any abstraction available?

View 2 Replies

Flex :: Flash Resizing Event

Jun 23, 2009

I use a custom component for painting a graph on a canvas, now when the windows is resized I want to determine the actual width and height of my canvas to resize the graph as well, therefore I used the resize event I can use in mxml.Now I detected in my method for resizing I only receive the width and height of the canvas just before resizing not after. When grabbing an edge of my window and moving it slowly for resizing this does not matter but when maximizing or minimizing the windows, this plays a more important role.

View 1 Replies

Flex :: Why Is Flash Resizing Images

Jun 29, 2010

O.K I'm really confused about some resizing behaviour in flex and I'm hoping somebody can explain whats going on to me.I have a container movieclip 3 movieclips deep.MC2 is inside MC1 and MC3 is inside MC2.I have another movieclip that contains a bimap image that is 55 pixels wide and 38 pixels high.When I add this movieclip to MC3 the movieclip becomes 55 pixels wide and "48" pixels high.

View 2 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

Flex :: Flash - Resizing Objects When Entering Full Screen Mode?

Dec 7, 2010

Consider the following Flex code:

private function fullScreenHandler(evt:FullScreenEvent):void {
if (evt.fullScreen) {
viewstack.selectedIndex = 2;

[Code].....

I have a viewstack with two containing canvases. Canvas 1 is used when in normal mode and canvas 2 which is used when in full screen mode.

To properly resize the objectInViewStack2 I need to know how large the screen is when in full screen mode.

View 1 Replies

Flash :: Canvas Moved On StartDrag() Without Calling Set X / Y Or Move() - How Does StartDrag() Exactly Work In As3 / Flex

Feb 11, 2011

i have an .as class that extends mx.containers.Canvas (it's a draggable border of a resizable component), it becomes draggable on MOUSE_DOWN and stops being draggable on MOUSE_UP, MOUSE_OUT and ROLL_OUT. before calling startDrag() i create a Rectangle to define the drag area, i also have a _dragging: Boolean variable to control if it's draggable at the moment. the problem is that when i click this border it jumps to a negative coordinate without calling startDrag or switching _dragging to true.

i've overriden get x, set x, get y, set y and move() methods in order to solve it but the only thing i got was the fact that position changes without calling coords setters or move(), but at the moment it's changed a getter is called and returns new (negative) value so my question is what happens on startDrag() and how to filter unwanted incoming coords values?

View 3 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 :: SWFLoader - Child Apps Couldn't Access Certain Objects That Were Instantiated By Another Child App?

Aug 23, 2010

i have problem with swfLoader in flex, when i close following code in click method i can easly add many swf to main application

<mx:VBox id="content" width="100%" height="100%" ></mx:VBox>
public function doIT():void
{[code]....

when i close adding those swfs in loop i have the same error, it looks like child apps couldn't access certain objects that were instantiated by another child app, so what can i do?

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

Flex :: ViewStack.addChild Adding Multiple Child And Only The Last Child Is Visible?

Mar 10, 2010

var viewStack:ViewStack = new ViewStack();
viewStack.percentWidth = 100;
viewStack.percentHeight = 100;

[Code]....

Its only displaying canVas3 contents not canVas1 and canVas2

View 1 Replies







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