SFCave / Helicopter Tutorial - Sourcefile ?
Last edited by divtag : 2003-06-05 at 09:12.
Hi all.
i have only found parts of code to be able to make a game like :
http://lab6.com/sfcave/ or
http://www.seethru.co.uk/zine/south_...opter_game.htm
does anybody have a .fla file they want to let me take a look at or a tutorial ? please help !!! If there is any thing i can do in return...
ohh.. thats flash 5 im using
regards
div...
Ultrashock Forums > Flash > ActionScript
Posted on: 2003-06-05
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Helicopter Game
Dear all,
http://www.seethru.co.uk/zine/south_coast/week13/02.htm
Does any one know how to do the actionscript involved to control the helicopter in the game above? My boss wants something similar and i was wondering if someone could give me a few pointers or more.
Cheers guys, ur stars
Tom
Helicopter Moving
Hey, I want to make a helicopter move slanted right and left... like..
If i push right it slants down and to the right some... while moving right...
I've got my movie clip moving around...
and within the movie clip...
I've made three frames...
of which say this in the corresponding order:
stop ();
if (key.isdown(right)) {
gotoAndPlay (2);
}
stop ();
if (key.isdown(left)) {
gotoAndPlay (3);
} else if (key.isdown(down)) {
gotoAndPlay (1);
} else if (key.isdown(up)) {
gotoAndPlay (1);
}
stop ();
if (key.isdown(right)) {
gotoAndPlay (2);
} else if (key.isdown(down)) {
gotoAndPlay (1);
} else if (key.isdown(up)) {
gotoAndPlay (1);
}
In frame 1 i have the helicopter straight...
Frame 2 i have it slanted down and to the right some...
and frame 3 is slanted up and to the left some...
Whats wrong?
Helicopter Game
have any of u played the helicopter game where u click to stay up and if u crash u die any1 know how it was done
Helicopter Game?
Anyone know how you might do the actionscript for a game like this?
THIS
I'm thinking of doing something similar, but I have no idea how I would do it...
Any help would be greatly appreciated.
Jerome
Realistic Helicopter Movement
I use this code to move my object (helocopter).
ActionScript Code:
// initialize arrow variables
var leftArrow:Boolean = false;
var rightArrow:Boolean = false;
var upArrow:Boolean = false;
var downArrow:Boolean = false;
// set event listeners
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyPressedUp);
stage.addEventListener(Event.ENTER_FRAME, moveh);
// set arrow variables to true
function keyPressedDown(event:KeyboardEvent) {
if (event.keyCode == 37) {
leftArrow = true;
} else if (event.keyCode == 39) {
rightArrow = true;
} else if (event.keyCode == 38) {
upArrow = true;
} else if (event.keyCode == 40) {
downArrow = true;
}
}
// set arrow variables to false
function keyPressedUp(event:KeyboardEvent) {
if (event.keyCode == 37) {
leftArrow = false;
} else if (event.keyCode == 39) {
rightArrow = false;
} else if (event.keyCode == 38) {
upArrow = false;
} else if (event.keyCode == 40) {
downArrow = false;
}
}
// move every frame
function moveh(event:Event) {
var speed:Number = 5;
if (leftArrow) {
h.x -= speed;
}
if (rightArrow) {
h.x += speed;
}
if (upArrow) {
h.y -= speed;
}
if (downArrow) {
h.y += speed;
}
}
But how could I make a more realistic movement?
One with gravity, speeding up to maximum speed and that the helicopter won't stop suddenly when no key is pressed.
Scrolling Terrian(like In Helicopter)
I'm wondering how do you get scrolling terran like in the helicopter game?
http://www.java-gaming.com/action/Helicopter/index.php
The upper and lower bounds constantly change and the obstacle still randomly appear between then no matter where the bounds are the bounds get narrower as the game goes on, I just don't know how to do this.
The Scrolling Level Like Helicopter
Hi,
I was wondering about the helicopter game:
http://www.ebaumsworld.com/helicopter.shtml
Like I get the up and down thing with the mouse and the crash thing, but I don't know how you would a scrolling level like that with smooth changing top and bottom boundries getting smaller as the game goes on. I'm totally lost, could someone provide me some examples or a bit of code example please?
Helicopter Sound Loop
i am looping a sound of a helicopter engine. The sound file is about 1.2 seconds long and is a perfect loop. My problem is even though I can easily stream and loop it, it has a 0.5 second pause in between looping. which gives an obvious seem in the loop. So my question is, how can I make a perfectly seamless loop that will loop forever?
Thanks in advance!
Helicopter Game: Mouse-guided?
I'm building a helicopter game:
www.blindslim.com/copter
Right now, the arrow keys and the spacebar control the helicopter.
I WANT the mouse to control it:
mouse button: altitude (fly, or don't)
And moving the mouse forward moves the copter forward, etc.
It seems like there would be an easy way to convert my current code to make this change.
I'm close with getting the mouse button to work. But my question pertains more to the directional guidance.
HOW can I do this? Tracking mouse coords? Anybody got a quick idea on this thing?
Helicopter Moves Showing Dashed Line Path
I am building a .fla showing an Army helicopter flying a particular path demonstrating instrument flight to and from a navigational aid. I want the aircraft to leave behind a dashed line, like a trail of bread crumbs, so the viewer can see the path that the aircraft took from start to finish. I could use some assistance in developing the correct ActionScript to display such a path. Thanks for your help, Bob.
Edited: 12/04/2006 at 11:24:27 AM by Witchdoctor40
"helicopter" Problem
I'm trying to make a "helicopter" game. An example of this game can be found at http://www.addictinggames.com/worm.html. My problem is that I can't get the "explode" thing to work.
I tried using a hitTest, but that did not work.
The file is posted.
To The Tutorial Writing Staff: XML Portfolio Tutorial
Hi guys!
I'm a basic actionscript user which knows the basics of xml and actionscript. I've been seaching for a tutorial for a long time now how to make a portfolio which is dynamic and loads info from an external .xml file.
Since i couldn't find any tutorial like this i've tryed to make my own script out from this xml file:
Code:
<portfolio thumburl="thumbs/" imgurl="images/">
<project hdline="my first project" client="none" date="2007-01-02" category="website" weburl="http://website.com">
<image url="image1.jpg"/>
<image url="image2.jpg"/>
<image url="image3.jpg"/>
<description><![CDATA[This describes my first project]]></description>
</project>
</portfolio>
I have hade in mind that you should see a bunch of thumbnails first in a table format (like 6 cols and 3 rows) on each page, then you should be able to select page with next and prev buttons. When you press on a thumnail a box with the bigger image shuld pop-up and you should be able to read the other information in the xml file (such as client, date etc etc).
I've tryed to make this but it's to advanced. And my version is very buggy, aswell.
Here is what i've done sofar:
www.vmgcomputers.com/xml/portfolio3.swf
I don't know if this helps but here is a "multiple loader" i found:
http://www.johnnyslack.com/content/d...der_jslack.zip
I think there are many guys who are looking for a tutorial about this so please consider to make one, all professionals out there!
XML - Mix The Squirrel Tutorial And The Portofolio Tutorial
Hello,
I'm trying to mix 2 tutorials: the Squirrel Finder (http://www.kirupa.com/web/xml/exampl...rrelfinder.htm )and the Portfolio ( http://www.kirupa.com/web/xml/examples/portfolio.htm ).
Actually i want to create a list of buttons based on loaded xml and when the buttons are cliked i want to displays information obtained from the xml
associated with that button (this part is ok).Now the things is that i also want to add to each "squirrel" a portofolio but i can 't figure out how to write the AS.
here are my codes
the xml
Code:
<?xml version="1.0" ?>
<menu>
<menuitems sourceurl="http://spot.colorado.edu/~halloran/sqrl.html">
<item type="squirrel">
<species>Abert Squirrels</species>
<location>
<![CDATA[Abert squirrels (Sciurus aberti) are only found in mountain regions of North America. In the United States their range extends from extreme south-central Wyoming to New Mexico and Arizona. There are six valid subspecies including S.a. ferreus, True, the subspecies that is found along the Front Range of the Rocky Mountains in Colorado. Abert squirrels are limited to Ponderosa pine (Pinus ponderosa) forests in which they feed and build their nests.]]>
</location>
<portfolio>
<picturetitle= "Tiny Disk"
thumb= "portfolio_images/thumbs/tinydisk.jpg"
description= "portfolio_text/tinydisk.txt"
image= "portfolio_images/tinydisk.jpg" />
<picturetitle= "Plug"
thumb= "portfolio_images/thumbs/plug.jpg"
description= "portfolio_text/plug.txt"
image= "portfolio_images/plug.jpg" />
<picturetitle= "Disk Collection"
thumb= "portfolio_images/thumbs/diskcollection.jpg"
description= "portfolio_text/diskcollection.txt"
image= "portfolio_images/diskcollection.jpg" />
</portfolio>
</item type="squirrel">
<item type="squirrel">
<species>Douglas Squirrels</species>
<location>
<![CDATA[Douglas squirrels (Tamiasciurus douglasii) are found throughout the coniferous forests of Southwestern British Columbia, western Washington, western Oregon, and western California.]]>
</location>
<picturetitle= "Tiny Disk"
thumb= "portfolio_images/thumbs/tinydisk.jpg"
description= "portfolio_text/tinydisk.txt"
image= "portfolio_images/tinydisk.jpg" />
<picturetitle= "Plug"
thumb= "portfolio_images/thumbs/plug.jpg"
description= "portfolio_text/plug.txt"
image= "portfolio_images/plug.jpg" />
</portfolio>
</item>
<item type="squirrel">
<species>Eastern Grey Squirrels</species>
<location>
<![CDATA[Eastern gray squirrels are found throughout the eastern United States; their natural range extends from Florida, north to Canada, and west to where the deciduous forests meet the great plains grasslands. There are 5 subspecies of eastern grey squirrels, S. carolinensis carolinensis is the subspecies found in most of the south from northern Florida, to North Carolina, west to Missouri, and eastern Texas.]]>
</location>
</item>
</menuitems>
</menu>
the as
Code:
function DisplayInfo(){
menu_mc._visible = false;
infobox_mc._visible = true;
infobox_mc.content_txt.text = this.location_text;
}
infobox_mc.close_btn.onRelease = function(){
menu_mc._visible = true;
infobox_mc._visible = false;
infobox_mc.content_txt.text = "";
}
infobox_mc._visible = false; // start the info box hidden
// define basic variables for setting up the menu
var item_spacing = 28; // how far menu items are spaced veritcally
var item_count = 0; // counts menu items as they are added from the XML
// var for the portofolio
var thumb_spacing = 40;
// load variables object to handle loading of text
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){
description_txt.text = raw_text;
}
// CreateMenu creates a menu based on the XML object passed.
// It loops through all the items with a for loop adding clips to the menu_mc
// movieclip on the timeline, defining the appropriate text where needed
function CreateMenu(menu_xml){
// start with the first item in the XML
var items = menu_xml.firstChild.firstChild.childNodes; // menu -> menuitems -> child nodes array
for (var i=0; i<items.length; i++) {
// only continue if the type of this item is a squirrel
if (items[i].attributes.type == "squirrel") {
// create variables for our elements
var species = items[i].firstChild; // same as items[i].childNodes[0]
var location = items[i].childNodes[1]; // second child node
//function GeneratePortfolio(portfolio_xml){
//var portfolioPictures = portfolio_xml.firstChild.childNodes;
//for (var i = 0; i < portfolioPictures.length; i++){
var currentPicture = portfolioPictures[i];
var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i,i);
currentThumb_mc._x = i * thumb_spacing;
currentThumb_mc.createEmptyMovieClip("thumb_container",0);
currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);
currentThumb_mc.title = currentPicture.attributes.title;
currentThumb_mc.image = currentPicture.attributes.image;
currentThumb_mc.description = currentPicture.attributes.description;
currentThumb_mc.onRollOver = currentThumb_mc.onDragOver = function(){
info_txt.text = this.title;
}
currentThumb_mc.onRollOut = currentThumb_mc.onDragOut = function(){
info_txt.text = "";
}
currentThumb_mc.onRelease = function(){
image_mc.loadMovie(this.image);
description_lv.load(this.description);
}
}
}
// Create a menu item movie clip in the menu_mc instance on the main timeline
// for each item element offsetting each additional further down the screen
var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
// assign text using nodeValue to get the text
// from the text nodes and CDATA sections
item_mc.species_txt.text = species.firstChild.nodeValue;
item_mc.main_btn.location_text = location.firstChild.nodeValue;
// set the onRelease of the item button to the DisplayInfo function
item_mc.main_btn.onRelease = DisplayInfo;
}
}
}
var squirrel_xml = new XML();
squirrel_xml.ignoreWhite = true;
squirrel_xml.onLoad = function(success){
if (success) CreateMenu(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}
squirrel_xml.load("squirrel_finder.xml");
Thanks for the help
Need Tutorial/ Fla
Any body know how to scroll series of image relative to mouse position (like shown at http://www.chris-bailey.com) ?
Anyone Know Where This Tutorial Is?
Some time this month I saw a tutorial about loading random movie clips with actionscript to create more interesting intros etc.
Anyone know where this is please
Looking For A Old Tutorial
Hi i'm looking for a tutorial with small picuters in row. The row allows the user to scroll in either the left or right direction.When the mouse is over the picture the picture is magnified and when the user clicks on the picture it come up.
thanks in advance
Tutorial
Hi, is there a tutorial where I can find out how to do all of the flash effects on this site
http://www.fallnangels.de/newsite/vorlagen/set.htm
thanks
Tutorial
Does anybody have a "for stupid people" tutorial that I could access? I want to learn ActionScript but I need something that will explain it in ENGLISH. I mean, stupid things, like, what is a variable? How do you write a variable? Why do you write a variable? Where do you put a variable? Can it have spaces? Does it have to be before all the rest of the actionscript? How is a variable read? Why does it read the way it does?...balh, blah, blah...I need a beginning tutorial. Can you help? Thank you in advance....
Randy
P.S. Remember...it's like talking to a child....
Looking For This Tutorial...
I'm not sure that there is a tutorial on this, but if there isn't it would be appreciated if you could tell me how. I need to know how to make the flash part of a site appear seperatly from the site itself. Where it is in it's own window and you can move it around. Thx for the help.
Jason
Need An Tutorial Or Help With...
Hi.
I am making a site it is all done in flash. Now it will have buttons which u press and another box shows up. Now I want to make a scroll bar, but i want it to scroll where u JUST put the mouse over it .. no clicking.
So i need a tutorial to make the scroll bar that u just put the mouse over to scroll. Thx.
Help With Tutorial
Please take a look at this tutorial:
http://www.flashkit.com/tutorials/Ac...41/index.shtml
I'm a total noob, so can anybody translate it to Flash 5?
Thanks a lot
Where Did That Tutorial Go?
Hi All,
Im looking for the tutorial for a vertical scrolling menu, like the one on the eStudioworks site..
Cheers,
dvdvault
Mx Xml Tutorial
Been tinkering with the the xml menu tutorial in Flash MX - no real problems so far with changing the structure and links but does anyone know how I get the menu text to align right instead of left. I have been playing with the text box and it will accept changes for font and size but not allignment. Thanks...
Looking For A Tutorial
it gives the effect of motion. an example is this subway: http://www.directiondesign.nl/flash.html
same idea
any idea where i can find it?
Looking For XML Tutorial
I've been looking for a good XML tutoral that explains how to read and format XML data into flash, and possibly how to pass it back to a script. I found one on flashkit written for flash 5 which I can't get to work. Most of the other articles or tutorials I've found have very little description and just provide you with code to copy/paste. If anyone knows of any good XML tutorials that explain what the code means I would appreciate it, Thanks.
New BIT-101 Tutorial
for anyone interested, i just posted a new BIT-101 tutorial on making the infamous creatures that show up from time to time on BIT-101.
check the site. http://www.bit-101.com
Best Tutorial
i know this is a HUGE longshot, but does ne1 know of a tutorial site that can help me in being able to make a site in flash? and if not, does ne1 know of a good tut. site?
Looking For A Tutorial To Help Me
I have been scanning this site for a tutorial on how to build a site entirerly in falsh 5, but i am having great difficulty in finding anything that can halp me.
My main concern is how big should i have my working area so that the site is not to small.
The Best Tutorial EVER
i am an idiot when it comes to flash, but this is a life saver, makes it seem sooooo easy. If you are interested in saving variables like cookies go here: -
http://www.macromedia.com/support/fl...s/local_so.htm
Thnx for giving me this link Mirandir
~Ollie
Need Tutorial
I need a good tutorial for how to make objects smap into place...
thanks!
Tutorial...
Hey, i just started out using flash mx and i was trying to follow one of your tuts.
http://www.flashkit.com/tutorials/Ge...38/more3.shtml
And i can't figure out how to get the frame properties menu up and change it like the tutorial says for MX.
Please help! thanks
Help With Tutorial
Ok, I have "the basics" of flash down, but dont really know too much about action script. I know other programming languages etc. But my problem is i get through this whole tuorial (short one) on how to make a scrolling nav bar. Then at the very end it says to insert the action script, so i do. The Drop the "movie clp" into my main timeline. What i am confused with is i dont think ther ever was a movie clip and even when i do drop it in my main time line and add the action script what does it do DOH! If you guys would look at this tutorial:http://www.flashkit.com/tutorials/Interactivity/Navigation/Horizont-Jeremy_B-744/index.shtml
and tell me what to do on steps 4-6 in a ore detailed explanation it would be MUCH APRECIATED! I've been at it for a couple days now : thanks - EnS
Re: Tutorial For MX; Can Do In 5?
Thanks for your help ahead of time!
I have used general help area lots of times and it has always been so useful.
I've been asked to set up a script in Flash that would allow the user to input a number; as in days of the month; ie.7. This number would enter an equation that would create a sum (number) that would then be automatically represented by an updated graph bar.
I found this tutorial, which is almost perfect, but it is for MX, not Flash5.
http://www.flashkit.com/tutorials/Ac...14/index.shtml
Can anyone help with a Flash5 work around?
Thanks,
Kevin
Tutorial On This?
Hello.. in need help.. i am wondering if there is a tutorial on a menu like in this site... http://www.thenewparadigm.com.sg/ or a movie that i can look to learn...?
Help With Tutorial
Hi Guys
I am trying to run a cd from a installed flash 5 exe file.
I have found this tutorial that tell you to create a .bat file with the content below:
start
@ECHO OFF
explorer D:
And then target it from a flash movie using the following:
On (Release)
FS Command ("Exec", "mydoc.bat")
End On
I can get it to launch the file on the CDROM but a WINNT
window remains - I think this is as I cannot seem to add the 'End On' command without Flash saying it is an error?! Would this code close the window?
Thanks in advance
Oll
http://www.flashkit.com/tutorials/Pr..._-45/index.php End On
Looking For A Tutorial...
Hey im looking for a tutorial on how to move images on the x axis depending on where your mouse is on the x axis. If you could link me thanks! - EnSanity
Tutorial
can somebody teach me how to make a menu that combines these two together? i'm pretty new to flash and when i signed up for the free anfyflash account thingie it turns out that they make an anfyflash ad follow the cursor...
http://www.anfyflash.com/gallery/fadetreemenu/ http://www.flashkit.com/movies/Inter...1585/index.php
i want it to look something like this..but prettier..^^;;
Tutorial Help
a = eye._y-_ymouse;
b = eye._x-_xmouse;
angleA = Math.atan2(a, b);
degrees = angleA/(Math.pi/180);
setProperty ("eye", _rotation, degrees);
I dont under stand the first 2 lines.
and i would understand line 3 a bitt better if i knew what 1 and 2 did.
Please help.
Tutorial
Hi!
I have a quick question...does anybody know for a tutorial explaining how to do an effect as on this site for navigation:
http://www.posny-artwork.de/flash.html
thanks!
Anyone Know A Tutorial That....
does anyone know a good tutorial for a side-scrolling game? the only example i can think of from the top of my head is the metroid games.
cheers.
Nav Bar Tutorial
Anyone know a good tutorial on how to make a good navigational bar with flash? I think i know how to do it but i really don't want to mess up.
Looking For A Tutorial...
hi ,im worcing on a site at the moment, i want 2 write some script for the buttons (on the left of the interface), so wen on rollover a movieclip wil pop up on the right side of the interface saying eg."gallery". ive seen it done quite a bit, im nut sur if setproperty is tha ideal thg for this or not. cant find a tutorial for it anyware, probably tha reason being is i dont know what its called.hav a look at mi site if ur not sur ware im coming from.thanxwww.alturapark.com
XML Tutorial?
Anyone know of a good XML tutorial?
What I need to do is take my flashMX mc(its animated button)and make it into an object or node. Each object will accept two varibles each holding a URL for a jpep, these can be placed in the XML file.
Finally, when I embed the .swf onto my webpage all I have to do is create new nodes within the embed code, which will place the same flash mc(button) on the page but it can be given different values for the varibles linked to the jpeg URL's.
The end result is 2 or more seperate pictures(flash buttons) on the screen that when you mouse over fade out the image1 and immediate fade in image2. Then when you mouse off, it immediately fades back to the image1. when you click on the image it will link to another page.
The only other way do this that I know of is to save as many different .swf that I need for each button, and embed each one seperately. Well that is just unpractical and foolish.
If you think you can help, but need a better understanding here is the flash mc that I am using, now I just need to make the entire .swf more dynamic.
Visit please
Looking For A Tutorial.........
on how to take apicture and have it cut into pieces and have the pieces come in from different sides and be put together. I hope that makes since. I have been looking for a tutorial on this but can't find one. Any help would be greatly appriciated.
Thanks,
Senna
By the way, this is my first post
Tutorial Help
I have done this tutorial..
When i use play in Flash it looks ok... but when i do test movie.. all i see is the Rectangle going across the screen
Can anyone help please.. much appreciated
http://www.flashkit.com/tutorials/Te...-525/index.php
|