ActionScript 3.0 :: Display Nice Looking Math Formulas
Sep 25, 2010
Does any one know of an actionscript function or class to convert strings representing math equations (like: "integral(e^(1/2), a, b)" ) into nicely formatted formulas, for display purposes (using the integral glyph, etc..) ?
Purpose: I need to display nice looking math formulas that have been entered as strings (without special characters) in an xml file.
Okay, my preloader has some code in it to display the percentage of a 6 MB movie and I want to display the proper file size such as 6.53MB instead of 6987362892 Bytes. Here is what i have so far and it's not working. [AS]percent.text = Math.round((getBytesLoaded()/getBytesTotal()) * 100) + '% of ' + Math.round(getBytesTotal())/1024 + 'kb';[/AS] The red code is where I'm having my problems.
My preloader has some code in it to display the percentage of a 6 MB movie and I want to display the proper file size such as 6.53MB instead of 6987362892 Bytes. Here is what i have so far and it's not working.[code]...
I'm making a game based on pong. At the start of a round, the ball will go in a random direction and when the ball hits a paddle the ball will move in a certain direction depending where it hit the paddle. The more centralized the hit is, the more straight the bounce is. Here's the tricky bit: the ball may hit either a vertical or horizontal paddle and I want the xspeed(horizontal movement) or yspeed(vertical movement) of the ball to increase/decrease in proportion to the opposite speed while keeping the same general speed of the ball(it can decrease and increase). Here's an example(you might want to get a pen/pencil and a piece of paper):
Let's say the ball is moving at 45 degrees(so it's going downward right) and hits a horizontal paddle smack dab in the middle, thus it goes at 270 degrees(straight up). So, at first the xspeed and yspeed are both the same, then the xspeed is zero and the yspeed is at the max(to the general speed).However, let's say that the ball hits the same paddle but at the edge(either edge will do the same) thus making the ball go at a near 360 degree angle, making the xspeed near max and yspeed almost zero. Like I said, I want the two speeds to increase/decrease in proportion to the general speed, this is so that xspeed or the yspeed don't exceed the general speed.
I'm trying to decompile a .swf doc and extract the formulas embedded in it, in order to create a .xls document with the same formulas and creating the same charts shown in the .swf. I can't manage I will forward the .xls.
var p:int = 0; var n:Number = 0; n = 32.999999999999999; p = Math.floor(n); trace(p); // returns 33 n = 32.11111111111111; p = Math.floor(n); trace(p); // returns 32
I would expect both of these to return 32. I have searched, and it seems this is an unreported bug in AS3. Or ... am I doing something wrong?
I have a code in which I have to use Math.round if a certain value is for example 3.67 (67 is higher than 50) and Math.ceil if a value is for example 3.23 (23 is lower than 50). What can I do to make flash calculate if what after the dot �.� in 3.23 (for example) is higher than 50?
Like every other time I've had the displeasure of having to work with Flash, I feel like the best rule is to have a good bottle of whiskey on the side. I'm getting into CS5 and have a really complicated question here: how do I get this program to let me see what it is I'm actually working on? You know, the main point of being in here? I can't find a solution in any of the drop menus, have been in and out of the various workspaces, and in each instance I get everything except the most important element, which is the stage. Where the hell has Adobe hidden this thing now? It was here a half hour ago and has disappeared.
url...how to make such this preloader...i mean a circular animated boxes positioning into border preloader based on percentage..u guy's know what I mean..hope someone can point me to achieve this type of preloader.
Have a web page designed in AS2. Made some nice new XML gallery wth pop-up window. Is it possible to combine these 2 swf files externaly ie load gall on web page?
Just wondering if blurX and blurY works with the classes lee was talking about in the tweener movie? (the caurina classes) If not how can I get a nice blur effect on my tween objects?
I am trying to develop some kind of nice linear animation that is kinda random but nice and organic in shape or just linear. Ok that doesn't make much sense. The outcome should be somewhere close to this : [URL]
What AS should I use to make an object wich is a movie clip appear into the stage? I have this action: on(release){ something._x = -1000; something._y = -1000; } But using it the object just appear, from nothing and I want it to appear from a initial position....
or some variation thereof. I understand that the function first finds the maximum value of two values then turns around and uses that to find the minimum between two values.why this is done? And how do you know when to use it?
So here is a piece of code that I have seen used a lot but don't really quite understand:[code]or some variation thereof. I understand that the function first finds the maximum value of two values then turns around and uses that to find the minimum between two values.And how do you know when to use it?
I've just started learning as3 and I've been trying to find a good tutorial on dropdown menu's using just xml and as3. Most of what I've come across so far are either static menus or menus driven with heavy use of the timeline. Is it even possible to build a nice fluid drop down menu completely in code?
I've only used flash for 5 months now. As you expect, i'm a super novice. I've been trying to follow the books, tutorials i fould on web and was able to make some nice animations,buttons and stuff. But i'm not a programmer, i never been one and i just don't think i got the brains for it. I just know a little bit. Like i said, it's only been 5 months so i only know how to change other's script to suit mine, i can't create any complicated from top of my head. My question is...do I HAVE TO be an expert to make websites with Flash? After all, i'm only learning Flash so I can make interactive websites. I'm not looking forward to making games or drawing boards or anything. Just websites. How much knowledge of Actionscript(or XML) would I need to make a flash only website?
I am trying to figure out how to proceed. Obviously this is a christmas project. The user will be presented with a text input to see whether their name is on the Naughty or Nice list at the North Pole. I would like to randomize which list the users name appears on. And perhaps give them an option to redeem themselves, by doing something "nice" if their name shows up on the naughty list.
i have a background that resizes with the window (without stretching) and my image has a nice resolution. But when i resize it, it seems low in quality.
So I can tween shapes and such for their colours, but when I try to colour tween text, it won't work. I've tried various things, motion tween, shape tween, making them movie clips, making them graphics, ect. How do I make text tween between colours to get a nice smooth transition?
Im animating an around in 3d space with papervision and Id like to make the curves of the animation nice and smooth, if I put random values into the xyz and bezier values the turns are quite weird and erratic. Does anyone know of a way I can animate something around in smooth curves, but not have to create specific values for the tween?
I save my (embedded) fonts in an external file (fonts.swf) that gets loaded at runtime. Pretty standard. I also use a bunch of UI artwork generated in the Flash IDE. Some of this artwork contains static textfields (thus, not proper TextFields that can change. Just frozen glyphs). Here's the problem: if I use the same font in any static textfield and then embed that same font into my collection of runtime fonts, the runtime font will refuse to render. It's the same effect you get if you set a textfield with embeddedFonts=true to use a font that isn't embedded. If I change the static textfields to use a different font, the runtime fonts work just fine.