ActionScript 3.0 :: Loading Img From Xml, Textfield.height, Scrollbar?
Dec 1, 2007
I am loading xml and using Colin Moock's scrollbar as he desrcibes it in Essential Actionscript 3.0. It all worked fine until I tried to put a link to a jpg inside the xml.Where other html tags give no problem, the img seems to mess with the textfield height. I gave the textfield a fixed height but when I try to scroll the field with the image, and trace the textfield height, it increases more and more when I scroll down, messing up the scrollbar.the img tag looks like this (and it loads fine into the textfield):
Code:
<IMG ALIGN= "left" SRC='pics/portret.jpg' WIDTH="200" HEIGHT="207" HSPACE='0' VSPACE='10' />
The slightly adapted scrollbar class looks like this (I gave the scrolltrack a fixed height and tried to give t.height a fixed height too within this class but tracing t.height keeps showing that it is increasing while scrolling down):
Code:
package {
import flash.display.*;
import flash.text.*;[code]..............
So I think that the code or flash doesn't handle the img very well,
View 2 Replies
Similar Posts:
Jun 21, 2007
I'm doing wrong here? I want to use a Blixt's scrollbar to scroll a dynamic textfield that's is set to a autosizing height.... And I'm having problems. I though I had finally found my perfect scrollbar.... it's so close!
View 2 Replies
Nov 8, 2009
I made a scrollbar class that works pretty well. I'm trying to come up with an idea for how to set to the height of the scrollbar vs the height of the scrolling content. This is a standard thing that happen in the OS. Seems there should be a minimum number and the maximum value should be reached as the size of the content approaches the size of the visible area.
View 3 Replies
May 6, 2011
I've created a dynamic text field, and set autoSize to true, so it can grow was tall as necessary. I then want to use the _height value to size a container graphic (speech bubble). Here's the (simplified) code:
[Code]....
Returns 19.6 followed immediately by 35.2. It's as though reading txt._height causes it to recalculate, so it's correct the second time. I also tried the textHeight property, which also seems to get recalculated after _height is accessed. This sequence, for example:
[Code]....
View 2 Replies
Jun 14, 2011
i would just like to ask why is the case that when i use embedfonts = true on a textfield, the textfield's text only resizes according to the textfield's height but not the textfield's width. meaning if i make the textfield's height bigger, the text also gets bigger in terms of height, but not width, can't the embedded font maintain aspect ratio according to the textfield height?
I'm only wondering about this because this is not the case when embedfonts= false
View 1 Replies
May 7, 2009
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.
View 2 Replies
Nov 10, 2008
I have an image gallery with a bunch of thumbnails displayed on the page in a grid-like layout. Currently, the swf sits in a HTML page set at 100% width and height. There's a resize listener that adjusts the layout so that the thumbnails all fit on the page
at once. So, as the browser window gets narrower, the columns decrease and rows increase as the thumbnails get pushed down the page.
The problem is, once the thumbnails get pushed far down far enough to go past the bottom of the browser, the overflow is hidden and the thumbs "below the fold" are not accessible. Is there a way to pass the dynamic height of the SWF, so that the browser detects whether or not it should display the side scroll bar?
View 1 Replies
May 3, 2007
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]
[Code]...
View 3 Replies
Feb 2, 2009
Is it possible to set the height of the sprite depending on the height of an textfield inside that sprite? I'm creating a box with a textfield inside it, but I want the box to be sized depending of how much text it is in the textfield..
View 9 Replies
Jan 22, 2011
I'm having a bit of trouble with this logic. My setup is typical, with a content MC and a handle MC the runs along a track with specified bounds. All I want to do is have the handle height adjust based on content height but in relation to the track height?
View 1 Replies
Mar 29, 2010
I am trying to increase the height of container with increase in the number of contents inside the container. Like in my case i m using tileList inside tabNavigator , when I put contents inside the tileList, the height of tileList does not increase beyond vertical height of the viewport. It puts scrollbar on the container. I want to increase the height of an flex container with increase in the contents and introduce scrollbar on the browser with increase in contents in the flex container.
View 3 Replies
Feb 15, 2009
I am using a scrollbar as demonstrated in OO scrollbar part 1 and have it working great, except that when you scroll the text, it seem to add a bunch of space at the end of the text field and then does not scroll back up to the top of the text field, but rather ends up in the middle.
Seems like it is somehow measuring the height of the text field at the wrong time? I would guess that it has the right height dimensions (due to the extra space at the bottom) but that it somehow is getting the wrong y coordinate. [code]...
View 2 Replies
Feb 26, 2006
Im currently working on a full dynamic flash website and I want it to look and behave like a good old HTML/CSS page. Meaning that i want a regular browser scrollBar to appear/disappear when the movie height is changed.
So my new killer app simply demands a width of 1000 pixels, but can be any height, and I want people to see the vertical scrollBar on their browser.
I changed the "100%" for the width to a fixed number like "1000", and keep the height parameters at 100%. I thought that will do the job, But NOT I�ve googled and found some interesting stuff, but nothing really I can use (javascript solutions).
View 1 Replies
Jul 6, 2009
how to make facility of scroll bar on my textField .
myTex.htmlText= myText;
myTex.worldWrap = true;
myTex.multiline= true;
myTex.scrollV = true;
View 5 Replies
Nov 19, 2009
I want to make a textfield where I load my text in (via txt or xml?). Depending on how much text I load in the textfield, the textfield will get longer and Therefore the scrollbar will get smaller/bigger.
View 0 Replies
Dec 10, 2009
I am trying to connect a scrollbar to a textfield.
I import text via xml.
This is my code:
ActionScript Code:
function goLoadText2(){
//var imageLoader:Loader;
[Code]....
View 1 Replies
Jan 8, 2010
i want to add scrollbar to textfield using as3 code. can you give me advice or sample code.???please!!.
this is my code:
var friendField:TextField = new TextField();
friendField.width = 340;
friendField.height = 200;
friendField.x = 30;
[Code]...
View 1 Replies
Nov 18, 2005
I made a custom scrollbar for a textfield that works like a charm... but in it's "alpha-state", it was only showing where the text was scrolled to (and how long the text is, by it's own height)- you couldn't actually click the scrollbar and drag it. So I added a little AS to the actual scrolling block MC that *should* work... and kind of does- but not like I think it logically should..?
[Code]...
View 5 Replies
Jan 25, 2008
So I have a dynamic text box and I need a scrollbar on it.Not only that but I need it to scroll to to the bottom when i calla function.
View 4 Replies
Jul 5, 2011
So I have created a scrollbar for a dynamic textField by using the following code:
Code:
scrollBar = new UIScrollBar();
scrollBar.scrollTarget = lobbyChat.incoming_txt;
[code]......
View 2 Replies
Jul 14, 2009
I am loading some text from an XML file and plcaing it into dyncamically created TextField. But if the text is long, it doesn't comes automatically in next line and goes out of the screen. I I use Text Area, then it shows a scrollbar. How can I load text in such a manner that ir automatically comes to next line and doesn't even shows a scrollbar?
View 1 Replies
Nov 2, 2009
I have searched the internet and these forums for a easy to understand way to make a custome scroll bar for my dynamic text boxes. However I cannot find any, and this the code I have:
Var scrollupper:Number = ;var scrolllower:Number= ;
var textlower:Number= ;var textupper:Number= ;
var scrollRange:Number= scrolllower-scrollupper;var textRange:Number= textlower-textupper;
[code]....
View 7 Replies
Jan 31, 2006
I would like to create a scrollbar for a dynamic textfield but do not want to use the common component. I found this script: [URL]. It seems very easy, but don't manage to have it work. And I don't understand how it manages the scrolling. it's only the 4 most essential lines I do not understand.
View 1 Replies
Jan 5, 2007
Curious to know if anyone has found any open source AS3 Scrollbar components that work with the TextField much in the way the V2 components of the same names worked.
View 4 Replies
Aug 18, 2010
I am currently creating an online portfolio using Slideshowpro [URL]. For some of my pictures I am using (external) captions from a XML file, inserted into a dynamic textfield. As some of the captions contain a lot of text I decided to add a UIScrollBar. However, when there is no text (no caption) available, I want the scrollbar to be hidden. Also if there is not enough text to warrant a scrollbar it would be great if it could be hidden!
Code below, note that "t_txt" is the instance name of my dynamic textfield:
import flash.text.TextField;
import net.slideshowpro.slideshowpro.*;
import fl.controls.UIScrollBar;
XML.ignoreWhitespace = true;
//remove scrollbar from stage, scrollbar component must be in library
var sbContent:UIScrollBar = new UIScrollBar();
[Code] .....
View 1 Replies
Mar 23, 2011
I am loading images of different size and then images are scaled and border is drawn for each image as shown in below link,[URL]... I want that border of images to be of the same width and height and for that I need to find out the max width and height size image before loading all the images. Is there any way that I can know the width and height of an image before loading it completely?
View 1 Replies
Jan 20, 2011
If I create a TextField in ActionScript 3, I can change the width with a TextFormat, but how do I change the height?Example:
var label : TextField = new TextField();
label.text = "Hello World!";
label.background = true;
[code].....
View 2 Replies
Sep 20, 2011
I try to get height of the textfield with htmlText='<img src="path/to/img.png" /><p>...Some text....</p>';To retrieve text height I use myField.textHeight property. But it always returns height of text without image.
View 6 Replies
Dec 6, 2006
How do I predict the TextField height? When I initiate one, it comes with 100 height, but I want to set it to the fonts height.
I have tried the autoSize, but some times it shrinks the text field to a very tiny one, and some times it stays at fonts height, but I can't set its width anymore...
View 3 Replies
Jun 18, 2008
Does anyone know, why a textfield may become white when loading text + JPGs into it? Sometimes it happens to me, sometimes not. I haven't figured out why. If you have any clues... The AS I'm using:
[Code]...
View 3 Replies