ActionScript 3.0 :: Modify The Velocity3D.as Code From "Foundation?

Oct 13, 2008

I'm trying to modify the Velocity3D.as code from "Foundation ActionScript 3.0 Animation" so that I get 2 balls appearing that two different people can control with different keys. This is AS3 of course. I'm new to AS3 so I think I'm making a simple mistake with addChild or something else that will be obvious to experienced programmers.I created a second ball sprite which I called Ballb.as. this second ball is yellow. The first one is red.

Problem 1: I can't get both balls to appear on screen. Which ever addChild is put last that color appears. However, the controls are always the controls for the original red ball.

Problem 2: I want to use the "WASD" keys to control the second ball.But I can't figure out the correct syntax for using keyCode numbers for those letters. I've used "F" keys in the code as place holders. But as noted above they don't work even when a yellow ball is created.Here's the modified Velocity3D.as code...

package {
import flash.display.Sprite;
import flash.display.StageAlign;[code]............

View 4 Replies


Similar Posts:


Professional :: Modify The Code To Get The Last Number Of Image?

Aug 9, 2010

The following code is quite nice I got it from a tutorial. But I would like one modification as mentioned below: The next_btn will disappear in the following code once it reaches to 5 image.Instead that what I need to modify is, the could should get th last number from the images and set the disappear to value to next_btn. Why I need it because I don't know how many images the user will require. The following is the code:


next_btn.addEventListener(MouseEvent.CLICK, nextImage);
//variable is a container that holds some value...var imageNumber:Number = 1;=true;[code]..........

View 5 Replies

ActionScript 2.0 :: Modify This Code For The Preloaders In My External .swf's ?

Sep 12, 2005

I have a preloader that i found on the net which i am using to load my main .swf. Inside the main .swf I am loading several external .swf's and I wanted to use the same preloader to load them in.. however I am having a bit of trouble doing so.. here is the code that is attached to the preloader I am using..

Code:
onClipEvent (load) { total = _root.getBytesTotal();}onClipEvent (enterFrame) { loaded = _root.getBytesLoaded(); percent = int(loaded/total*100); text = " "+percent+"%"; gotoAndStop(percent); if (loaded == total) { _root.gotoAndPlay(2); }}

When i use this preloader inside an external .swf which I am pulling into my main movie it resets the whole movie back to the begining.. i guess because of the referals to _root in the code...how I should modify this code for the preloaders in my external .swf's so I can preload and then play my exyternal .swf's in my main movie.

View 1 Replies

ActionScript 3.0 :: Modify Code To Work After 30 Seconds?

Jul 21, 2011

I have the following code with type writing effect which is working cool. But I want this code to start after 30 seconds so that some of the animation will be finished playing animation.[code]

View 7 Replies

ActionScript 2.0 :: Modify Oringe Scrollbar Code To A Set Height

May 3, 2007

look at the code for oringe's blur scroller and tell me how to set the scroller's height to a set value instead of the stage height? if you'd like the source get it here:[URL]

[Code]...

View 3 Replies

ActionScript 2.0 :: Modify Code To Open Menu Horizontally

Nov 1, 2007

I have this code below and would like to know where and how i would alter it to have the menu reference horizontally and not vertically. I think it has something to do with "SortByVertical" and i changed it to "SortByHorizontal" but this just gave a strange result. I need to do this becuase i will be adding a scrolling text box and using it vertically does not work for the scroll bars.[code]

View 4 Replies

ActionScript 3.0 :: Modify The Code To Get Started The Timer On Mentioned Time?

Apr 12, 2012

I have the following code from a source. I would like to make a few changes as mentioned below:First ....1) The as3 code should get the time form "startMeeting_txt.text"2) Compare it with current time from "currentTime_txt.text"3) The Timer should be activated as soon as the "startMeeting_txt.text" = "currentTime_txt.text" and starts counting4) When the "finishMeeting_txt.text" = "currentTime_txt.text" then5) "message_txt.text" = "Meeting time is over"How to modify the following code:

var count:Number = 60;
var myTimer:Timer = new Timer(1000,count);
myTimer.addEventListener(TimerEvent.TIMER, countdown);

[code]....

View 2 Replies

Actionscript 3.0 :: Modify Flvplayback Installed Skin Button Code?

Jun 17, 2011

I'm building a videoplayer using the flvplayback component for flash cs5 the skin i'm using is SkinUnderAllNoCaption.swf.my question is how do I modify the code for the forward button currently the forward button scrubs the video file.I want the forward button to go to another video and for the rewind button to go to the previous video.

View 1 Replies

Flash 8 :: Support .net 3.0 - Windows Communication Foundation?

Jan 30, 2007

With .net 3.0 offering Windows communication foundation, will flash 8 support it? WCF is suppose to be easier compared to .net remoting. I have a project at work where I might be doing some flash and saving the data to a db and i'm lookin on how I should do it. It will be several months from now before I do it and I'm looking at my options.

View 3 Replies

ActionScript 3.0 :: Foundation Game Design With Flash

Aug 4, 2011

I am reading a book called foundation Game Design with flash and there is good that is not working at all.

package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Main extends MovieClip {
var startPage:StartPage;
public function Main() {
startpage = new StartPage;
addChild(startPage);
}}}
The error is 1120

View 3 Replies

Flash IDE Version Control - Integrate With Team Foundation Server 2008?

Aug 31, 2010

Does anybody who work with Flash IDE use any kind of document versioning tool? Is it possible to integrate with Team Foundation Server 2008? Team Explorer plugin?

View 1 Replies

Cannot Select All  Modify

Sep 9, 2009

I am a beginner and I have made an animation that consists of  4 Movie-Clip symbols (3 have motion tweens). I created it as a place holder for an upcoming website that I am designing. I am trying to select all 4 layers on my stage and convert everything into a single movie clip. I don't know what I am doing wrong.[code]....

View 5 Replies

Modify FMS 4.5 With 3.5 Scripts?

Sep 22, 2011

I'm trying to tell my customers how to modify FMS 4.5 so they can use the scripts as I have posted in a  previous thread(let me know if you need furthur clarification). However customers and I  are concearned that if we take FMS 3.5 files and put them on FMS 4.5 that we will break their TOS/Liscense Agreement.

View 3 Replies

Flash :: Load And Modify AS3 SWF

Dec 3, 2009

Is it possible to load an ActionScript 3 SWF and interact with it, for example by replacing some of its functions or editing variables? Similar to how it's possible in .NET using reflection and code generation. I'm looking to add an extra layer of functionality over an existing 3rd-party AS3 app.

View 3 Replies

ActionScript 3.0 :: Modify XML Using Flash?

Oct 24, 2009

i have seen many events where we import xml data to flash and display them but is thier a way to modify the data in a xml using flash ?

Code:
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>

[Code].....

the above is a xml about a book... will flash be able to read and modify the data in this xml ?

View 4 Replies

IDE :: HitTest Not Working - How To Modify

Aug 28, 2009

Why my hitTest is not working and how to modify the same in Menu1 to make it to work.

View 1 Replies

ActionScript 2.0 :: Modify To Support XML CDATA?

Aug 13, 2009

in altering this code so that it will support CDATA in my XML file? I am in desperate need of assistance. I have no idea where to begin. I have also included a zip file with the fla and associated XML file.

[Code]...

View 21 Replies

Modify A Flash Website For Which There Is No Fla File Available?

Dec 16, 2010

have a website that I have to modify. It is entirely built with flash. The problem is that I do not have the fla files. So I have two options: either using a special program which converts the swf into a fla file or build the website with the changes from scratch.

View 1 Replies

Professional :: Unable To Modify .fla File?

May 10, 2010

I am trying to modify a .fla file with flash cs3.When open it, the file does not play or look like it should.All I need to do is change the links within the file (which I did easily) but still the file doesnt look right.I got a developer friend to also try it and he had the same problem.This is the site on a testing urlAnd this is a link to the actual .fla file that can be downloaded:Is it perhaps because the file was made in a program other than flash?

View 4 Replies

Professional :: Modify Or Edit A .swf File?

Jun 21, 2010

with the option to modify or edit a .swf file?

View 3 Replies

Professional :: Trying To Modify FLVPlayback Component

Aug 27, 2010

I try to modify ncmanager file. (I want add parameter when connect method is called). I've edited this file but nothing happens in my application. After two hours of headacke, I delete NCManager (I've made a copy on my USB key).I try to place a FLVPlayback on my scene : no problem ! I can place it, but it does'nt work as I want.So I discover that even I try to change NCManager, this file isn't read.I need help to understand what I must do when I modify these file. Should I have to put it somewhere ? must I compile them and how ?

View 14 Replies

Professional :: Modify > Arrange Is Broken?

Nov 15, 2010

I notice in flash the Modify > Arrange option seems to be buggy and work only sometimes. I have a few shapes on the same layer and wanted to arrange them on top of each other in different order and it doesn't work... The shapes were created with shape tool and pen too as drawing objects.

I would have to go the extreme, either I would have recreate the shape to be recognized by the program or cut and paste into a new layer and transfer back down to the single layered that was needed. illustrator has the exact same option with no problems.

View 2 Replies

CS5 :: Flash Crashed When Click On Modify

Dec 17, 2010

My Flash crashes immediately when I click on the menu Modify/Document. It goes in idle and after some seconds on the top left software frame comes "(Not Responding)" and I then can only close Flash..

View 1 Replies

ActionScript 3.0 :: Allow The User To Modify This Mask?

Feb 22, 2012

I need to allow the user to modify this mask. They need to be able to use a 'brush', to either add to or subtract from the mask.basically add or remove red.I have tried the mask as both vector and bitmap and haven't had much success with either.

View 4 Replies

Modify Application To Use The Soundchannel Object?

Oct 23, 2009

so I have a lot of classes in actionscript 2. But I need to modify my application to use the soundchannel object for audio monitoring. as far as i know this is only in actionscript 3. so it it possible to write one class in AS3 and leave the rest in AS2?

if not is there a conversion tool which can make the process easier?

View 2 Replies

Flex :: Use Same MXML For An Add & Modify Form?

Feb 16, 2010

I have a form that is written in MXML that allows a user to create/add a User.I need to add a form that allows a user to modify SOME but NOT ALL of the fields for this user.The forms are so similar, I don't want to have to create two separate forms, one for Add and one for Modify.For example, in the Add form, the user specifies a user id. In the Modify form, the "user id" field is not editable.I'm wondering how I can initialize the MXML form (i.e. pass in a parameter?) so that it knows whether it is in the Add state or the Modif state.I know I can't do the following but this is what I would like to do (pseudocode):[code]

View 1 Replies

Flex :: Modify Its Properties Since It Already Exists?

Mar 19, 2010

I have a Rect object that I'd like to create and set its properties only once. After that, I want to just modify its properties since it already exists. This is my general idea

if(theRect == undefined){
Alert.show("creating");
var theRect:Rect = new Rect();[code].............

but can't get the desired effect. Everytime this code block runs, and depending on which version I've used, it either gives me a "can't access null object" error or the if statement always evaluates to true and creates a new Rect object and I get the "creating" Alert. What's the right way of creating that Rect but only if doesn't exist?

View 1 Replies

Actionscript 3 :: How To Modify A Already Made Tween

May 13, 2010

I have a tween like this :

new Tween(myObject, "x",null,nowPosition,finalPosition,time,true);
sometween.start();

Now when the tween has not finished and is somewhere in the middle and the final position changes. I want this tween to be modified so instead of moving to its already defined postion the object goes to the final position

View 1 Replies

Flex :: Modify The Vertical Gap In A Repeater?

Jul 2, 2010

I Have a VBox, and set the verticleGap = 0. Inside the VBox I have a Repeater. When I run the App, the items listed from the Repeater have a large gap between each line. Is there a way to set the verticleGap on the Repeater, or reduce that space?

View 1 Replies

Flash :: Modify Multiple Movieclips As One?

Nov 8, 2010

Is there any way to move or scale a bunch of movieclips on the stage as one, without putting them inside of another movieclip?

View 1 Replies







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