How To Calculate String Length In Flash
Hello How can I calculate length of entererd string .....like I have got the string from user in some variable string how can I calculate its length ........is there any loop instruction ?
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-19-2001, 02:40 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Calculate The Length Of A Spiral
I need to find an equation that gives me the length of a spiral from its point of origin to its center. Trigonometry is really not my forte, and searching through the internet has led me to find there's tons of different types of spirals as there are equations for them. The effect I'm looking for is the following:
A big circle starts moving towards the center of a spiral it stops once its edge touches its starting point (starting point of the circle towards the center of the spiral. After a small distance (5 px in the example below), another smaller circle continues towards the center of the spiral, it stops as soon as te edge of its circumference (its radius) equals the distance it has crossed.
I rougly managed to plot the desired effect
across a straight line on the x axis:
Code:
var i=1;
var endpoint = 550;
var animate_id;
sx = _root.m1._x = 0;//starting point
sy = _root.m1._y = Stage.height/2; //starting point
lr = _root.m1._width; // "last" radius is the diamater, could be any value higher than the radius
function moveMovieClip(){
// upgrade current x by 2 everytime function is called
cx = _root["m"+i]._x += 2;
_root["m"+i]._y = sy;
// radius of current
cr = _root["m"+i]._width/2;
xd = cx-sx; // current x minus last starting point
yd = sy-sy;
d = Math.sqrt(xd*xd+yd*yd); // distance between starting point and current point
// if the value of d is larger than the sum of last radius (lr) and current radius (cr)
// plus 5px(space in between)
if(d >=lr+cr+5)
{
// make current radius las radius
lr = cr;
// make new starting point the current point
sx = cx;
i++;
_root["m"+i]._x = sx;
_root["m"+i]._y = sy;
if(i>5){
clearInterval(animate_id);
}
}
updateAfterEvent();
}
animate_id= setInterval(this, "moveMovieClip", 20)
stop();
this is my spiral equation, i've been on this all day and I have to deliver tomorrow, my brain is not working its best...
Code:
_root.s0.angle = 0;
// initialize first movieClip (m0)
_root.m0.angleChange = 20;
//the radius of the circle
_root.m0.radius = 100;
// the point around which the satellite will orbit
_root.m0.centerX = Stage.width / 2;
_root.m0.centerY = Stage.height / 2;
_root.["m"+i].onEnterFrame = animateSpiral;
m_radius = _root.["m"+i]._width/2
length_of_spiral = ???;
function deg2rad(degree) {
return degree * (Math.PI / 180);
}
function animateSpiral() {
var radian = deg2rad(this.angle);
this._x = this.centerX + this.radius * Math.cos(radian);
this._y = this.centerY + this.radius * Math.sin(radian);
//add the angle change to the master angle for this clip with each
// iteration, so we know how to determine the next x,y point.
this.angle += this.angleChange;
//use modulus to determine the correct angle for any angle greater
// than 360-degrees.
this.angle %= 360;
}
Even if you don't know how to go about it, any advice on coding style is greatly appreciated, i still consider myself a young grasshopper.
Thanks for reading
Calculate The Length Of A Streaming Mp3. Easy.
Hi,
Flash is funny.
When you stream an mp3 and try to get the duration of the song, you only get the duration of the part of the song that has been loaded thus far, but not the entire length of the song! This can be troublesome when making an mp3player. Actually if you ever try exporting (using the bandwidth simulator) the example code in the help files under "sound.duration", its all messed up because the calculation for finding the sound played/the sound total is not using the time played/length of the entire song. But rather its using the time played/the length of the PART of the song that has been downloaded.
So how do we find out how long a song will play without downloading the entire thing first? EASY!
Code:
determineTime = function () {
soundInterval = setInterval(function () {
var loaded = sound.getBytesLoaded();
var duration = sound.duration;
kbps = ((loaded/1000)/(duration/1000));
//trace(kbps);
var total = sound.getBytesTotal()/1000;
timeTotal = (total/kbps)/60;
//trace(timeTotal)
clearInterval(soundInterval);
}, 4000);
};
So what happens here is totally simple. We first determine the kbps of the mp3. Then we use that to find the total length of the song.
Is it perfect? Nope. But good enough for me if I don’t have to specify length of every mp3 that I put into my player.
So there you go.
Hope someone finds that useful. I haven’t seen it before but who knows. Maybe it's old news.
oh yeah and check your publish settings if you keep getting 16kbs and that wasnt the sample rate of your mp3. Shouldn't effect the calculation for the time though.
[PROBLEM] CurveTo - Calculate Length Of Path
Hi there...
how can you calculate the length of a path/curve dynamically created with AS. Example:
Code:
this.curveTo(mc1._x, mc1._y, mc2._x, mc2._y);
I found several complex formulas on math-dedicated websites though. But I'm not smart enough to adapt these to my AS-Code Hopefully someone in this forum has the answer!?
Math : Calculate The Length Of A Curve In Pixels ?
I need to calculate the length of a curved line in pixels.
I'm drawing a curved line using the MovieClip.curveTo() and then have the same line followed by another Mc, just as if the line were it's path. The size of the Mc that's following however is determined by the percentage of the line it's following (or actually, how much percent is already covered)
Anyone out there who knows how to do that ? I don't remember having learned that in high school ...
--Edit--
I found the following formula on the internet on how to calculate a segment of a parabola, but I don't understand everything (I don't know the syntax of math )
Quote:
Segment of a Parabola
Height: h
Chord length: c
Area: K
Length: s
s = c[1+2(2h/c)2/3-2(2h/c)4/5+...]
s = sqrt[4h2+c2/4]+[c2/(8h)]
ln[(2h+sqrt[4h2+c2/4])/(c/2)]
Some of the variables are described, like h and c, but what about ln ? I'm assuming it's a constant in the world of math ?
Length Of A String In Flash Script
I feel quite confident in Visual Basic. But When trying to determain the Length of a string in Flash Script, and then picking up the letters (not numbers), i have fallen short.
The Variables are "Table12" or "Chair2"
What i need is an algorithm that will pick up the Word "Table" out of the string. Or "Chair".
I see that there is a "Length" Object Action, which i can use to find the length for the amount of passes i make. But that is all i know how to do.
Can one of you please help me.
Kind regards
DogGoneIT
Calculate A String
Hi,
I have a string with a calculation in it "((20+10)/10)*100"
Is there anyway you can evaluate the string to get the actual answer of the calculation which would be 300?
Leah
String Manipulation : Pad A String.length
hi,
i have an array of track/artist titles
_level0.trkList = [object #218, class 'Array'] [
0:[object #219, class 'Object'] {
label:"Jeff Beck - Space for the Papa",
data:"spacepapa.mp3",
__ID__:0
},
1:[object #220, class 'Object'] {
label:"Jeff Beck - Another Place",
data:"anotherplace.mp3",
__ID__:1
},
i wish to add the array to a track info listbox component,
in such a way that the individual items in the array are
padded with spaces -" ", so as the length of the shortest
string equals the length of the longest string,
my listbox output is now -
Jeff Beck - Space for the Papa| * from time array
Jeff Beck - Another Place| * from time array
by adding spaces i would like it to be-
Jeff Beck - Space for the Papa| * from time array
Jeff Beck - Another Place"""""""| * from time array
does anyone know how to do this ?
many thanks for any help,
NEED INPUT STAT:calculation In A String - Then Eventually Calculate
Hi all... again,
// I HAVE to store this in a string.
var theproblem:String = "(Stage.height-aninstance._height)/2"
Eventually, I want to call that string and be able to calc it (to a number because it will end up to be an attribute value).
I tried loads of eval() and/or Number() combinations but all of them end up in NaN or undefined.
I really need some input on this.
Thanks all
String Length
Does anybody know the maximum length of a string? If there is one, are there any ways of getting around it?
String Length Limit?
I'm using remoting to connect to a server and request data. It works great with small result strings, and I've gotten one at a length of 65479. But anything bigger (my next result size is: 65882) and it craps out and just returns a single, seemingly random, character. It looks like another instance of the infamous 65k limit. Although, using a simple loop, I've created a 100k string. So I know Flash can handle it. Maybe it's just the remoting that can't. Is there a way around this? Anyone with ideas that might help?
Getting Xml Array.length Using A String
Hi all,
I'm trying to pull the length of an array using a string with a variable. If I replace the variable with the value of it, I get my number. However, if I just use the variable, I just get the string. Perhaps I need to convert the string somehow?
this.loadXML("XML_loads/options1.xml", "list1");
function loadXML(path:String, objName) {
this[objName] = new XML();
this[objName].ignoreWhite = true;
this[objName].onLoad = function(success:Boolean) {
// When the data arrives, pass it to the menu.
if (success) {
//trace("list1 = "+list1);
olength = objName+".firstChild.childNodes.length";
trace("olength = "+olength);
} else {
trace("xml failed to load");
}
};
//insert path to the xml file for the menu
this[objName].load(path);
}
String.length() & Mp3s
Hi,
Im building an mp3 player to be used with Flash Comm 1.5, and Im looking to display the time (current/total) of the mp3. I would also like to use this information to adance frames (ie: if current time = total time).
Im using the following code so far, I can get the mp3 to load and stream:
ActionScript Code:
#include "NetDebug.as"
stop();
connection_nc = new NetConnection();
connection_nc.connect("rtmp:/player/defstream");
A_ns = new NetStream(connection_nc);
speakers.attachAudio(A_ns);
A_ns.play("mp3:1");
Ive read I can obtain the mp3 length, in seconds, using the Stream.length() method but Ive also read this can only be used when streaming .flvs.
If someone could provide some further info/clarification I would greatly appreciate it.
thanks!
String.Length Methods
Hi all,
Im trying to make a movie clip detect a mouse hit, which I have done, but after the mouse has been hit, I want an object that has been made invisible to be placed into this area. The problem is that there are multiple instances of this clip. In theory one of the movie clips is selected then an object should be made visible.
I have been told that I could take a word length of the instance names of the movie symbol (which are all the same length) and use this in the IF statment in the movie clip.
Just wondered if anyone had any hints or tips, or places that I might find useful.
GetURL(' Limited String Length? ')
I'm throwing in a whole bunch of Javascript into a getURL() function:
var js = "a very long string of javascript...etc, etc";
getURL("Javascript:" + js);
And I'm reaching size limit where Flash just doesn't do anything with it any more. Has anyone else run into this problem? Know of any possible solutions? Thanks.
Kory
Array.sortOn(String.length)?
Very simple test to do the sortOn method using the length property of the strings, which doesn't seem to do anything.
this.words = ["abc","a","bc","ab"];
trace(this.words);
this.words.sortOn("length", Array.NUMERIC);
trace(this.words);
//TRACE REULTS
abc,a,bc,ab
abc,a,bc,ab
I found a couple of examples that use the y property of MovieClips to sortOn, which appear to work.
http://labs.bigspaceship.com/2007/10/16/array-sorting/
http://www.senocular.com/flash/tutorials/as3withflashcs3/?page=2
Any ideas?
String Length? (Textfield.htmlText)
I've done some research in Moock's Actionscript for Flash MX, but still running into issues.
I have text variables being passed into my flash movie that need to be in the same paragraph but can be one of 3 types: title, url, blank. Each one goes on a separate line.
My problem happens when I create the html string to be displayed. When I debug, the string cuts off right in the middle of a variable. Normally, if there was a problem with how I programmed the function, it would cut off before or after displaying the contents of the variable, but it cuts off right in the center of it. This happens around 250 characters into the string, which leads me to believe that something is limiting the length of the string????
Make the text string:
Code:
function makeText(){
for(i=1; i<=13; i++){ //13 is the number of lines available for display
if(_root["linksAkey_"+i] == 0){ //blank line
_root.Astring += '<BR>';
}else if(_root["linksAkey_"+i] == 1){ //title line
_root.Astring += '<FONT COLOR=#B5BD8E>';
_root.Astring += _root["linksAname_"+i];
_root.Astring += '</FONT><BR>';
}else if(_root["linksAkey_"+i] == 2){ //url line
_root.Astring += '<FONT COLOR=#FFFFFF><U><A HREF=http://';
_root.Astring += _root["linksAurl_"+i];
_root.Astring += '>';
_root.Astring += _root["linksAname_"+i];
_root.Astring += '</A></U></FONT><BR>';
}
}
}
Make the textbox and display _root.Astring:
Code:
this.createTextField("linksA", 10, 10, 162, 150, 209);
this.linksA.html = true;
this.linksA.htmlText = _root.Astring;
this.linksA.type = "dynamic";
this.linksA.embedFonts = true;
this.linksA.setTextFormat(_root.typewriter12);
this.linksA.multiline = true;
this.linksA.wordWrap = true;
How To Determine Length Of A String [renamed]
Sorry about that, but its obvious that while scanning a forum, the eye will be drawn to threads that are titled in caps and Ill hopefully hit the jackpot ....anyway, Im using variables pulled in from a .cfm, and have split them into an array using .split("|"), so I can dynamically populate a nav bar...so now Ive got an Array of all the menu button names stored in the file...SOOOoooo...Say Ive got a button called "Home", and the other "The Dysfunctional Properties of the Human Mind", obviously I need the duplicate buttons to scale in width. Is there a way of finding out the number of letters in a string that is part of my array?
To reposition my duplicate buttons I used this -
setProperty("cats_clip"+i, _x, xstart+i*_root.cats_clip._width);
To change the width I want to use this
setProperty("cats_clip"+i, _width, widthstart+i*((number of characters in current string*width of one letter)+a buffer to allow for space on the sides);
or something to that effect
So could anyone tell me what to use to replace the bit in red?
Length Of An Array With String Index
You can find the length of an array through the property length (e.g. arrayInstance.length)
But I realize that I cannot use this property if I specify the array index through strings
for example:
Code:
var arrayInstance = new Array();
arrayInstance["cat"] = "Garfield";
arrayInstance["dog"] = Jazzy Dog";
arrayInstance["mouse"] = "Mickey Mouse";
trace(arrayInstance.length) //returns 0 !!
String Length? (Textfield.htmlText)
I've done some research in Moock's Actionscript for Flash MX, but still running into issues.
I have text variables being passed into my flash movie that need to be in the same paragraph but can be one of 3 types: title, url, blank. Each one goes on a separate line.
My problem happens when I create the html string to be displayed. When I debug, the string cuts off right in the middle of a variable. Normally, if there was a problem with how I programmed the function, it would cut off before or after displaying the contents of the variable, but it cuts off right in the center of it. This happens around 250 characters into the string, which leads me to believe that something is limiting the length of the string????
Make the text string:
Code:
function makeText(){
for(i=1; i<=13; i++){ //13 is the number of lines available for display
if(_root["linksAkey_"+i] == 0){ //blank line
_root.Astring += '<BR>';
}else if(_root["linksAkey_"+i] == 1){ //title line
_root.Astring += '<FONT COLOR=#B5BD8E>';
_root.Astring += _root["linksAname_"+i];
_root.Astring += '</FONT><BR>';
}else if(_root["linksAkey_"+i] == 2){ //url line
_root.Astring += '<FONT COLOR=#FFFFFF><U><A HREF=http://';
_root.Astring += _root["linksAurl_"+i];
_root.Astring += '>';
_root.Astring += _root["linksAname_"+i];
_root.Astring += '</A></U></FONT><BR>';
}
}
}
Make the textbox and display _root.Astring:
Code:
this.createTextField("linksA", 10, 10, 162, 150, 209);
this.linksA.html = true;
this.linksA.htmlText = _root.Astring;
this.linksA.type = "dynamic";
this.linksA.embedFonts = true;
this.linksA.setTextFormat(_root.typewriter12);
this.linksA.multiline = true;
this.linksA.wordWrap = true;
How To Determine Length Of A String [renamed]
Sorry about that, but its obvious that while scanning a forum, the eye will be drawn to threads that are titled in caps and Ill hopefully hit the jackpot ....anyway, Im using variables pulled in from a .cfm, and have split them into an array using .split("|"), so I can dynamically populate a nav bar...so now Ive got an Array of all the menu button names stored in the file...SOOOoooo...Say Ive got a button called "Home", and the other "The Dysfunctional Properties of the Human Mind", obviously I need the duplicate buttons to scale in width. Is there a way of finding out the number of letters in a string that is part of my array?
To reposition my duplicate buttons I used this -
setProperty("cats_clip"+i, _x, xstart+i*_root.cats_clip._width);
To change the width I want to use this
setProperty("cats_clip"+i, _width, widthstart+i*((number of characters in current string*width of one letter)+a buffer to allow for space on the sides);
or something to that effect
So could anyone tell me what to use to replace the bit in red?
Convert String Length To Pixel Based Value?
Hi all,
I can obtain the number of characters in a string using the 'length' action script command.
However, I need to know the pixel width of this 'length' - is their some magic formula for this - or better still a conversion tool out their somewhere?
Any ideas?
MacLemming.
[CS3] Measure Data Length Of Query String
Hi there
I have a variable named formError which is applied to a dynamic text box which displays query string values.
I want to write some code which basically says:
if formError's data length is more than 0,
goto and play frame labelled 'register'.
is there any way of doing this?
Many thanks
Limiting Variable Text String Length
I have a Flash app that uses a lot of variable text. Due to the layout of the page, it is sometimes necessary to trucate certain strings. I know I could trucate the string at X number of characters, but that doesn't always work and you have to assume worst case-scenario to be sure it doesn't override anything. Is there a way to calculate the physical length of a string (number of pixels, for example) in order to maximize the available space for a string? I imagine I could determine the number of pixels for each letter in the alphabet and perform a calculation each time I populate the string, but I'm hoping there is an easier way.
Check String Length Server-side
Hi guys,
how do i check the string length server-side?
I am using the date object to gather the current date.
quote:
var d = new Date();
var mm = d.getMonth()+1;
var yy = d.getFullYear();
var dd = d.getDate();
month is returned as "2" which is correct
but i need to be able to check for a single char so that i can add a leading zero before it is submitted to the database. This is also required for day.
thanks
Paul
[FMX] Measuring Real Pixel Length Of String
Hi everyone!
I'd like to know a way to measure the real length of a text string in pixels. The problem is that every character has a different width.
The length property informs us of how many characters does the string have...but how do we measure the pixels (x space) in a precise way?
thanks!!!
Array Length, When Index Is String-based
Hi everyone
just a simple example:
var a = new Array()
a["apple"] = "red"
a["orange"] = "orange"
a["banana"] = "yellow"
trace(a.length) //returns 0
Why on earth does that happen? Anyone knows a way to get it work?
I should try something with for(var item in a)
[FMX] Measuring Real Pixel Length Of String
Hi everyone!
I'd like to know a way to measure the real length of a text string in pixels. The problem is that every character has a different width.
The length property informs us of how many characters does the string have...but how do we measure the pixels (x space) in a precise way?
thanks!!!
[F8] Dynamic Height Rescale (based On String.length)
Hi there...
Okay what I after is how to detect the length of the string populated from array...then auto rescale the height of the title_mc as shown in my AS as well as the dynamic created textfield ..so the textfield will display long string + "newline" for long string...(autowrapper)..
eg:
// for short text keep remain the standard size of height
mc.title_mc.tf.text = "short text";
//for long string it will expandable the title_mc.height as well...dynamically
mc.title_mc.tf.text = "standard width title_mc"+newline;
//by the time string move to newline the title_mc.height also will increase
so how to determines the long string and auto rescale the title_mc.height
here's the code currently I'm using...
Code:
stop();
var sometesttext:Array = new Array("super super super longggggggg textttttttt iiiiiiiii guesssssssssss","intermediate text","short text");
var len:Number = sometesttext.length;
this.createEmptyMovieClip("mc",this.getNextHighestDepth());
for(var i=0;i<len;i++){
var mc = mc.attachMovie("bubbles","bubbles"+i,mc.getNextHighestDepth());
mc._y = 50;
mc._x = 20+mc._width*i;
mc.ivar = i;
mc.title_mc.createTextField("tf",100,mc.title_mc._x,mc.title_mc._y,mc.title_mc._width,mc.title_mc._height);
mc.title_mc.wordWrap = true;
mc.title_mc.multiline = true;
////////////////////////////////////////////
mc.title_mc.tf.text = sometesttext[mc.ivar];
//******** this portion how to determines in order to display
short text and long text..
///////////////////////////////////////////
//setting txtfield format
myformat = new TextFormat();
myformat.color = 0xffffff;
mc.title_mc.tf.setTextFormat(myformat);
}
thanks in advanced
ExternalInterface.call String Parameter Length Limit?
Is there a String length limit to the amount of chars a String can contain when passed as a parameter to ExternalInterface.call()?
Also, are there any chars that ExternalInterface.call() cannot serialize in a string?? Like
, ...etc.
The livedocs don't answer these questions.
CreateTextField Setting Width Based On String Length
I wonder if there is a way to easily calculate how wide to make a textfield that you create dynamically with createTextField based on the length of a string that is passed as an argument. In other words, if you know the font size you plan on using, is there a way to figure out how many pixels you need? Thanks in advance to anyone who can offer some assistance.
Dynamic Height Rescale (based On String.length)
Hi there...
Okay what I after is how to detect the length of the string populated from array...then auto rescale the height of the title_mc as shown in my AS as well as the dynamic created textfield ..so the textfield will display long string + "newline" for long string...(autowrapper)..
eg:
// for short text keep remain the standard size of height
mc.title_mc.tf.text = "short text";
//for long string it will expandable the title_mc.height as well...dynamically
mc.title_mc.tf.text = "standard width title_mc"+newline;
//by the time string move to newline the title_mc.height also will increase
so how to determines the long string and auto rescale the title_mc.height
here's the code currently I'm using...
Code:
stop();
var sometesttext:Array = new Array("super super super longggggggg textttttttt iiiiiiiii guesssssssssss","intermediate text","short text");
var len:Number = sometesttext.length;
this.createEmptyMovieClip("mc",this.getNextHighestDepth());
for(var i=0;i<len;i++){
var mc = mc.attachMovie("bubbles","bubbles"+i,mc.getNextHighestDepth());
mc._y = 50;
mc._x = 20+mc._width*i;
mc.ivar = i;
mc.title_mc.createTextField("tf",100,mc.title_mc._x,mc.title_mc._y,mc.title_mc._width,mc.title_mc._height);
mc.title_mc.wordWrap = true;
mc.title_mc.multiline = true;
////////////////////////////////////////////
mc.title_mc.tf.text = sometesttext[mc.ivar];
//******** this portion how to determines in order to display
short text and long text..
////////////////////////////////////////////
//setting txtfield format
myformat = new TextFormat();
myformat.color = 0xffffff;
mc.title_mc.tf.setTextFormat(myformat);
}
thanks in advanced
String = String + If(string.length) ... + String
A few languages have an IIf() statement, which works like the if statement, but is good for use inside of strings.
Flash 8 apparently doesn't have it, but I tried something similar to this..
Code:
_global.mStruct.mString = "My first name is " +
mf.text + if(mi.text.length > 0) { ". My middle initial is " + mi.text} +
". My last name is " + ml.text + "."
And I get
"Operator '+' must be followed by an operand", referring to the red + above.
Is there a way to do this, or do I need to just break into seperate if statements and appending the value to the value of the textbox?
Thanks for any help.
Video Length Does Not Match Music Length
I want to have a 3 minute wav file loop infinitely over a 20 second flash video which also loops infinitely. The only way I have found to do this is to copy and paste the video so it repeats itself for 3 minutes, then the whole thing loops. Is there a way to run my 3 minute wav file in the background of my 20 second video conveniently?
Here is an example of what I have already made:
http://www.limdallion.com/Characters/Pyk/Pyk.shtml
Calculate With Flash
I want to make to textboxes so when I type in some numbers in one of them the other multiply it with for example 2. So I type 3 click on a button and get 6 in another box. What code do I have to use?
Using Flash To Calculate A Quote
HI guys,
IHope someone can help with this - I am creating a stand-alone form/app for my company that clients can use to order our products on. I need to get this form to give them a quote, depending on the choices they have made via the many drop down menu's etc
For example, we are a DVD duplication company and the client chooses how many DVD's they want duplicated, whether they want the DVD's printed- all this would add to the cost.
Sorry for being vague here but I hope someone out there gets what I am on about!
Thanks in advance!
Mp3 Sound Length And Played Length
hey i have an mp3 players, is a lot of code so im not going to post it all at.
but what i want is something to tell me the length of the sound and the current playing time..
well i will post this much of the code that i made i just don't know how to turn it into minutes and seconds.
Code:
private function onEnterFrame(event:Event):void
{
// this is the total estimated time
estimatedTotal = Math.ceil(snd.length / (snd.bytesLoaded / snd.bytesTotal));
// this is how much the sound played in %
position = Math.round(100 * (sc.position / e));
// i was just testing with aprogress bar
run.setProgress(p, 100);
}
so how i turned this code that works into minutes and seconds.
Mp3 Length Don't Match Timeline Length
I got myself a simple setup - an animation playing against an audio track. I've used 'use imported mp3 quality' in the export dialogue box. I've got a root timeline of 814 frames long. At 25 fps this gives me a timeline length of 32.5 seconds - this should be the same length as the mp3.
however the mp3 finishes about 5 seconds before the timeline?
How are you meant to sync audio to animation if there is that much discrepency? I haven't got anything processor intensive on the timeline.
Calculate Time User Has Been Viewing Flash Movie
Hi! I am needing to do something similar to what you see here:
http://www.comcast.com/corporate/exp...dinternet.html
*Click on "Pure Broadband Speed" > "Way Faster than DSL"
*Then click on "Where the Rubber meets the road"
I need to know how they are calculating the time the user has been viewing the flash file and once it has caught up, have a running counter while they stay on that "page". Can anyone help me out with that?
Thanks
aswhitehead
What's The Best Way To Parse Out A Url String Using The String Object In Flash
I'm creating a CMS(Content Management System) tool so that users can change text and the changes be reflected in a text window in flash . The text that the user enters in the CMS tool will be stored in the database.
In flash I want to parse the string that I get from the database and look for URL strings that start with http "http://www.someurl.com" and parse out that substring.
For example the string could be "Please vist my site at http://www.site.com". I would want to parse out the http://www.site.com
If I find this url string I want to pre-pend the a href tag <a> and append the closing </a> tag to the string so that this link will be clickable from the textfield.
Does flash have an object that deals with Regular Expressions?
I've looked at the String object in flash but not sure how to achieve this task
I'm currently working on this so any ideas?
What's The Best Way To Parse Out A Url String Using The String Object In Flash
I'm creating a CMS(Content Management System) tool so that users can change text and the changes be reflected in a text window in flash . The text that the user enters in the CMS tool will be stored in the database.
In flash I want to parse the string that I get from the database and look for URL strings that start with http "http://www.someurl.com" and parse out that substring.
For example the string could be "Please vist my site at http://www.site.com". I would want to parse out the http://www.site.com
If I find this url string I want to pre-pend the a href tag <a> and append the closing </a> tag to the string so that this link will be clickable from the textfield.
Does flash have an object that deals with Regular Expressions?
I've looked at the String object in flash but not sure how to achieve this task
I'm currently working on this so any ideas?
URL Length In Flash 8 ...HELP
Hi guys,
I'm wondering if Flash 8 limits the URL length that you can use in the link field of the properties panel?
I have a client who has sent me a massive 155char intranet link and I can only paste in 132char of that URL so when loading the swf it only loads 3/4 of the URL into a browser.
Can anyone help?
Thanks to any suggestions.
Regards,
Nick.
Flash Download Length Question
I downloaded macromedia flash yesterday, and have a question to ask. I saw an intro on a website, and was wondering how it could be downloaded so fast? I built my first flash movie, but it takes way too long to load. So long in fact, that I gave up on it while I was waiting. I don't really know much of anything yet about flash, but I do know that it only took me about a minute to download the wav file I was using. So, I know that's not the reason it takes so long to load... Also, the movie is only around 50 frames long... which isn't too long. It's much shorter than many other flash movies I've seen that download in far less time. Maybe I'm just uploading it to my site wrong, but I have no idea. Any tips or help on this matter would be greatlly apreciated. If you don't have the time to answer, then a link to a flash faq would be cool.
thanks
Flash Movie Length Limits
Hello Board,
I am creating a movie that needs to be about 30 Minutes long with a fps of 15. I know there is a limit to the # of frames per movie (14999). Can you create multiple scenes with 14999 frames each which would result in a much longer movie?
Also, the final project will be an .exe file and not .swf so I cant link the different movie clips.
Thanks!
Dustie
|