Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




.autoSize = True + Array.split Question



hi ganghow was the weather today? over here it's nearly boilingi nearly faintedbutexperimenting at the garden , + cold cola + wi + laptop ownsnow for my questionso what i want/intend to do:place every textmc next to eachother according to their lengthwhat works:split the array to sepperate stringsnow the problem seems to occur is finding for each item in the splitted array i'll have to check it's length, it works on mouse over but then it's allready to late, so i guess i'll have to make another loop before i place them? so the thing is, i want to place every next textmc at the end of the previous mcthe textmc is a movieclip holder with a textfield (name : txt) and hardcoded autoSize= trueany help is much appreciatedCode: var myfullString:String = "This is the line i will break up.";var my_array:Array = myfullString.split(" ");var i:Number;for (var i = 0; i<my_array.length; i++) {   var words = this.attachMovie("txtmc", "txtmc"+i, 100+i);   words.txt.autoSize = true   words.txt.text = my_array[i];   words.id = i;   words._x = //don't know how   words.onRollOver = function() {      trace("this word is : "+this.txt.text+"word length ="+this.txt.text.length);   };}// output:trace(my_array.length);



Actionscript 2.0
Posted on: Wed Jul 19, 2006 8:19 pm


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Textfield.autoSize= True, But Can Cause Blurry Tex
High guys i have been doing some teewking to my forum.
One of the things was to make the viewpost text area autoSize to the amount of data returned from the db, It works fine. I have found though when the text returned is a lot (When _hieght.textfield exceeds 300px) the autoSize sets the _hieght @ 300.5, 359.33 etc.
Please how can i stop this
It's making my text blurry

Cheers
Paul

Textfield.autoSize= True, But Can Cause Blurry Text :( Help
High guys i have been doing some teewking to my forum.
One of the things was to make the viewpost text area autoSize to the amount of data returned from the db, It works fine. I have found though when the text returned is a lot (When _hieght.textfield exceeds 300px) the autoSize sets the _hieght @ 300.5, 359.33 etc.
Please how can i stop this
It's making my text blurry

Cheers
Paul

News.autoSize = True; Making Content Disappear :(
hey there, hope someone can help me out here. i have a text box that's bringing in dynamic content from a mySQL database. instance name is news, variable is Message. my code is as follows:


Code:
myData = new LoadVars();
myData.load("http://www.mysite.com/news/return.php");
myData.onLoad = function(succes) {
if (succes) {
news.autoSize = true;
news.htmlText = this.Message;
}
};
without the autsize code it works great, info loads as it should. but the second i add that autosize code the content stops showing up. i have tried embedding the fonts (using arial), tried placing the font in the library and setting the linkage, neither works. i also have render text as html set and multiline on. anyone have any thoughts on what i might be missing here? thanks so much for any advice!

DropShadow Filter On Textfield With Autosize=true Dosent Resize
Hey guys, Ive been scratching my head at this, hopefully someone knows a workaround. I create a new text field, set it unselectable, have it use embedded fonts, turn the border on so you can see where its art, attach my text format, then apply the dropshadow filter. Heres the weird part: If autoSize is true, it will render the dropshadow, if its false it wont. So why not just set autoSize=true and be happy? If the textfield is stretched larger than it was originally, flash seems to just stop drawing the field outside of the original space. For an example, make a new fla (or see attachments), make a dynamic or input text on the timeline, set it to Tahoma (or whatever, just update the code to reflect it) and have it embed at least the alphanumeric chars, then paste this code and run it. then comment out the autosize, filter, textformat, etc lines and see what happens. The drop shadow is red so its noticeable, but do you see how it just stops drawing? Any ideas? Thanks FK!


Code:
import flash.filters.DropShadowFilter

var _displayTextField:TextField = _root.createTextField("displayField",1,0,0,100,100);
_displayTextField.selectable = false;
_displayTextField.embedFonts = true;
_displayTextField.wordWrap = true;
_displayTextField.border = true;
_displayTextField.autoSize = true;
var tf:TextFormat = new TextFormat("Tahoma",12,0x333333, null,null,null,null,null,"center");
_displayTextField.setNewTextFormat(tf);
_displayTextField.text = "hello";
//(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject);
var _displayTextFilter:DropShadowFilter = new DropShadowFilter(2, 45, 0xFF0000, .8, 2, 2, .6, 1, false, false, false);
_displayTextField.filters = new Array(_displayTextFilter);
_displayTextField._width = 400

this.onEnterFrame = function() {
_displayTextField._width += 5;
};

Styling Components: _global.styles.Label.setStyle("autoSize", "true"); Does Not Work
According to the Flash 8 Actionscript Bible, it is possible to set a style that will affect all instances of a certain component class by typing the following code:
ActionScript Code:
import mx.controls.*;
import mx.styles.CSSStyleDeclaration;
_global.styles.componentClassName = new CSSStyleDeclaration();
_global.styles.componentClassName.setStyle("styleAttribute", "value");



A disclaimer says that "[this style technique] will work with almost all of the component classes. However, the following classes will not allow you to set a class style object: List, DataGrid, Tree, and Menu." (ch 29, pg 644)

So why does the following do nothing:
_global.styles.Label = new CSSStyleDeclaration();
_global.styles.Label.setStyle("autoSize", "true");

??

Array Split
Hi forum,
my asking is very simple ... i would like to put some delimiter within my array that provide data for comboBox component
i have tried something like this:
code: var actorsArray:Array = actorsData.split(rowdelimiter); //delimiter is ";" and it push records in new row
for (z=0; z<actorsArray.length; ++z){
actorsArray = actorsArray[z].split(",");
}
actorsArray.unshift("default value for combo");
pickLetter2_cmb.removeAll();
pickLetter2_cmb.dataProvider = actorsArray;
// select first item by default
pickLetter2_cmb.selectedIndex = 0;
but it doesn't work but rather give me result in combo as they are i.e.
row1 = name1, name2
row2 = name1, name2
etc.
Thanks in advance

Split (array)
Hello

I have a array with values, I want to split them. I have a quiz that generates answers... like this.. '1:2' (means 1 question, 2 answer)
No I want that if for example the answer of question 2 is 3 than play a animation, and if the answer of question 3 is 4 I want him to play different animation.

I know that you can spli with:

ActionScript Code:
vragen = deAntwoorden;
vragensplits = vragen.split(":");
but than ??

I tried something like this

ActionScript Code:
if(_root.deAntwoorden[2] == '3'){
        trace("jeeh");
    }
But this doenst work, can somebody help me??

Array & Variable.split
Hey guys,

I tried to split a variable.

myname = "maurice!walter!gaston"
mynewname = myname.split("!");

In the text field "mynewname[0]" I'm hoping to get "Maurice" as output. But it doesn't work.

Mauriz, Maastricht

Array.split Very Slow
I have a very long string, that requires extensive use of the split method. There's an unreasonable time period necessary to accomplish this task. From what I've read so far, it doesn't get any better than this. Is there maybe another faster way, say by using a custom built function that can accomplish the same task, but in a more efficient manner?
Smash

Split String Into An Array
I want to split a string into an array, for example :

aString="a b c d";

The result should be an array :

a[1] = "a"
a[2] = "b"
a[3] = "c"
a[4] = "d"

Anyone know how to do this using actionscript ?

Split Array To Break Apart Name
I would like to pull a user's name from a database. The name is stored as one string such as "Joe User". I know I can do a split array to get the first name or last name. The problem is what if a person has more than two words to make up their name. Like "Mary Ann Smith" or "Oscar De La Hoya".

I would like my dynamic text to simply read "Hello Oscar or Hello Mary Ann".

Any suggestions?

Array Split Question
hi,

i have just read this on another post!!! thanks very much for replying and for the welcome! I was wandering if you might know of how i might be able to do it by using loadVars() ?

i found this example on kirupa.com



Code:
files = new Array();
lv = new LoadVars();
lv.onLoad = function() {

fl = this.filelist;
files = fl.split(",");
c = files.length-1;
for (i=0; i<c; i++) {

trace(files[i]);

}

};
lv.load("http://www.kirupa.com/developer/mx2004/pg/files.php");

this seems to work fine, but there is always an underfined variable at the begginning of the array....this is confusing the hell out of me !!!!


this is what i have in my text file:


Code:
imgs=pics/chapel1.jpg,pics/chapel2.jpg,pics/chapel3.jpg,pics/chapel4.jpg
i wander if you might be able to help at all?

thanks again in advance!

Split Digits Of Array
Hi guys,

i got a serious problem here.
Tomorrow i got to deliver my project for school, but i got into a problem.

I have this array :

a[0] = _root.spelen22
a[1] = _root.boom49
a[2] = _root.huis6
etc

I want to split the digits off from this array. It can be 1 or 2 digits. so that i keep an array like this :

b[0] = _root.spelen
b[1] = _root.boom
b[2] = _root.huis

Hope that you can give me some help soon , im desperate


Thanx for the help !

Madthijs

String Split An Array
slidesArraySplit=new Array();
slidesArray=new Array();

slidesArray[0]='hello|bye';
slidesArray[1]='hello2|bye2';

slidesArraySplit=slidesArray[0].split('|');

trace(slidesArraySplit[0]);

Why is this resulting in undefined? thanks to any responders.





























Edited: 10/09/2007 at 12:18:53 PM by jonnybennett

Array.split Question
Hi,
Curious, can you split a file when using array.split() for a carriage return that was loaded using loadVars?

say my file looked like this:

John, 23, handsome, blonde
Mary, 35, pretty, brunette


myArray[3] = blonde Mary

is there a way to have it

myArray[3]= blonde
myArray[4]= mary

any help would be great.

thanks,

Split A String Into An Array - Seems Slow?
I have noticed that flash seems to be very slow at splitting a long string into an array. Anyone else noticed that?

I am pulling a list of files into flash using SWF Studio and into the flash varible called ssfilelist. ssFileList would then look something like this: ("myfile1.txt,myfile2.doc,myfile3.ini,etc...") for 80 files.

myfilearray = _parent.ssFileList.split(",");

The above code takes nearly 15 seconds to run with 80 files in it. Worse of all, it stops everything while is splits the string into an array. All movies stop. If there are 150 files in the directory, flash thinks it crashed with the pop up message, do you want to continue!!

Anyone know of a faster way to do it?

I am using a win 98SE on a p400.

BTW, i have split the code out into different frames and SWF studio grabs the files from the folder and populates the flash varible very fast, it is when flash gets to splitting the string into an array that everything stops. Also, SWF studio is a 3rd party application for flash and for cdrom deployment. However, this question was unanswered on the Standalone forum. I thought maybe the actionscript code might be more familiar to this group.
__________________
Jim Booth

String Split Into Array Of Characters
The actionscript dictionary tells me that:
code:
text = "welcome to my site";
textarray = text.split("");

should create an array with each character as an element of the array.

textarray[0] equaling "w" and textarray[1] equaling "e"

Instead it creates an array will one element that is the entire string. Which should be the result of this:
code:
text = "welcome to my site";
textarray = text.split();


Anyone know what I am doing wrong?

I am using flash 5.

Array From String(split) Not Working.
ok..

I can successfully output to a .txt file a "variable" in the following fashion:

Code:
&myTextSave=2,3,4,5,6




This is the code I am using to try and "bring it back into FLASH so I can accerss it like a normal array:

Code:
stop();
myTarget = "http://www.dmstudios.net/CMS2/user1.txt";
savedParts = new LoadVars();
savedParts.load(myTarget);
savedParts.onLoad = function(success) {
if (!success) {
trace("failed to load");
} else {
//split the string into an ARRAY
var frameArray = [];
frameArray = myTextSave.split(",");
for (i=0; i<frameArray.length; i++) {
trace(frameArray[i]);
}
//textFields to display new ARRAY data
_root.myVar1.text = frameArray[0];
_root.myVar2.text = frameArray[1];
_root.myVar3.text = frameArray[2];
_root.myVar4.text = frameArray[3];
_root.myTextfield.text = frameArray[4];
}
};


for some reason, this:
_root.myVar1.text = frameArray[0]; is the problem..when I go back to the page...and load the "text file".. I see the first value frameArray[0]
includes the VAR name?? so instead of say displaying "2" in the textField.. I get:

Code:
TextSave=2


the other textFields are reflecting the correct values however.. somethign wrong with the SPLIT?.. otr somethign else I am missing?

thanks

Split Photo Into Array Items
Hi,

i have a photo (jpeg, png, gif, ...) and i would like to split it into "cubes".
each cube will be a movieclip and should have a pre-defined size (e.g. 50 x 50 px).

i already know how to do the array and how to use the movieclips later on, but i do not know :

how to split the photo and store the region into a movieclip.

thanks a lot for your help,

A.

Split Array Into Random Groups
Howdy,

I have an array of names and I want to be able to generate a random number and then split this array into groups with relatively equal numbers of names per group (stored in new arrays/strings). Right now I am doing this by defining a large number of separate arrays and then rotating dropping names into the new arrays with a LONG list of if/else statements. Is there a faster way to do this?

Example:

array = name1, name2, name3,...,name30
random number = 5

I want to be able to create 5 new arrays and then randomly extract values from the array using a random number generator and then sort them into the 5 new arrays evenly. I can use the if/else statements if I have to, but I am hoping that there is an elegant way of doing this that won't require so much in the way of coding.

Thanks!
David

Split / Eval - Can't Get Multidimensional Array To Work.
Here's the code:


Quote:




var a = new Array();
var b = new Array();
var c = new Array();

b[0] = {x: 1, y1: 3};
b[1] = {x: 2, y1: 5};
b[2] = {x: 3, y1: 7};

for (i=0; i<b.length; i++) {
trace("b["+i+"] = "+b[i]);
}

strA = "{x: 1, y1: 3}|{x: 2, y1: 5}|{x: 3, y1: 7}";
var a = strA.split("|");
for (i=0; i<a.length; i++) {
trace("a["+i+"] = "+a[i]);
c[i] = eval(a[i]);
trace(" c["+i+"] = "+c[i]);
}




The output looks like this:
b[0] = [object Object]
b[1] = [object Object]
b[2] = [object Object]
a[0] = {x: 1, y1: 3}
c[0] =
a[1] = {x: 2, y1: 5}
c[1] =
a[2] = {x: 3, y1: 7}
c[2] =

My question is:
Why doesn't eval make array c into a multidimensional array like array a when they are getting essentially the same statements to add the items? And how do I make c the same as a, using split()?

Split Array With MyArray.slice(start, End)
I have a text file containing:

&img0=comment img0|images/image0.jpg&
&img1=comment img1|images/image1.jpg&
&img2=comment img2|images/image2.jpg&
&img3=comment img3|images/image3.jpg&
&img4=comment img4|images/image4.jpg&
&img5=comment img5|images/image5.jpg&
&TotalImages=6&

With Flash I put the content of this text file into an array:

slides = comment img1,images/image1.jpg,comment img2,images/image2.jpg,comment img3,images/image3.jpg,comment img4,images/image4.jpg,comment img5,images/image5.jpg,


What I need is the following: I need the images/imageX.jpg in an array and the comments in ANOTHER array. I searched and found the myArray.slice option. But how do you use it in this situation? HELP, hahaha!


So the result should be Array1 = images/image1.jpg etc.., Array2= comment img1 etc..

Problem With .split Delimeter And Array Length
Flash MX 2004

I have a string in an array I am trying to turn into another array.
I have traced the string and I know it is coming out correctly. The trace results in "Past*Present*Future"


Quote:




galleryMenuLabels = _parent._parent.galleryBtns[_parent._parent.Location].split("*");
for (mb = 1; mb<_parent._parent.galleryBtns[_parent._parent.Location].length + 1; mb++)
{
trace (galleryMenuLabels[mb-1] + mb);
}





results in the trace

Past1
Present2
Future3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

It looks like Flash is creating an array element for each character in the string and then positioning the text in the correct places according to the delimiter. The array length is critical in this case. Any suggestions on why flash might be doing this?

Thanks

Return Split() Array Back To A String
ola,

I have loaded external data into flash, got a word count using split(" ").length, and now want to put only the first 10 words of the file into a text field. this is where my brain stops, i have also made an array of all the words but still can't glue them back together as a single string in a text field... am I missing the obvious... thanks in advance for any help.


smashing

Loadvars + Split String Into Array Problem
Hi,

can someone please teel me hwat is wrong with this:
myLoadVars = new LoadVars();
myLoadVars.load("loadImages.php");
pic_arr = new Array();
myLoadVars.onLoad = function (success) {
trace('loaded');
if (success) {
trace(photoUrl);
pic_arr = this.photoUrl.split(",");
trace('first url:'+ pic_arr[0]);
}
};

the output of the php file is:

photoUrl=images/slideshow/disk.jpg,images/slideshow/candle.jpg

the last two traces provide no ouput and are undefined, can't see the problem.

thanks

ash

Loadvars + Split String Into Array Problem
Hi,

can someone please teel me hwat is wrong with this:
myLoadVars = new LoadVars();
myLoadVars.load("loadImages.php");
pic_arr = new Array();
myLoadVars.onLoad = function (success) {
trace('loaded');
if (success) {
trace(photoUrl);
pic_arr = this.photoUrl.split(",");
trace('first url:'+ pic_arr[0]);
}
};

the output of the php file is:

photoUrl=images/slideshow/disk.jpg,images/slideshow/candle.jpg

the last two traces provide no ouput and are undefined, can't see the problem.

thanks

ash

Complicated Text Display / Array Split Problem
Here's the problem:
When you try to put a very large volume (like 3000 lines worth) of HTML text into a text field in Flash 5 everything will slow down to an absolute crawl and simulate a state of being locked up even though it is just processing VERY slowly. Since it is taxing the plug-in so hard there is no muscle left to explain to the user that Flash is having trouble and will be a bit, plus the delay is unreasonably stale anyway.

The solution I would think would have solved it:
The first thing I tried was to put in a deliminiter (let's say "#" for the sake of simplicity) and then have the split function break the mega volume of text into an array. I then tried to use asfunction and some simple loops to have a little HTML added at the top of the page that says "Page 1, Page 2, etc, and so on" so you could get to the individual pages.

Why this didn't work:
The split function takes even longer than the original problem I was trying to solve.

What I did instead:
I did the same basic trick to split up the page, but instead have page breaks occur once every 10,000 characters or so.

Why this doesn't work very good:
I have no way to keep it so that the page doesn't cut off right in the middle of an HTML tag and can easily have the page display with all sorts of errors.

What I am looking for:
I want to have an easy way to make big pages into many smaller pages without having to manually change it in the database or set up some sort of alternative navigation scheme. It works well to have "Page 1, Page 2, Page 3" type links to see more of the long page. A while ago I saw someone who likewise encountered the rare problem with the split function bogging down a lot when you feed it a lot of information. I am looking for either that alternative to the split function or some other alternative method of breaking up long pages.

Any assistance in this matter would be greatly appreciated.


Thanks in advance,
Mr. Debler

String.split To Time-based Array For Button URL
Hi folks -

So this is part of the ongoing video player I'm working on. Here's the problem setup:

client needs to have tracking URLs applied to an invisible button during commercials (usually 30 seconds each). there's some javascript controls that populate the click URL, which are separated by ",". The tracking URLs could be between one and 3 URLS per 30 second commercial. If it's 3, then the URL changes every 10 seconds.

Right now I have the button working - sort of. The javascript does populate the invisible button, however when you click on the button during the commercial you get three popup windows rather than one per commercial block (i.e. there could be three different popups with three different URLs - but not at once, just per click).

Code is below / attached.

however, when I do add in that code it seems to just loop and stops the button action. Mostly the "if" statement is the problem.

So any clue on how I can get the URLs to populate one at a time per time segment?







Attach Code

Button Code:

var my_str:String = thisAd;
var my_array:Array = my_str.split(",");
var CurrentTime:Number = Math.floor(playFlvStream.time / duration * 100);
var percent_interval = Math.floor(100 / my_array.length);
var percent_trigger = i * percent_interval;
adButton_mc.onRelease = function()
{

for (var i = 0; i<my_array.length; i++) {
getURL(unescape(my_array[i]),"_blank");

}
}


What I need to be able to do is add in something like this:

for (var i = 0; i<adArray.length; i++) {
var percent_trigger = i * percent_interval;
if(CurrentTime == percent_trigger){
getURL(unescape(my_array[i]),"_blank");
}

Array Split Return Errors Because Of The Quotation Marks
hey, my script won't work...

I have one Dynamic text field (member_list, in which there's a html source code.
and there's an other Dynamic text field (All_member)

this is my script, easy ay. but it won't work and it allways returns an error:

member = member_list.split("<tr align="center">");
trace(member.length);
for (z=0; z<member.length; ++z) {
    All_member = (member[z]);
}
thanks in advance

Createemptymovieclip + Array = Not True?
hey

i´m trying 2 load 10 external images under each other. but something doesn´t work. help anybody?

on(press){
for(i=1; i<11; i++){
pic[i]= _root.createEmptyMovieClip("l", 10);
pic[i]._x = 200;
pic[i]._y = k;
k = k+60;
pic[i].loadMovie( i + ".jpg");
}
}

tnx in adv

Limits Of Flash Player Converting String To Array With Split() Function?
Hi all,

heres one for the real flash heads!!

i am building an application using flash 5 that will effectively need to search through all the words within a dicitonary.

Now i know that flash has alot of string manipulation power

i need to put the words into an array to then search through them.

My searching for the purposes of the application is not an issue, it does what i want, however, converting a string to an array is proving a stumbling block. I think i am right in thinking that when the loadVariables command is used, the variable comes in in string format and not array, so you need to convert within flash.


As a test, I have 2000 words coming in from a textfile using loadVariables - this comes in in an instance.

BUT if i then use the split() function to split the string into an array, the computer slows markedly and the "you are running a script that is looping alot...." warning appears.


is there a limit to how many items are held in an array?
is the split() function the best function to use?

any help would be greatly appreciated

thanks in advance

gilesb

Test Array For Numerical Order, Return True
I've got this function:

ActionScript Code:
function sfrCM() {
    for (var j= 0; j<oH.length; j++) {
        if ((oH[j]>oH[j+1]) && (oH[i+1] != undefined)) {
            hS = false;
            trace("no");
        } else {
            hS = true;
            trace("yes");
        }
    }
}

but it doesn't trace anything so obviously it's messed up somehow.

basically I'm just trying to see if the five numbers in the array oH are in consecutive order, and if so, return hS = true;

so not compare the [i] placement, but set the numbers in the array equal to real numbers so that I can compare those and see if they are in consecutive numerical order

there are five numbers though, and I think even if it worked properly, what I've got would only check if the first two array elements were consecutive, but I want all five...

MX: Quick-check An Array For "true" In All Fields?
I have an array that I want to check with a "setInterval"-triggered function.

Is there a way to do something like an "IF"-check on all entries / fields of an array? The array contains the feedback from another function, so each field can only be "true" or "false".

What I want is something like this:
IF (all values from array X == true) {
// [stuff]
}

Only way I can think of is to set a dummy variable to "true", do a for-loop through the array and check for "false" and if any of the entries is "false", the dummy will be set to "false", too- otherwise it will remain "true"...

any better ideas?
Thanks

Array, Bttns, Make True?, Yada, Yada
Last edited by ltangleus : 2005-02-22 at 12:26.
























I'm reposting here since I've cleaned up the code and thought I solved my problem. But: no worky.

I'm using a blank MC to tell the function which bttn to turn off since that was the only way I figure I could do it. Hmmm.

Any ideas?


ActionScript Code:
function setBttns() {
    for (var i = 1; i<25; i++) {
        this["bttn"+i].idx = i;
        if (frameBox._currentframe == this.idx) {
            this["bttn"+i].onRollOver = function() {
                this.null();
            };
            this["bttn"+i].onRollOut = function() {
                this.null();
            };
            this["bttn"+i].onPress = function() {
                this.null();
            };
        } else {
            this["bttn"+i].onRollOver = function() {
                this.dull();
            };
            this["bttn"+i].onRollOut = function() {
                this.bright();
            };
            this["bttn"+i].onPress = function() {
                _parent.container.loadImage("photos/"+this.idx+"_LG.jpg");
                frameBox.gotoAndStop(this.idx);
                trace(frameBox._currentframe);
            };
        }
    }
}
setBttns();

Split A Number Using Split?
is it possible for flash to identify a number and split it from the pack?
i am compiling a search using switch but for one section it is the same place over and over for instance ab1, ab2, ab3, ab4 points to one place & de1,de2,de3 points to another?
would just make it a lot quicker in the search if it could strip the number of and look up ab or de for example?
thanks
Dan

If Lalala = True Goto Sing, Else If NE True, Goto Humm
ok, I asked this question about a month ago, I cant find the post though, and I want to go into a little more detail anyways. Using something like if(...) = True to verify a web page, or directory, or even a file. How do you specify that? What is the exact AS for 1. an offline file, and two, a Online Web Page. Like if http://www.dick.net/vagina.htm = True goto sex, else if ne True, goto disney.

Thanxz

(P.S. This is in no way related to my example, i was bored!)
AKA If File Exist

Is This Okay? If(btn.ROLL_OUT==true && Btn2.ROLL_OUT==true){
Is this okay?
Code:
a1.addEventListener(MouseEvent.MOUSE_OVER, mouseOutHandler);
a2.addEventListener(MouseEvent.MOUSE_OVER, mouseOutHandler);

function mouseOutHandler(event:MouseEvent):void {
if(a1.ROLL_OUT==true && a2.ROLL_OUT==true){
gotoAndStop(1);
}
}

Autosize :-((
I am making a dynamic menu there I use textfields. And load the menu text from a text-file. I have a problem when I use autosize. See here http://hjem.get2net.dk/africatour/flash/test2.html

On box 1 there I use autosize, the textbox is twice as heigh as should be.

What can I do?

/Tommas

Autosize
Is there a way for a flash site to auto size for display. I get emails from people who say they can not see the whole site because it is to big. I tell them they need to set the display to the next setting 1024 instead of 800. Can I set a code or html on my index page to automaticly size it self to your display. Woody

AutoSize
I'm using autoSize for my text box, this is working fine.

What I'm trying to do is "autoSize" the background of the text box so no matter how long or short the text box is the background will resize with the text box.


thanks
Vu

AutoSize
there is a weird white block flash


only happens when:
textfield.autoSize = true
and there has to be a pic in the html ?

to see error goto :
http://urbian.co.za/clients/joshgen/
click info > vision

AutoSize
I'm using autoSize for my text box, this is working fine.

What I'm trying to do is "autoSize" the background of the text box so no matter how long or short the text box is the background will resize with the text box.


thanks
Vu

AutoSize Bug?
Has any one else found that MyTextField.autosize = "left" doesn't work correctly in MX2003 or is it me.

When you hit return and type some text the text doesn't appear untill you hit return again !!!! Very annoying !!!!

Im sure it was fine in the previouse version. Can some one check for me just to make sure Im not being stupid.

Thanks

Textfield.autoSize ?
hi all,

When creating some tips for my buttons (or MC,etc) I couldn't make the dynamic text field which I created on the stage to automatically resize to match the dynamic text?

I've tried mytext.autoSize but it didn't work?

any idea?

Thanks in advance

AutoSize Property
hi!

could anybody tell me please if autoSize (property from TextField objets) works?

i'm tryin' with textfieldname.autoSize = "left"; (or "center", "right", true...) & nothin'

thanx

Autosize Problem
Here's a shortened version of what I have:

code: this.createTextField(mytextbox, i, 0, 0, 300,0);
mytextbox.text = somevariable;
mytextbox.autosize = "center";

But for some reason it doesn't autosize correctly. If I set the height to 200 or something the text shows up, but if I set it to 0, load text into it, then autosize it, it doesn't work. I had something similar that worked in flash player 6 & AS 1 but now I'm using player 7 and AS 2.

The only think I could think of that's making it go wrong is the possiblity that the text isn't loaded into the textbox by the time I do autosize. If so, is there a way I could add a listener?

Thanks.

AutoSize X TextFormat
Hello guys,

Well, my problem is:

I´m trying to creat a dynamic text box using the autoSize property cause i´ll receive data from a txt file, but if i try to define the font of this text box it do not work.

like this:

musicas="musica1,musica2,musica3,musica4,musica5,m usica6,musica7,musica8";


// style caixa de texto
meu_estilo = new TextFormat();
meu_estilo.color = 0x666666;
meu_estilo.bullet = false;
meu_estilo.underline = false;
meu_estilo.font="verdana";
meu_estilo.size=10;

//cria movie clip vazio e textfiel para receber as variaveis
_root.createEmptyMovieClip("teste2",1);
_root.teste2.createTextField("meutexto",1,10,10,30 0,100);
_root.teste2.meutexto.multiline = true;
_root.teste2.meutexto.wordWrap = true;
_root.teste2.meutexto.html = true;
_root.teste2.meutexto.border=true;
_root.teste2.meutexto.borderColor=0x000000;
_root.teste2.meutexto.autoSize=true;
_root.teste2.meutexto.variable = "musicas";

// Cria o array para receber os nomes das musicas
musVar = new Array();

// Preenche o array
musVar=musicas.split(",");

// Insere os nomes das musicas no textbox do stage
for(i=0; i<musVar.length; i++) {
_root.teste2.musicas=musVar.join("<br>");
}



_root.teste2.meutexto.setTextFormat(meu_estilo);

if you disable the auto size the style work perfectly...how can i use both???

Sorry about my english and thank´s for any help...

Autosize Problem
Hi,

I´m using a html enabled textfield and I have some text and an image being displayed inside it. However if the url reference to the image is incorrect I get the following error message to the output window:
Error opening URL "http://mydomain/image.jpg which is of course normal.

However my textfield is configured with the autosize option to true. So if an image fails to load the text doesn´t render. It seems that flash re-renders the textfield even though the image fails to load and in advance the text isn´t being rendered . However if I move the textfield flash renders it again and now the text appears like it should have done without the image.

Is it possible to catch the Error opening url message triggered from an image within a textfield ?

Textfield AutoSize ...
Is there a way to detect how many lines a textfield will expand to when "autoSize" is enabled? I have various items below the expanding-textfield that reposition based on the vertical size of the textfield, but would prefer the items go directly to the final size as opposed to resizing as the textfield expands... it ends up looking somewhat jerky.

Copyright © 2005-08 www.BigResource.com, All rights reserved