Flex :: Dynamically Change The Size Of The Canvas?
Sep 3, 2009
If the size of canvas set in the MXML markup, some part of the components that go beyond the boundaries of canvas not displayed. If the canvas size to change dynamically(canvas.width, canvas.height), canvas boundaries are virtually absent. How to dynamically change the size of the Canvas?
I'm developing a Zoom tool in my Flex App, so I'm using scaleX and scaleY property to simulate this behaviour.But when I scale my Canvas, its size change as well (obviously). The problem is that I have this Canvas inside another Canvas, so the first Canvas can't be smaller than the second one.Here is an image before and after apply zoom changing scale property in both axis:At the left, the original Canvas. At the right, Canvas after update its scale (red rectangle is the original size at 1:1, and green is after resize).I need to extend the Canvas to take up the red rectangle (not the green).
I want to reduce the size of Swf using the size mentioned in the object tag of html. Same swf file size can be different for different request.
The problem is this if we reduce the size all control in swf reduced according to the change in swf size. But we want the buttons and one more graphics remain same size for any change in size of swf file. How can we make it ..
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]...
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.
I am building a graphic component in MXML that has different states, each state having its own size. I have a "normal" state and a "highlighted state", the highlighted one having a higher height. On this components I implemented a function to be executed on each mouseOver and mouseOut to change from normal state to highlighted state and back. My problem is, in the highlighted mode, the mouseout event is triggered according to the size of the normal state.
I would like to have that the height of a canvas change automatically. When there are a lot of labels and images in my canvas, the height must increase. And when there are just a few labels in the canvas, the height must decrease.
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;
One of my client want to make a complete dynamic interface. where he can able to edit all through the admin module. Even the Stage size. once he change in admin module it will generate one xml file. from which i am fetching all the information. Now i don't have any idea that whether it is possible to change the stage size dynamically on fly. He want only one standalone swf no supporting files.
Is it possible to create a for loop, that looks at the number ofcharacters in the symbol, take the current character and raise its size by 2pt, and the previous and next characters by 1 point? And as it continuess to put the original size of each character back?I'd only started working on this, but (a) I'm new to ActionScript, and (b) it may not be possible to create such a routine.I started with this before posting:
Code: for (L=0; L<pageTitle.letters.length; L++) {
I am using code from the site, [URL] and I would like to make my slider smaller or bigger depending on the link. I'm guessing it can be done with action script, but have no idea how to do it. To view my file it's at: [URL] the FLA is at:[URL] Sadly, I need to squeeze one more link on the top menu and I am running out of room.
how I resize (or tween-resize) the size of a flash movie depending on its content.[URL]When you click on a new page, the stage size resizes depending on how large the page is.Do I have to use javascript to do this (because I can't find the javascript on the pier website to take a look at it).Or can I do this with actionscript?
Just wondering if theres anyway to override/cheat the scrollpane size limit of roughly 2000+px?
I'm making a site for my friend and she getting pedantic about each set of photos fitting into one horizontal scroll window, only problem, each set of photos has 20 + images in them.
I read somewhere that its poss to use actionscript to arrange a bogus the starting x point on the main canvas, but surely this would only wok if you're scrolling from right to left?
Another thought I had is to embed a button at the end of the canvas size limit which the user clicks on to load the next part othe series, but this would feel clunky and like a compromise + when I've tried linking the swf of this menu into the main movie the button doesn't work.
My friend has been insistent on a scroller rather than dynamically loading images (which can be slow too).
I recently contributed a soundtrack to a flash movie. The canvas size of the document was 550x400px, and we tried to export it in near-HD format to various formats. This resulted in either no video (DivX/Xvid export) or in a real bad quality so that even a screen capture would produce much better results. My question is: can it be related to that the canvas needs to have at least the size of the desired export? The person creating the movie assumed/stated it would easily resize on export since it is vector material / high res images, but the results are rather ugly
I create an HBox, fill it with a grid of buttons, and set the scroll policy. When I resize the window, the stage changes size, and so does the HBox ... to a point. Once it reaches the height of the Grid it contains, it stops shrinking, like it has a "min-height". This ruins the scrollbar that I'm trying to establish in this case.
I've set the height to 100%, shouldn't it always take the height of the stage, it's parent?[code]....
I have a flex tree control bound to an xml data from the database. I have item renderers for the tree items. My concern is, when my tree item size is huge, if I scroll using the mouse, it scrolls in 4-5 items at a time. I need it to scroll item by item. When it scrolls 4-5 items at a time, there seems to be a rendering issue as I have overriden lot of properties of treeitemrenderer and also the custom control i have put into the item renderer
I have Flash 8. I created a Flash movie a number of years ago, probably in an early version of Flash. I use it on my website. I want to redesign my site and make the movie smaller from the standpoint of making the canvas/stage size smaller. I don't mean just compressing the flash movie to a smaller swf. Is there some quick way to do this without having to recreate the movie and put in smaller elements?
I have a generalized media player web app that I wish to be able to use flash in. The client uploads the flash to a particular directory, and a webpage is produced automatically that houses that flash file. The output of this process currently looks something like this:
I am trying to get the flash to display using the original canvas size (540 x 400 by default) but every time I load this in chrome I get 300 x 150 and in IE the box is square.
how to get it to render using the flash canvas size?
I'm new to Flex, but been working with AS 3.0 and Flash for many years. I'm trying to loop through a variable and based on the supplied information your the particular record, generate a canvas (and note: I'm using a Canvas as my movieclips in Flex). The new canvas (MC) will contain many other items within.
Any I'm wishing I was purely in Flash or can Flex do what I'm trying to ask it to do. I've searched high and low without find any results on creating a canvas component at runtime.
My artist drew a beautiful island but it's 5000 in width. We scroll it as it's for a Virtual World. - it's in layers and we scroll the different layers at different speeds. Flash documentation states that the limit is 2880 BUT it does work in the player i.e.: you can see the full island but it does run a little slow.
Should I a. Create a smaller island of 2880 which is a shame as I would have to get rid of a lot of good stuff b. Split it into two images and dynamically connect them with code.
Also, I have different layers scrolling at different speeds which would make things more difficult to look natural.
I am embedding the swf into a c# winform, now what I want to do is when I click a button inside the swf, the swf's size is changed. I have tried to use the stage class but failed, the system said the width/height property is not implemented:
protected function button1_clickHandler(event:MouseEvent):void { stage.width = 100;
I have a LinkBar which is linked to a viewstack. However, as I change the fontsize of my LinkBar, when I run it, the font size does not change at all! I've tried changing the font using CSS and it doesnt change the font size!