So I understand that, to get frame rate independent movement I have to multiply the base speed by (1000/delta). It works on values that represent speed, but when I try this with an acceleration variable, e.g. gravity, it won't work, it isn't even frame rate independent. Is there a different formula for acceleration variables, or am I forgetting something else?
I hope that this topic hasn't been discussed ad nauseum; I searched the forums for similar discussion threads to no avail. I completed the Flash MX object movement tutorial found at [URL].I then wanted to add a second instance of the beetle symbol to the stage and assign it both a new instance name and a different set of keyboard keys that would control its movement.
When I test the movie, I am able to control each symbol instance with its assigned keys. (The instances move and rotate as they should.) However, when the first instance rotates and moves to the right, the second instance "slides" with it. That is, the second instance's assigned keys have not been pressed and it doesn't rotate, but it moves right in unison with the other instance.
I searched the forums for similar discussion threads to no avail.I completed the Flash MX object movement tutorial found atI then wanted to add a second instance of the beetle symbol to the stage and assign it both a new instance name and a different set of keyboard keys that would control its movement.When I test the movie, I am able to control each symbol instance with its assigned keys. (The instances move and rotate as they should.) However, when the first instance rotates and moves to the right, the second instance "slides" with it. That is, the second instance's assigned keys have not been pressed and it doesn't rotate, but it moves right in unison with the other instance.
The shared object "SuperMonsterSOL" should be written to the hard drive, right?
1. Do I need to have the remoting components installed to use SharedObject? Neither SharedObject or getLocal change colors to let me know Flash is on my side...
2. When does the file get written to the hard drive? When I test it? Must I view it through a browser for the ActionScript to work it's magic?
I've been playing with carousel code, and was wondering how to change it from circular animation (carousel) to left/right linear (conveyer belt) style animation, how to change the mover code and 't.angle = i * ((Math.PI*2)/numOfItems);'
I am finding this quite difficult to explain, but I will try my best I currently have this code, which I will explain afterwards
var myMovieClip = new contact_mc(); var myMovieClip2 = new aboutUs_mc(); var myMovieClip3 = new Join(); var myMovieClip4 = new ourWork_mc();
[code]....
See an ideal thing would be having the URLRequest for both swf's at the top of the page, and container_mc.addChild(myLoader); within the functions. I read somewhere that the loader needs to be added straight away otherwise there will be issues with stage references or something.
I want a website to have two independently embedded swf files, the reason being: I want one anchored to the center, and the other anchored to the left side. However, I still want information to be communicated between the two. How could I do this?
I have a mc (fStrip) which looks like a piece of filmstrip with thumbnail images in it. I want this mc to move when the users mouse is positioned over it, but I only want it to move only along it's x-axis and in a direction opposite that of the mouse. And I want it to move or flow smoothly.
I've been trying to figure this out (see my lame attempt below) but without much luck.
onClipEvent (mouseMove) { buffer=20 //movement buffer mousePos=_root.fStrip._xmouse //store mouse position if (mymouse!=_root.fStrip._xmouse){ //if the mouse has moved
I wish to get the effect of ants scuttering across the screen or up a tree, I have not decided which direction yet. I started with the tutorial code for the snow effect from kirupa, and changed it around to fit the little vector ant I created. The way I have it now looks pretty good, but the movement is a little too fluid. They obviously move in sinusoidal paths bc the code tells them to. I have about 20 copies of the main obj, and they're all a little different in size and specs (speed, transparency, etc) but what I was wondering was if there is any way I can change the code to make it a little more hectic, or erratic, not so fluid. If there is no way of doing so, it looks pretty good right now. If there is, however, I think it could look awesome. here's the code I'm using for the object.
Basically I want to have a scrollable map ie. you can grab it with your mouse and move it. Exactly the way google maps works (although I'm not terribly concerned about the inertia effect that google maps has). But I also want to have objects on the map, that when the map is moved, they also move, but I can grab them individually also, and move the objects. Obviously when I nest these objects in the background symbol, they lose their independence and therefore can't be moved separately from the map. And I've been having difficulty making the objects follow the map, while maintaining their own position (they just snap to the maps position).
Currently i m working on a loader.... i want to use this loader on different-different project but every fla file have different frame rate.In that case the animation of the loader is not looking so good.
Now, my problem is that when I move my mouse over one of the object, the other object also reacts. Say I roll my mouse over text2, text1 reacts as if the object too has a mouse over it. Another problem is that only text2 is showing the tween class.
I want these two instances to be independent from each other while at the same time not having to create actionscripts that is exclusively dedicated to each instances (if possible). I want to make sure that if I have the mouse over one of the instance, it will be the only instance to react.
What I want to do is to let each of those three image windows to rotate a set of separate images independently of each other using actionscript.In other words, the image window on the left will be rotating about 5 to 10 images while the image in the middle will do the same but with a different set of images and the same for the image window on the right
I'm trying to control the volume of an flv in a video player I'm making. I want it's volume control to be independent of any other content on the page. The Video object is in a Component if that makes any difference.
I am able to adjust the volume of the root (aka MovieClip(this.parent).soundTransform ) but I cannot do it to the component itself.
I have tried applying the SoundTransform to the component itself (which is not a MovieClip I know), I have tried placing the Video object in a MovieClip inside the component and attempted to adjust the volume that way with no success...(obviously there's a lot more code than this)
Code: _videoDisplay = new Video(); _videoVolume = new SoundTransform(0); // just using 0 so I can tell when it works this.soundTransform = _videoVolume; // *this refering to the component
Is there a way in AS2 to stop a child movie clip taking on the parents alpha value? I want the parent movie clip's alpha to change on rollover but not the movieclip I am attaching from library via linkage.
Is there a command out there that stops this parent/child inheritance?
I checked this link Flex Cross Resolution Applications and it did Infact,the display varies from browser to browser, (for eg. chrome vs ie8) Chrome has bigger browser window. How to develop flex applications in this case ? I am using values in percentages.However,panel which displays properly in IE8, appears big in chrome with text and buttons having same size. How to solve this problem
With the Flash IDE, I must create an AIR project for Android mobile devices (NOT tablets): my problem is that I would like to make it resolution-independent. Android-equipped mobile devices are many and they may have different screen dimensions.
So, first of all, I would like to know if I must choose a particular stage dimension in my Flash project. Secondly, I would like to know how to adapt the content to the screen resolution and if it has any drawbacks (stretching, etc.) that can damage the appearance of the app.
We are creating a system where elements in a display unit are defined through xml. This also means that the whole system is dynamic in nature. [code]...
Is it possible to call an independent function from a switch case?
I'm using an instance of the slider component to trigger a variable function via the switch statement.. The compiler throws an error, incorrect number or arguments.[code]...
I'm sure it's been posted about a million times before but I've been trying vars searches and seem to always be coming up with answers to do with the exact opposite of what I'm trying to achieve! I'm creating a flash Movie that is 800 x 600 pixels in size and I'd like to fix that size so that it will always be 800 x 600 regardless of the screen resolution of the computer running it. At the moment it seems to scale by default and is winding up looking ugly on other people's computers.
I am making button pieces for use in my GUI factory. I am having an issue placing my Thumbnail graphic w/Mask and border. The mask is not moving away from 0,0 when the Thumbnail is moved to 280,10.I can force it to 280,10. I will be multiples of this and other button in a scrolling menu with it own mask in a container.I am trying to build in a work-a-round for this feature.Here's the primary part of Thumbnail class:
public function Thumbnail() {// constructor code makeThumbnail();cHolder.mask = picMask;[code].......
I have a 2D side scrolling game (made with ActionScript 3) that runs at 60 frames per second. I'm trying to make it frame rate independent so it will run on slower devices.
To do this I create a var called timeElapsed by calculating how many milliseconds have passed between each frame and dividing that by 16 (60 fps is about 16ms, I think.) So that at 60 fps the result would be about 1. Then I times any time related vars by this number (e.g player.x = speed * timeElapsed;) This is the code:
private var oldTime :Number; private var defaultFrameRate :uint = 16; // the default frame rate in milliseconds private var timeElapsed :Number;
[Code]....
As you can see, at 30 frames per second the player is moved further in the same amount of real time. What seems to be the issue is that, at 30fps in frame one, my current code doesn't account for the slight difference in speed between frame one and two at 60fps. I thought of getting the average value of speed between any two frames at 60fps and using that to calculate a more accurate value when the frame rate changes but I got the feeling wouldn't work correctly in some other situations since at 60fps for example, it would move the player by 115 and not 110 pixels.
Is their any way to accurately simulate an object accelerating in a way that is frame rate independent?
I've been trying to write a class that will automatically draw shapes on the stage each time it's instantiated.
The problem is that I can't find a way to do this without having an unbroken hierarchy of classes extending Sprite all the way back to the main class.[code]...