ActionScript 2.0 :: Figure Out The Mini Putt Logic?
Apr 11, 2006
I am trying to figure out the mini putt logic.. I understand that you give an angle and force then hit the ball. Now, once it hits a border, is it : the straight angle of the border minus ou plus (depending on the side) the angle of the ball that gives us the bounce angle? Any tips/formulas welcome
Is there anyway of changing an integer of 100, into a 1, 0 and another 0?In context, I've got game with a score. Every time you pick up a coin, it adds 10 to the score, there's 20 coins (so a max score of 200 possible). I've got numbers 0-9 as seperate images. The score currently is a single three digit integer, and I need it to be represented as three single digit integers so I can assign those to an image.
I brought my son a mini laptop for xmas that runs Windows CE , some of the websites he wants to go onto require "flash" , but when I try to install flash laptop says its not a valid Windows CE file.
Is it right that I need to install "flash lite" if so what version and where can I obtain it as I cant find download link on this site. If not is there any other way I can get these websites to work.
I am using a mini MP3 player to play an MP3 file. It is working fine, but I need to play the MP3 file in a loop. I have added a variable loop and set it to true but it still doesn't loop.
<script type="text/javascript"> var so = new SWFObject("player.swf", "mp3player", "0", "0", "8", "#ffffff"); so.addVariable("file", "1-05_Concert_ alla_rustica.mp3"); so.addVariable("loop","true"); so.write("flashcontent"); </script>
Underneath the playing video (of a building) I have an image of the floor plans of the building.When the video .flv file is clicked, i want a "red dot" or some sort of pointer that will move, or appear on the area of the floor plans, in comparason to which video is being played when clicked. - something that runs like a mini map inside a game, where it shows the user where they are in relation to their environment
Or if there isn't any, does anyone have source code or thoery on how to make a diagonal wall for an object to bounce off of? I have ideas, but I'm not sure if they are as efficient as some other ideas may be.
Basically i have a mini map and i want to check what a mini map tile is playing at. so i tried to trace it, thinking that the error i get was only because the tile was not yet instantiated i made the following function appear after 1 second to be safe.
[AS] function startGame(e:Event) { trace(getChildByName("tile1").currentFrame); }[/AS]
Still get the following error.
1119: Access of possibly undefined property currentFrame through a reference with static type flash.displayisplayObject.
I placed .x (just a test value) instead of .currentFrame and i receive no error.
I guess .currentFrame checks for the MovieClips timeline during compilation?
I am looking to build an app that allows end users to draw and save mini animations (simple predetermined shapes that move in 2D). So far I have a written a app that allows the user to draw a single frame using simple shapes and lines, but I am having some small troubles at this stage, and have not attempted to allow the user to animate or save the drawing.
If anyone knows of a tutorial or some other resource to put me on the right path I would be very grateful. I can also share what I have if anyone would be willing to give me some pointers
I would like to create a panning tool similar to the attached. I looking for something very simple, I would like to be able to scroll the large image from left to right using a smaller inset browser.
i having troublesome with the flash map.Actually i am doing the project which is multi-agent system (agents behave like human react in the map and have behavior just like human). i am one of the members of this project, i responsible for the mini map and i am using flash to do map. I have seen the examples of Pacman flash game and racing flash game(they used action script 2.0). i got the ideas after watched their coding.can i set the movement using matrices??
Currently I am trying to create a mini map which i can populate with the contents of an array.I can make any size grid with little to no trouble in AS3, for arguments sake I have been trying to get a 4x4 Grid populated.I can even make listeners inside the new class but i cannot figure out a way to give each new MiniMap tile a unique identifier like i would of in AS2 and then assign the current frame to play.I have looked around and tried a few tutorials with no success.I have been using this to create the tiles (inside two for loops to make the grid)
Code: var MiniMap:MiniMapTile = new MiniMapTile(); addChild(MiniMap);
Here is how i did it in AS2 for anyone Interested.
Code: _root.MapTile.duplicateMovieClip("Tile" add i, i);
Edit: I have done it the long way :/ made 12 separate objects. Incredibly convoluted.
Im trying to get my Swf File to Load My Flash Mini Button Site this is mY code...fscommand("SHELLOPEN" , "C://WINDOWS.DESKTOP + New Site.exe" Maybe it wont load because Im putting it on the frame I have no idea what i must do to get this to work!
I have been creating mini product movies in Flash using sound recordings, key frames, and tweens. This is the 5th in the series, and just NOW I'm having problems.I had my frame rate set to 30fps with one long sound bite, about 2.5 minutes. Everything looked fine on my end, but when I loaded it into a landing page in IE, everything was out of sync, but only on other people's computers. It still looked fine to me.
I compressed the sound file more, which helped some, but did not aleviate the entire problem. I noticed the frame rate when I did a quick preview (just pressed enter) would fluctuate from the 30 fps all the way to 9 fps.I then cut the sound bite up into 13 segments,shortened the tweens, and reduced the frame rate to 18fps. In development and in preview, it looked fine. However, when I put it into the landing page, the animation was way too fast for the sound and the sound bites looped.
I had a complete interactive application built in ActionScript 2.0, and now need to revise and update it -- which means converting the old code to 3.0. The first scene is a preloader for the entire application that loads and intro animation before launching the application. I went to the help section figuring that once I had some actionScript in the file, I could delete and experiment with the code until I began to understand (I did take a semester long course in Java, but not much has been retained). If you couldn't tell already, I'm a designer and not a programmer.
I copied the ActionScript from the help section, and pasted it into my Flash document. I went to test movie and got the following error message: "1037: Packages cannot be nested" I can't even figure out what that means! I have nothing else in my document.
Would like to understand the basic process behind an ecard before I attempt to construct one!Obviously there could be the following elements:Initial web page containing a Swf (choose swf) offering a user a choise of ecards and a consisting of a series of text input fields to collect recipients and senders address and a message. With actionscript that calls a php file on the server.
Passing variables holding the card choise the card text the email from and to etc from swf to php file.The php script runs and creates a copy of a swf card, the one chosen by the user(swf1) It populates the swf copy with text from the variables set by the choose card swf.the php then sends an email to the recipient address with ? and this is where I am unclear?Does it send an attachment of the swf1 or how does it do it?
I have a little math problem with a game I'm making, and I can't for the life of me figure out the formula needed to accomplish something..Say, there's a sniping game, and a BIG image that must scroll from left to right according to the mouse movement.
Something like this:[URL]... In that example, the scene is 550 pixels wide, and the image is 1100, exactly two times the scene, so the formula is kinda easy..
[Code]...
the center of the image would be at x 1500, way over to the right of the scene, outside it, but it would fit inside the screen, like this (the blue square represents the real size of the scene):[URL]..Then when the mouse is at the far right side, that is 550 x, the image center should be at -950 x, like this:[URL]...
I have a 3 screen project and there are two buttons on each screen that have to be able to enable the user to jump to the appropriate screens when clicked on. I am totally new to flash and I have tried off and on for a couple weeks to figure this out in various books and online. I just can't figure out what I'm doing wrong.
I'm trying to remove a child from the display list from a different class than I added it in but it keeps coming up that the parameter child is null. I traced it and it says undefined, but it is still on the stage.Here's what it looks like in the class where I added it:
I had a project requirement which was to stream video to people across the globe (max 100 simultaneous connections) and i was under the impression that a single HTTP server is sufficient. However, a friend of mine said i will have to use an FMS server. How does this basically work ?
If i record video from my webcam and store it for future consumption, where will it be stored ? On my site server ? or on the FMS server What is so special about an FMS server ? Can i turn any server into an FMS server I read somewhere that streaming video via my own server does not allow the user to jump to a particular part in a video. Is this true If the requirement is to stream live video to people, how does this work ? Does the video from the source (webcam) get transferred to my server and then to the FMS server or directly to the FMS server I'm pretty confused about the FMS server concept and some articles or links would really help too, however your expert answers will be invaluable
I am currently trying to figure out a circular alignment problem. so if you look at the following code, it works perfect without the positioning section. All the data is being loaded from a database and when the user clicks on the mc which houses this code in its second frame, it accesses the database and if there are more rows in the database whose owner column matches the name of the clip it will add more circles to the stage and then use other data received from the database to edit it such as its colour. But what I am also trying to do is align the newly added circles in a circular pattern around the mc (when clicked the mc will be centred on the stage.
I am trying to create a game where random figures are revealed. These random figures relate to a list of monetary amounts on the same page. As a number is revealed the corrisponding amount on the page is then deleted, hopefully with a bit of fade, movement, jazzed up a little.I cannot work out a code in order to do it. The code below is how I randomise the hidden amounts via a button.
ok so all i want to do is have a simple button blinking back n forth, on rollover, it stops blinking, and on roll out, it starts again
[Code]...
im sure its stupid but hmmm im still learning this PAIN as3! edit* on top where it says "playit" theres no space in the word...for some reason i cant seem to remove it...
I'm trying to write a script that will move a mc in a figure 8, kinda like the way that water flows from side to side inside a container... flowing in one direction and rising, then hitting the wall and ebbing as it flows back the other way... slowing down over time To say that I'm not that mathematically inclined is an understatement, but i think it can be done using trigonometry, like sin and cos...??
I found this page on here - [URL]- this is similar to what i want to do, except when the clip passes the center to move away in a figure eight and then back, instead of just going around in a circle. And i think i want the mc to come to rest in the middle over time, so the figure eight is gradually reducing in size.
There's also a method that looks like it could be adapted to do what i want using elasticity -[URL], bottom example. i've put up a page on my site with a bit of a visual representation of what i want it to do:[URL]
Im doing a tutorial in a book that moves a car from one end of the screen to the next by buttons.When you release a button it moves the car 10 pixels more down the X axis.The code confuses me and I want to understand it Please Help!
Here is the code:
// stop the cars traveling stop(); // callback for onPress event on 'back' button back_btn.onPress = function() { // move my car -10 pix
[code]...
Why does the - sign and + sign appear before the = instead of after?Is this a logic operator(-= or +?Why doesn't putting the - sign or + sign after the = work?
I have a site that I created in flash and I need to add a login to a site caleld sharefile. This form works correctly in html but I can't get it to work in my flash file.Here is the code snippet:
[Code]...
I have the input text ready with one input box labeled username and the other labeled password in flash and on the submit button I have the script: When I publish the file it takes me to the right website but it does not log me in. It just acts as if I just put a regular link to the sharefile login page. I figured this was too simple.
i'm getting the above error, Error #1009: Cannot access a property or method of a null object reference.and cant figure out why I'm getting it. I'm getting it in the last line of the following function:
[Code]...
when I trace the (_bigTurrShot._missile.bitmap) I get [object bitmap] so it's not coming up as null when it is traced. Everything seems to be correct in the other code I have for it,