ActionScript 3.0 :: Make A "heat-seeking" Missile Work?

Aug 11, 2009

i already know how to create a simple turret / cannon type game wherein the turret will fix its rotation based on where the users mouse is.. from there, the user can fire bullets which fly into the direction where the turret was pointed at when it was fired..

however, i want to take it a step further and make the turret fire bullets that can follow the mouse as i move it on stage (sort of like a "heat-seeking" missile) .. once i stop moving the mouse around the stage and the bullet catches up / arrives at the mouseX and mouseY, it will remove itself...

below is the code i used for the simple turret / cannon type game. i was wondering what i should add / modify in the code to make the "heat-seeking" work...

[Code]...

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Undefined Addchild - Make A (missile) Upon Shoot?

Nov 23, 2011

THIS THREAD IS SOLVED.. Answer lies upon a website tutorial. Final Page on this Thread.So far so good, i've gotten most my as2 to as3.. And coming out good Buttons are working, The only last part im working on is upon shooting, it'll bring in the calls to Fire the missle.. (tracein the button works great).

[Code]...

This is what im trying.. But it says undefined use for addchild.. so im taking im missing somthing..

(the missile is a animation graphic i created).I have made a Missile.as to control what the missle does when its addchild is placed on stage. Problem is, (addchild isnt doing it) and im not sure if its going to shoot out the nose of the hero..

View 14 Replies

Flex :: Excel - Interactive Heat Map - Import Matrix

Nov 12, 2009

I'm at a very basic level with Flex and with programming in general. I am working on a project where I have data in an Excel (.csv) format, it's a large Excel plot/matrix where each cell has a temperature number. I want to import this matrix into Flex somehow, or parse the data in Flex, so that this matrix turns into an interactive heat with colors corresponding to varying temperatures from blue (cold) to red (hot), and each spot on roll over shows the temperature number.

Should I use plot charts, or some other control? should I convert data into XML or import into a MySQL database, would that be easier for Flex? But then, again, the data is basically just a large matrix, there's no headers/ fields in a traditional database sense, just many cells each having a temperature number. how I can import the data into Flex and use it as data provider to plot the heat map?

[Code]...

View 1 Replies

How To Fire A Missile By Clicking

Mar 14, 2009

ok, now that i have the cursor and following the mouse done, i need to find out how to fire a missile by clicking.

View 3 Replies

ActionScript 2.0 :: CS3 Shooting Game Missile Flaw

Jul 15, 2010

I'm making a Space Invaders-type game. Y'know? Arrow keys to fly Space to shoot? Well, shooting isn't working so well. I have two .as files: Ship.as which controls the ship's ActionScript, and Missile.as which is supposed to control the missile. When I hit load it up I get the error: The class or interface 'Missile' could not be loaded.

View 2 Replies

Homing Missile - Making Rocket To Turn Around If Target Bypassed

May 12, 2011

I'm trying to create a homing missile in AS3. Easy enough when you want it to simply follow a point perfectly - but I'm trying to make the rocket have to turn around if the destination (target) bypasses it. Here's what I've got - it almost works, but as you can see it's quite glitchy (particularly if the mouse is to the left of the rocket (seems to work OK if it's moving right). [URL]

Here's my Rocket class:
package {
import flash.display.Sprite;
import flash.geom.Point;
import flash.events.Event;
public class Rocket extends Sprite {
[Code] .....

View 2 Replies

ActionScript 3.0 :: Projectile - Get The Missile To Actual Move In The Direction The Character Is Facing

Sep 17, 2010

I have this code to add my missile to the screen PHP Code:

[Code]...

it adds right where my character is but I cant seem to figure out how to get the missile to actual move in the direction the character is facing. heres how it looks [URL]

View 1 Replies

ActionScript 3.0 :: Create Realistic Smoke Coming Out From Back Of A Missile Flying On Stage?

Aug 10, 2009

How to create realistic smoke coming out from the back of a missile flying on stage?

it's for a top-view arcade-type game, where the player shoots a missile from a plane...

View 1 Replies

ActionScript 2.0 :: Simple Vertical Shooting Game - Rebound Missile Always Spawns At Left Of The Stage?

Feb 6, 2011

Basically, I have a border(line) at the top of the stage so that whenever my ship's missile comes in contact with this line, it is removed and a rebound missile clip is attached.Here is the missile code:

Actionscript Code:[code].....The problem is that the rebound missile always spawns at left of the stage, not wherever the ship missile was removed.I'm not sure if I should attach the fla, action script files, swf etc. to the thread. Also, my flash version is CS5.

View 3 Replies

ActionScript 3.0 :: Width Doesn't Work - How To Make It Work

Apr 21, 2010

I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.

I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.

Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410

View 4 Replies

ActionScript 3.0 :: Make A Sprite Button With Graphics And Can't Make It Work?

Aug 22, 2011

* I have a flash project called contact

* The document class is ContactClass

I am trying to make a sprite button with graphics and can't make it work. I have successfully added text fields so I know the path is correct. I suspected my code was correct and confirmed it should be, after reading several tutorials showing the process for creating sprite buttons with graphics. Anyway, I imported nearly every class on Earth, but certainly everything which needs to be. Stage is gray and 800x600.The graphics code by itself with appear, but not when linked to the sprite. Also, the sprite won't appear no matter what. Another interesting piece of the puzzle: nothing will trace, not even objects such as textfields which actually appear and function on the stage when I text the code.

public class ContactClass extends Sprite {
public function ContactClass() {
var home_btn:Sprite = new Sprite();[code]....

View 3 Replies

Flash :: Seeking Error In OSMF?

Dec 1, 2011

I have a HTTP video player built using Adobe's OSMF and I am experiencing a strange behavior when trying to seek within a subclip.The player requests data from the server using URL like "http:[url]...." to get the full video, and appends "?begin=123456" to request a subclip starting at 123456 bytes offset.Whenever I try to seek within a loaded subclip, the playhead just drops to the start of the subclip and the video plays from there. Although both mediaPlayer.canSeek() and mediaPlayer.canSeekTo(newtime) return true.

View 1 Replies

ActionScript 3.0 :: Netstream AppendBytes And Seeking

Sep 13, 2011

I have a simple flv player which connects to a CDN which can take header byte range requests if a user wants to skip through a flv without the need for the flv to be 100% loaded.I am using a third party http librabry to add the range header to the request.My code plays the flv but when I try to skip to 30 seconds into the video it just freezes. I beleive the cdn does return the file as i can trace through the bytes and the header has the content-range repsonse (below).[code]

View 0 Replies

ActionScript 2.0 :: Seeking And Changing Only Part Of URL?

Feb 2, 2010

I have to set button for changing the default language with another one ... this button have to be in my flash header ... only the header in my site is flash ... I want to read the current URL and change the part of it .. for example:

www . myweb.com/en/about.html
>>>> www . myweb.com/fr/about.html

Is this possible with ActionScript 2.0?

View 2 Replies

ActionScript 2.0 :: Way To Add Seeking Capability To Audio Playback?

Oct 15, 2007

I'm looking for a way to add seeking capability to audio playback. I can do it pretty easily for video, but I'm currently using a sound object which has no seek capabilities whatsoever.

Is there a different object or method I can use to direct audio playback to a particular point in the audio duration?[code]...

View 2 Replies

Seeking The Standard Flash Video Player?

Jul 14, 2009

Where can I get or buy the flash video component I keep seeing around the web which has the extra function of making the flash video go full screen.

View 4 Replies

ActionScript 3.0 :: SeekBar Breaks Everything When Seeking Beyond The Buffer?

Dec 9, 2009

I used a template from adobe and modified it to fit my needs. Instead of one long video with cuepoints, I have several videos that I want to switch when the buttons are clicked.verything works great except when the user seeks beyond the buffer (progressive download).hen this happens, everything breaks. All of the buttons, playback, play/pause... everything. You have to refresh the page and start over.My quesiton is, does the seekBar need a custom eventHandler? Shouldn't it work on it's own? Here is my code:
 
import flash.events.*;import fl.video.*;
//-----------------// Video control assignment//-----------------
display.playPauseButton = play_btn;display.stopButton = stop_btn;display.seekBar =

[code].....

View 1 Replies

Professional :: Seeking To Unbuffered Parts Of Video?

Feb 17, 2010

I have an flv with some navigation cue points embedded in it. The video is pretty long. When I upload it to my site, I cannot access cue points in unbuffered parts of the video. What do I need to do so I can jump to unbuffered parts of my video?

View 5 Replies

Media Server :: Recording And Seeking Inside F4V

Jun 28, 2010

I'm making DVR application and I'd like to use h-264 codec, but got following problem. While f4v file is recording, client application (for example Adobe DVR Sample Application player) cannot seek inside the video. It starts playing sought part of the video and stops in few seconds. When recording process finishes the seek works correctly in the recorded file. The process described above works fine when I use vp6 codec. I am using FMLE 3.1 and FMIS 3.5.3

View 5 Replies

Flex :: Video Player Seeking With RTMP?

Apr 15, 2010

Am working in flex video player with RTMP.How to skip the video file to the middle of a video without having to download the whole file using RTMP.Where i want to put the Video file(FLV). Red5 server location or any other folder.Where i want to put the flex project out put file Red5 server or any other server like XAMPP. How Can i skip the frames in flex using RTMP(*red5*)..

View 1 Replies

Flash :: Flashplayer 10.1, Set Enhanced Seeking To False, Without FMS

Nov 26, 2010

So I run into this issue that Enhanced Seeking is enabled by default. And I would really like to disable it (long story here). But it seems you can only disable it on the FMS, by adding this setting to the application.xml. But the thing is we are not sure if we will end up using an FMS or not. So, can I disable Enhanced Seeking without using FMS?

seek() reference

View 1 Replies

Flash :: On Demand Video Transcoding And Seeking?

Oct 10, 2011

At the moment i am using vlc to transcode my video realtime and display the output through Flowplayer.The problem is that I am struggling to seek using flowplayer my time gets out of sync between the stream and flowplayer and there are a few other issues.Are there any streaming servers that allow for real time transcoding and allow for a flash player to seek.

View 1 Replies

Flash - Seeking Video Beyond Buffered Area?

Dec 23, 2011

Normally we use NetStream.Seek method but it will make the seek after the buffer area crossed the seek time length.(HTTP). Can we seek the video that is beyond the buffered area like youtube in red5. Will it start the buffer from the seek point.

View 1 Replies

ActionScript 3.0 :: FLVPlayer : Seeking To Any Point Like YouTube?

Aug 26, 2009

I am trying to achive is the "SEEK" effect that you find on YouTube. Like suppose the Video is 20 Minutes long and only 5 minutes are loaded and if you click on the 15th minute, the video will start playing from that point.I saw a PHP script some time back which would return the "FLV" which starts from the point which is requested to the PHP Script. I didn't bookmark that I don't know why and it was really long time back.

View 2 Replies

ActionScript 3.0 :: Pausing/seeking Progressive Video?

Jan 20, 2011

Here's what's going on: I have an F4V file loaded into a SWF. There are no real playback controls -- nor do I want any. I've created a "skip" button that's supposed to a) pause (or seek to 0) the video, then remove the video from the stage. It seems I can either pause the video OR seek to zero, but not both.Here's what I've tried:

Code:
function seekTo (num:Number):void
{

[code].....

View 3 Replies

ActionScript 3.0 :: Flash Play Sound On Seeking?

Jun 26, 2011

I have a flv video file that I imported it on the stage and it plays on timeline. I have written a code that on mouse movement on the stage, the video plays from start to end ( mouse movement from left side of the stage to the right side )

Code:
stop();
stage.addEventListener(MouseEvent.MOUSE_MOVE,stageMovement);
function stageMovement(evt:MouseEvent)

[code]....

The problem is the sound doesn't play in this way. What should i do ?

View 3 Replies

ActionScript 3.0 :: Seeking In Streaming H264 Mp4 To Unbuffered Section

Jun 23, 2010

I need to get H.264 videos streaming. I've gotten the mp4 file playing and buffering, which is great, but when I try to seek ahead to a part that isnt buffered, the video stops, goes to the start of the video, and will no longer play. FLV files behave exactly as I would like them to, meaning they go to selection position and start buffering and playing from there. Here is my progressiveSeek function:[code]keyFramesSeconds and keyFrames Bytes are just arrays that hold the metadata for the seekpoints. This function, when called on the H264, goes to the beginning and stops the video, but when called on the FLV, does what I want. How can I do progressive seek for an H264?

View 7 Replies

Flex :: Cancel 'seeking' State Of VideoDisplay Class?

Jan 12, 2011

I have a VideoDisplay instance playing some video. When I click on the video slider (also my component) the property videoDisplay.playheadTime is set and the videoDisplay.state goes from 'playing' into a 'seeking' state for a brief moment (the videoDisplay seeks for a new position and then plays the video again). Intended bevaiour. But if I'm (or any random user) fast enough, I can set the playheadTime again while the player is still in 'seeking' state. When repeated several times every click is enqueued and the videoDisplay jump on every place of the video I have clicked(this is happening in an interval about 10-15 second after my last click). When I use live dragging the videoDisplay, overwhelmed by seekings, goes into 'error' state.My question is - is there any way to cancel seeking state of the VideoDisplay class? For example player is in 'seeking' state, I set playheadTime, and the player forgets about last seeking and try to find the new place of the video.

View 1 Replies

Flash :: Seeking To A Part Of Video That Hasn't Been Loaded Yet

Feb 28, 2011

I was told there is a server technology that allows user to seek to a part of video that has not been loaded yet even if I am using progressive download, not true streaming.

View 1 Replies

Flash :: AS3 - Dynamically Adding Cue Points To Flv And Seeking To Next Cue Point

Mar 14, 2011

I have a flvplayback component onto which I am loading a video. To mimic next frame and previous frame actions I am adding cue points to the loaded for every second of its length. The next frame /previous frame functions implement seekToNextNavCuePoint and seekToPrevNavCuePoint on the video. But its not working the way I expected it to.

Here is the actual class file. You can directly compile it with an fla file containing button instances in the library for play pause stop... Also you would need some sample flv file.

[Code]...

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved