ActionScript 3.0 :: Dynamically Set Or Modify The Overall Height Of The Flash "document" Itself?
Apr 3, 2009
Is there a way to dynamically set or modify the overall height of the flash "document" itself?I have a custom class that lists out a bunch of records from an XML file. The lenght of the list varies depending on the parameters passed to the class. I don't want to add a scroll bar to the Flash file itself because of how it interacts with the remainder of the HTML on the page so it needs to grow or shrink programatically.
I'm trying to modify my bitmap to change their pixels to a random color. This is the way I do it (I'm using the FlashPunk library): private var _v:Point = new Point; private var _speed:Point = new Point(200, 200); private var _bmpData:BitmapData = new BitmapData(24, 24, false, 0x000000) private var _bmpImage:Image = new Image(_bmpData); public function Player(p:Point) { [Code] .....
So ok, the function that does this is render(), but in the line graphic = new Image(_bmpData); I get new memory for graphic, and this translate into a memory leak in the game. Here is an image of this: And as you can see, the MEM: part is constantly increasing.
I would like to modify the scrollbar (vertical) of the tilelist component so that there is some space between the top of the scrollbar and the top of the tilelist. Currently, the scrollbar extends the the top and bottom edges of the tilelist. I would like to add a graphic above the scrollbar but below the top of the tilelist. I can't seem to figure out how to do this. I'm working 100% in AS 3 within Flex Builder.
The attached image (picture 3) shows what I would like it to look like (with the yellow lines). Picture 4 shows what it looks like currently.
look at the code for oringe's blur scroller and tell me how to set the scroller's height to a set value instead of the stage height? if you'd like the source get it here:[URL]
On my website, I display uploaded PDF files in a flash player for my users to read. I already use various tools to extract the text and produce a serious of high quality images from the file and the system works well. The last piece of the puzzle is to be able to highlight specific parts of the document to help users with accessibility issues.
However I cannot figure out how to calculate where the specific text is positioned on the page? Notes: The documents uploaded to the system are from 3rd parties, so fonts may be embedded. Meaning that I cannot be sure of the width of specific letters. The text to be highlighted may not be unique, the same text may be repeated How can I calculate the coordinates, height and width of a specific piece of text on a PDF, so that I can then draw a box around it?
I'm creating a website that requires full flash. Within the file structure of a main swf there are other swfs being loaded into it (ie different pages). I need to be able to scroll the content of these swfs in the browser window.So say that the main swf is 800 x 600px and I load the initial page which is 800 x 500 px. This obviously doesn't need to be scrolled when viewed in the internet broswer. However, when the user clicks to go to another page it might load a page of 800 x 1300 px which is larger than the first and so needs to be scrolled in the internet browser. The main swf in which these pages are loaded into is only 800 x 600 (and even if the HTML dimensions - when put on a webpage - are set to 100%, the swf being loaded into the main swf doesn't have an impact on the size of the main swf, of which the browser goes by for scrolling.
I could of course just set the size of the main swf to the height of the largest page and have the browser scroll a whole lot of nothing when a smaller page is loaded, but aesthetically its not too great. And since I don't want the entire page to reload when a user clicks to go to another page I've got a problem on my handsI was thinking of using a script that would dynamically change the html object properties (height value) to the height of the page the user has clicked to go to.
I want to have a tree node renderer which act as follow :Clicking on it change the node height.I have tried as follow : to create a custom class derived from UIComponentand then insert it inside the tree node renderer, but because of some reason it doesn't work as I expected.Here's the code :
a movie clip symbol is designed and subclassed in Flash, but get instanced and addChild-ed in AS3. It works well as long as I don't change it's width/height property (scaling works too), but if i do, it disappears
I'm using the script below to generate snow/fairy dust. However I need it to begin falling not from the top of the flash file, but about 300px from the top. And the script will vary this slightly which is what I need. I gather it involves reversing where the swf defines the beginning of 'height' (bottom as opposed to top) or some such...
I've followed the tutorial on here on how load text from an XML file into a dynamic text box. I'd like to also automatically adjust the height of my text box based on the imported XML text
function loadXML(loaded) { if (loaded) { _root.header = this.firstChild.childNodes[2].childNodes[0].childNodes[0].firstChild.nodeValue; _root.content1 = this.firstChild.childNodes[2].childNodes[0].childNodes[1].firstChild.nodeValue; header.text = _root.header;
I am trying to make a flash blog and basically I need to be able to load in text from an xml file into the different text fields I have setup and then I need to read the height of the loaded text so I can position the next post correctly below it.
i have different size (wxh) swf files, and i have to load different swf in one SWf file(say name sample.swf) now what my problem is when i load different swf in my sample.swf either it crop disply if bigger swf load or it leave space if it small..
how to change the height of the stage dynamically, with ActionScript. Is there a way to change the height of the stage with a pixel value? I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.
is it possible to dynamically change the height of the stage?I am using 'dimensions: pixels', and 'noscale' as publish settings. What I would like to do is, when the height of a movieclip gets bigger (because of its dynamically loaded content), to make the 'stage.height' bigger too, so you can scroll more downwards.
I know stage.height is read-only, but it would be nice to have just the right amount of space at the bottom of the page, depending on how high the movieclips are. Reading back, I wonder if i state my question clear, hopefully I use the right terminology.so if stage.height would work i would like to do something like:
I want to change the height and width of an object (specifically doubling it) after an interval of 2 seconds until the height and width of the object reach over 100. I've made two different scripts to try to make this possible.
I want to populate a dynamic text box and then scroll this. Is there anyway of determining how large the text area's height needs to be given the width and the text I want to populate it with?
I'd like to know if anyone knows how to change the height of the stage dynamically, with ActionScript.Is there a way to change the height of the stage with a pixel value?I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.
How do i set the maximum width and height of a dynamicly created MC. It is a mc holding an loaded image.
This is what i got sofar:
Code: createEmptyMovieClip("imagecontainermedium", getNextHighestDepth()); // set the alpha to not see the picture loading... imagecontainermedium._alpha = 0;
how can I change the height and width of stage dynamically. I tried it with the following code:
Stage.height = 250; Stage.width = 250;
during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging.
I have a panel inside which I have a datagrid and a button. The functionality is that when I click the button, an row gets added to the data grid. I have described the pane height and width in %. But as the number of rows in the data grid increase, due to fixed panel height, a scroll bar appears in the data grid. But I want the panel height to increase dynamically as I increase the data grid rows.This is my flex code:
In my Flex application, I've got a component that extends UIComponent where I'm loading images at runtime and try to display them. I've tried lots of different approaches (using beginBitmapFill(), using different containers), but I can't get things to work as I want. The problem seems to be related to the width and height properties of the image, which aren't updated correctly.The idea is:
var sprite:Sprite = new Sprite(); addChild(sprite); var im:Image = new Image();[code].....
The image's width and height doesn't seem to be correct when it's loaded. I get width==0 (and nothing is displayed), but the property $width seems to be correct. How can I assure that width and height of the loaded image is updated?
I keep feeling like this is just a case of not RTFM hard enough, but I'm just not seeing the answer. Is there a way to use AS3 to dynamically set leading in a dynanmic text field?I've found the getLineMetrics function, which returns a TextLineMetrics instance. This instance can tell me what my leading already is, but when I try to change the value I see nothing change onscreen. Likewise, I don't see any setLineMetrics function to go along with the text field. Is there just no way to change it?
I have a movieclip that contains TextFields containing XML data, when I trace the height of the MovieClip externally, the original height (before the XML is loaded) is returned.How can I get the new height of the MovieClip, (I am trying to align the Movieclip vertically to the centre of the stage)?
I am trying to load 1280 x 720 frame size swf's into 1004 x 768 frame size files. Can I dynamically reset the stage width to 1004 and height accordingly in proportion. Have tried mc._width and it doesn't work.