Use 40 FPS Or Higher?
Nov 14, 2009I dont understand why a simple vector mc TWEEN ANIMATION isnt smooth.Here is an example. I use 30 FPS and I dont want to use 40 FPS or higher.
View 1 RepliesI dont understand why a simple vector mc TWEEN ANIMATION isnt smooth.Here is an example. I use 30 FPS and I dont want to use 40 FPS or higher.
View 1 RepliesI have table named "highscore" like this:
nameQL scoreQL
piotr 50
And flash game with NAME and SCORE exported to PHP with this names.How to make this in PHP file:
IF (NAME exists in database (nameQL)AND SCORE> this.name.scoreQL){Raplace scoreQL with SCORE WHERE nameQL=NAME}
IF (NAME doesn't exists){Create new row with NAME and SCORE)
I'm working on a project conversion from AS2 to AS3.
In AS2, I used a mainMenu file and loaded a Navigation file at _level 999 (very top). Then I loaded and unloaded different modules on _level 5.I also loaded and unloaded an external Glossary file on _level 95.Now in AS3 I am using AddChildAt(1) for the Naviation file and AddChildAt(.1) and removeChildAt(.1) for the module files. The Glossary file only seems to work at Child Index 1, so I'm guessing it pushes the Navigation file to a higher index. Is there a reference that explains the Index properties of the Child and why sometimes I get an error when I try to add a Child of Index 2 or higher?
I have a movieclip with a prefilled content (some simple vector graphic in a movieclip), with the height of 40. I then apply a mask to it, with the height of 30. Now i would think that the MovieClip is 30 pixel high, but it turns out to be 40 pixel high. Is there some property im not setting or does the movieclip always assume the height of ALL the content within it? or what?
Actually in another clip, too, I have predefined 2 vector graphics (in two seperate movieclips), where the highest one is applied as a mask to the second graphic. The movieclip again assumes the height of the highest element. That might be logical, as it is the mask, BUT! when i then resize my mask (programatically) the height of the movieclip remains the same.Is there some way to recalculate the height of a movie clip? Or am I missing something?
I would like the volumen to be higher than 0 when the swf is loaded, so that music can be heard without the need of dragging the volume...I've tried to set the dragger in the middle of the slider but still the actual sound is 0 at start.
The code is as follows:
this.ratio = 0;
dragger.onPress = function() {
[code]....
If I have 2 movieclips, how can I know through actionscript which one is at a higher level?
View 2 RepliesI'm trying to make a script that listens to a variable (int or Number) and then does certain functions whether the variable is going higher or lower. So for example if the number gets higher, it runs one function. If it gets lower, it runs another.
View 3 Repliesyou know any reason why a function won't accept any number higher than 4? This is all I'm doing. Works for 0-4, but once I hit 5 or higher, I get "A term is undefined and has no properties." But if I just put the number 5 in there, it all works just fine, so it's not an issue with the xml.. for some reason the function just won't accept anything higher than 4. weirding me out..... I can't see an explanation for it.
[Code].....
In Flex, I am using graphics.codec.JPEGEncoder to save image files that are edited inside application (normal manipulations like brightness etc.) I am able to save files perfectly. What I want to know is that is there any way I can save the image with a better dpi? Say, for instance the image that is loaded and manipulated was originally of 72dpi, now can I save it with a dpi of 150 or 300 ? If so, how to do it.
Doesn't have to be using the JPEGEncoder, if there's any way to do it at all, like using any library etc, I am okay with it.
Note: If it matters, I am using Bitmapdata to store the image and manipulations and saving the image with JPEGEncoder by supplying it's data as bytearray like below.
var imageBytes:ByteArray = encoder.encode(myBitmapData);
I compile a SWF with ANT using FDT. In the compiler arguments I am setting default-frame-rate to 30. When I run the SWF, the stage.framerate property is 30 (which is correct), but as the Stats util from mrdoob shows, the SWF runs way faster up to 52 fps.So it seems the compiler argument default-frame-rate is applied, still the events are fired at a higher rate.[code]
View 1 RepliesIs there anyway of using AS to check if a number is either higher than a certain value, or closer to a certain value. The purpose, if the number in the text box is either higher than the other text box, or closer to say, 500, than the other one, then, it displays something in a dynamic text box.
View 3 RepliesI'm working on a medical imaging application and was wondering if there is a way to display 12-bit per pixel JPEGs in flash/as3? I'm assuming I'll have to convert the image into a more flash friendly format, but was hoping to avoid that as keeping the original quality of the image is vital.
View 3 Repliesok qiuck 1 how do make the random number generator start making as exaplme random numbers between 2 and 4. so it would select2,3,4 but o1 hope that makes sense
onEnterFrame = function(){
maths = Math.floor(Math.random() * 4);
trace(maths);
[code]....
I'm designing a site at the moment & I've run into a minor snag. I am loading about five external swf's, for each page of the site, from the main 'home' page. you can view it here Trouble with levels. I can load the movies fine, but what I want is to load each new movie into a higher level than the last, as each movie appears with a mask (for an example have a look at the site I've done then click on the 'Contact Us' button - that is what I want to do on all of the pages...) all of the swf's are loaded into level one with the exception of the 'Contact Us' page. (By the way, there is no 'News' page yet)
The very simple code I used to load the movies is:
Code:
on (release) {
loadMovieNum("contact.swf", 2);
}
Am just a begineer with Actionscript but am picking up quite quickly. I been racking my brains and can't seem to find a solution. Basiaclly I've got 5 movieclips on the stage which are draggable. How can i get a message to appear in a text box if the first movieclip is moved higher than the second movie clip?
View 4 RepliesI've just switched over to AS3, and I'm completely stumped with something.
I'm working on a project where I keep adding children to a MC already on the screen. There are two types of these children: Sprites that I use to draw lines using moveTo, lineTo, ect. Then there's sprites that have children inside of THEM that are bitmaps.
For some strange reason, the Sprites with the bitmaps on them always have a higher depth/index (AS3 terminology is still weird for me) than the normal Sprites.
Here's a diagram of my MC/children/children layers:
---------------=> (Sprites that draw lines)
(MC on Stage) =>
---------------=> (Sprites that hold bitmaps) => (Bitmap)
I'm working on a medical imaging application and was wondering if there is a way to display 12-bit per pixel JPEGs in flash/as3? I'm assuming I'll have to convert the image into a more flash friendly format, but was hoping to avoid that as keeping the original quality of the image is vital.
View 1 RepliesI've got a button that, when clicked, needs to play a frame. Normally I'd just use the gotoAndPlay feature, but the frame I want to play is on a higher level than the button. That is to say that the button is inside of a few movie clips but the frame I want to point to is just in the main scene, not inside of movie clips
View 1 RepliesIn flash, I use lineTo to draw a line between two points. This is working well, but I'm finding that on slower computers, the line is jagged because not as many mouse events are firing.I want to 'smooth' the line out, to add more points in between each point that the mouse registers:
The black lines show the result, the green ones are what I want. The red dots are actual points, and the green ones are interpolated.I have tried to code this myself but I can't seem to get it right, here is the code anyway:
var interX:Number = lastMouseX+(lastMouseSpeed.x/2);
var interY:Number = lastMouseY+(lastMouseSpeed.y/2);
//Also tried: lastMouseX+(this.mouseX-lastMouseX)/2;
// also jittery
[code]....
the result is much more jagged than the normal one.
I wrote this 9ball game a while back (never really finished it), and was showing it to a friend today. When a pool ball is rolling fast, less of it's mass should be touching the felt, therefore, less friction. As it slows down, there should be more contact with the felt, and therefore, more friction. Any realistic algorithm to use to adjust the friction higher as the balls slow down? [URL]
View 11 RepliesI'm sort of re-discovering Flash. As such, I'm a bit rusty with all the ActionScript and general techniques. I have a site that loads swfs on higher levels with loadMovieNum (i.e., a pop-up photo gallery). The only problem lies in lower level buttons still remaining active; apart from the aesthetic issue, I don't want the user to be able to "accidentally" click something on level0. Is there a general method for keeping the "focus" on the highest level, or making any interactive elements below inactive?
View 4 RepliesI've got a 3D tween I would like to apply a mask to but am having a difficult time doing so. I'm guessing this is as a result of the tween that is happening on the Z-axis..?if this is the case then setting a mask movie clip to one increment higher on the Z-axis and setting the mask MC's layer to Mask should work; it's not, however.
View 2 Replieshow to deal with unsorted arrays to get the next higher or next smaller value?
var _myArray:Array = (1,pizza,2,6,8,test,11,16,17,cola)
_myArray.splice(4,1) // > remove number 8 !
trace(_myArray) // > array contains now: (1,pizza,2,6,test,11,16,17,cola)
how can i get the next higher value (= 11) ?
I'm making a flash game and I've come to a halt in my code. This is how the game works: Where ever the mouse is clicked, the player will run towards thats spot. It's on a field. The problem is, I want the player's size to decrease as he gets higher up on the field(as the y gets closer to 0), giving the illusion of depth. But for the life of me I cant get it working! Im quite new to AS3 so im not sure about all it's tricks, but here was my go at it.
[Code]...
When I run the code, my character's size stays the same when I go up and down, but goes all wobbly when i go at angles without any real order. Clearly it's not working.
I defined an array construct and assigned two variables to part of the array so I can simple sort it:
number1 = array[i]
number2 = array[i+1]
if(number1 > number2){
...swap etc
Problem is, when I try the comparason if the one of the numbers has a higher digit value, it ignores the statement entirely. Eg If 16 > 8 it skips it. So I tried adding '16' and '08' into the array and that worked perfectly with the statement.
Assuming 3 movieclips A, B, C where they are nested in this manner: A > B > C I'm using the following line MovieClip(parent.parent).support = false; (in C). I'm attempting to change a boolean value in A. This is the error I'm getting: ReferenceError: Error #1056: Cannot create property support on A. at A_fla::anim_content_45/frame60()
View 8 RepliesI wrote it through the equation (n, k) = n!/(k!(n-k)!).But I found it will loose precision quickly after 12th row.So I change the way. I tried to use the properties of triangle(each row is the sum of previous row)Than I get slow in running when function reach higher degree.
I just keep changing a little and a little... try to make it run faster.
Quote:Function binCoef(70) :
1,70,2415,54740,916895,12103014,131115985,11987747 [code]..
My Stage size is 126*62. (it's a small animation).- When I publish the .SWF, no problem.- When I publish a projector .EXE file for windows, then, the width is still correct, but the height is higher than 62 : I got two small white bands beside top and bottom of my stage,see ?I don't understand why there's such a difference between publishing a SWF or EXE. And I'm afraid this also happens whatever the Stage size is (small or big, I mean) : you always get these blank bands on the top and the bottom, don't you ?
View 1 RepliesI've gotten pretty far with my file. I have successfully been able to load higher resolution tiles when a user either draws a box of an appropriate size (area 50-100% of total loads low quality tiles, 25-50% of total loads medium tiles, 0-25% loads high quality tiles). The tiles also load correctly when the slider on the zoom tool is pushed up and down. Here is my problem:
1) I can't figure out how to call the SetScale function (defined on the slider MC) so that when the user draws a box on the main map it zooms into that scale (see the functions half way down the AS layer on the main timeline where the calcArea is calculated).
[Code]...
i am puttin together a calendar in flash, as it is ending up on a windows server in ASP, so the lovely PHP calendars wont work. I have been using the code from:[url]to get the months and days working, and have todays date highlighted. Now i need to work out a way that i can set this up to call a flash movie onto a higher level which contains the events of the day you click on. Such as: Because the dates are determined and inserted via AS, im not sure how to set this up, or if it is even possible...
[Code]...