ActionScript 1/2 :: Can't Get Piece Of Code To Work?

Jun 24, 2011

I am using AS2 and I am trying to make a simple 'game' for an assignment for school.I am first trying to make a simplified version of the game, to get some experience before I make the final version.
I will try to explain this simplified version:
 
The player has to drag an object in a big square and then release it. The object resamples 20 liter water. In total the player has to drag 100 liter water to the square, so it has to drag and drop the 'water' object 5 times.
 
I want some text in screen that says: You still need .

[Code]...

View 13 Replies


Similar Posts:


ActionScript 3.0 :: Execute A Piece Of Code Once On A Frame?

Jan 2, 2011

How to execute a piece of code once a on a frame For Example I want to execute this code only once..

/**********************
var rand:Number = (Math.random())%70;
gotoAndPlay(rand);
/**********************

View 2 Replies

ActionScript 2.0 :: Use A Piece Of Code Only When Condition Is True?

Jan 26, 2011

If i have a piece o code that i would only like to tell Flash to use when a condtion is true how do i do that?Example of my code now:

aa = 1+Math.floor(Math.random()*5);
bb = 1+Math.floor(Math.random()*2);
if (aa == 1 && bb == 1) {

[code]......

View 1 Replies

IDE :: Create A Timer That Executes The Following Piece Of Code After 10 Seconds?

May 3, 2010

How to i create a timer that executes the following peice of code after 10 seconds:

Code:
_visible = false;

View 3 Replies

Flash To Have Multiple Objects With The Same Instance Name All Being Affected By One Piece Of Code?

Oct 6, 2009

I tried something interesting recently. I had code effecting an object with the instance name : object_mc.Now I added another object and gave it the same instance name.The result was, that the code only effected the most recent added object (no error).Is there a way in flash to have multiple objects with the same instance name all being affected by one piece of code?

View 5 Replies

ActionScript 3.0 :: Cannot Get A Relative Positioning Piece Of Code To Remove After It Is Navigated Away From

Dec 28, 2010

Whe I use the code below in a template set up as a movie clip it appears and works fine but when i nvagate away from it the relative alignment code remains for the rest of the pages.  Would use a remove child how would this look?

[Code]..

View 5 Replies

ActionScript 1/2 :: Create Own Art Work Style Piece In Flash?

Dec 9, 2010

Im attempting to make a create your own art work style piece in flash. Ive designed it out so that you first select one of 3 buttons to select which vase you wish to use as a base. However the next set of buttons relate to the colour of that object, so there are 4 options (blue, red, pink and brown) and the user selects one from clicking the appropriate button.
 
However im strugling to figure out how i would know which of the first options (which vase) the user has selected in the first place. Is there some kind of time line trick or script that i could use to sort this out???

View 7 Replies

ActionScript 3.0 :: Tweens - Get The Previous Image / Piece Of Work To Fade Out Before Jumping To The Selected Key Frame

Oct 19, 2009

I curenttly making a simple online portfolio using flash (as3). Each piece of work i'm displaying resides within a mc on the main time line, and within that each piece of my work lives in its own keyframe, so the site has a basic 'mc.gotoandstop("label")' navigation. I can get my images to fade in using a AS tween, but I want to get the previous image/piece of work to fade out before jumping to the selected key frame and fading in the selected work. Currently, the innards of my button function reads something like:

tween (fadeout)
gotoandstop
tween (fade in)

but this clearly not the right way to go about it? Is there a way of putting slight delay after the fade out tween in the function? To let it fully fade out before fading in the new work?

View 3 Replies

Professional :: Code Snippets Won't Work?

Oct 17, 2010

Code Snippets won't workEvery time I try to attach a Code Snippet I keep getting this error:***Notes from Customer***10/13/201020:55:30When I have a object on stage, and I try to add code snippet, I keep gettingerror message: The following JavaScript error(s) occurred: SyntaxError: missing ) after argument listI've watched video(s) on adding snippets, but it won't work for me like it

View 1 Replies

ActionScript 3.0 :: Code Work In One Place But Not Another?

Sep 16, 2011

I have a class. Inside the class are two public functions. One calls this:
 
MovieClip(root)["bmc"+PuzzleGlobals.puzzleAbbrev].addChild(this);

And the other calls this: 

MovieClip(root)["bmc"+PuzzleGlobals.puzzleAbbrev].addChild(fwgame);  fwgame is declared like this (before the addChild): var fwgame:FireworkGame = new FireworkGame();  trace (fwgame); //traces correct object

trace (MovieClip(root)["bmc"+PuzzleGlobals.puzzleAbbrev]); //returns a 1009 error

The first line of code works. The second line returns a 1009 error,  "Cannot access a property or method of a null object reference."

View 6 Replies

ActionScript 2.0 :: Moving MC To One Fla To Another And Code Don't Work

Nov 12, 2005

When i move some MC or elements between fla movies, with the code, frames, and layers it need to work, some code stop to work?

View 10 Replies

ActionScript 2.0 :: Saving: Code Doesn't Work?

Apr 25, 2009

Okay, I know this is an old topic by now. I've searched numerous places how to save to a simple text file, and at one point in my life I was able to do it. However, the code doesn't seem to work anymore Flash Code:

Code:
myData = new LoadVars();
submit.onRelease = function() {

[code].....

View 10 Replies

ActionScript 2.0 :: Why Doesn't Code Work On Frame 34

Jun 11, 2009

For some reason my buttons don't work when I stop on frame 34. Everything else works, but when I stop on 34 the button/actions won't work anymore. I have no idea why. I checked everything that I can think of. The buttons are labeled correctly on the frame.

Here is the code:

stop();
button01.onRelease = function() {
if (_root._currentframe == 1) {
gotoAndPlay(2);

[code]....

View 2 Replies

ActionScript 3.0 :: Why Doesn't This Really Simple Code Work?

Mar 16, 2009

What I'm Trying To Do: Modify the y coordinate of a MovieClip on the stage from an external .as File, simple as that.If someone could tell me why its not working and how I can go about fixing it without modifying the existing class structure
(ChildOfMain must subclass MainClass).

Download
Source Files 6 kB

For those of you who don't want to download the source files (I thought it would make it easier if you could handle it yourself)

Document Class For Project: Main Class
Objects In Project Library
platform (movieclip)
subjectMovieClip (movieclip)

[code]....

View 6 Replies

ActionScript 3.0 :: Baffled - Buttons Will And Will Not Work Using Same Code?

May 11, 2010

im using the following code:
 
stop();
btn_arrow_TL.addEventListener(MouseEvent.CLICK,l1top);
function l1top(l1:Event)
{
gotoAndPlay("left_flyout_play_1st");

[Code]...
 
The first two buttons (btn_arrow_TL and btn_arrow_RL) work... but btn_Home will not work.... it shows up just a few frames later in the timeline, but why would this have any effect on it working or not???  The ActionScript runs the whole length..

View 1 Replies

ActionScript 1/2 :: Removing _root Code Does Not Work?

May 5, 2011

I've tried removing or using this and code dose not work.
 
[Code]....

View 2 Replies

ActionScript 3.0 :: Get Value Of A Variable Code Doesn't Work

Dec 11, 2011

In other language I can use this kind of sentences:

[Code]....

How can achieve this? because the above code does not work.

View 1 Replies

Flash :: HaXe -- Code Refuses To Work?

Sep 2, 2010

I have the following code:

package ;
import flash.display.DisplayObject;
import flash.display.Graphics;

[code].....

View 2 Replies

Flash :: Shared Objects Don't Work In Code?

Nov 3, 2010

However, they work in other examples, even locally, when I download the source.

Code:
//Button
on(release)

[code]........

View 1 Replies

ActionScript 3.0 :: Repeated Code Doesnt Work?

Sep 27, 2009

ok, so i am doing a tutorial on external text sheets, but i cannot seem to implement the same code into my current project, it just doesn't seem to work.Its strange because im not getting any errors, but it still doesn't work.This is the example code:

Code:
var loader:URLLoader = new URLLoader(new URLRequest("my_text_file.txt"));
loader.addEventListener(Event.COMPLETE, completeHandler);

[code].....

View 5 Replies

ActionScript 3.0 :: SWF Resizing Code Won't Work When Uploaded?

Jul 16, 2010

Every time I preview my .swf in flash I can see everything resizing correctly as well as staying centered on the page. However when I uploaded it to the web none of it works anymore and I have no idea why.Check it out...

pixelflexstudios.com/test/test.html
.swf code:
ActionScript Code:

[code]....

View 9 Replies

ActionScript 3.0 :: Pop Up Code Doesn't Work Anymore?

Feb 28, 2009

I have used a pop up window code several times before and now it doesn't seem to work. I've tried in several different movies now and when pressing the button it simply flashed the page and moves a little, but won't actually pop up to the page it's pointed to.Here's the code:

on (release) {
getURL ("javascript:NewWindow=window.open('http://www.angelfire.com/in/HansonArtGallery/2newpaintingbig.html','newWin','width=650,height=6 50,left=0,top=0,toolbar=No,location=No,scrollbars= No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

View 1 Replies

ActionScript 3.0 :: Button Code Doesn't Work?

Dec 19, 2010

I have a Rectangle Box called (Panel1_mc).And inside it there is a button called (BoardMessage1_btn). When I click on this button, the Rectange Panel should move upwards. Right now it is on the bottom of the page. The following code throws an 1010 error:

Panel1_mc.BoardMessage1_btn.addEventListener(Mouse Event.CLICK, clickSection);
function clickSection(evtObj:MouseEvent){
var Panel1Tween:TweenMax = new TweenMax(Panel1_mc, 6, {y:450, delay:1, ease:Strong.easeOut});
}

What is wrong with this code?

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 3.0 :: Code Doesnt Work With My Flvplayback Component?

Jul 6, 2010

Ive just created my own custom scrubber using this tutorial, however, the code doesnt work with my flvplayback component.

View 4 Replies

Swfs To Load In One Html File But This Code Does Not Work?

Sep 1, 2009

I found this code to load a movie but naming the button myRequest or myLoader does not do anything?[code]....

View 21 Replies

Professional :: Make Code Hinting Work In Flash CS5?

May 1, 2010

I would like to use code hinting in the flash CS5 IDE.But the IDE is constantly building the code hinting cache, so i cant use it?

View 12 Replies

Professional :: Flash CS5 - Unable To Get AS3 Code Hinting To Work

May 24, 2010

I have a trial version of the Adobe Flash CS5 installed on my machine and I am unable to get code hinting to work when I'm working on AS3 files. I've tried doing the reg fix from Lee's blog but still can't get it to work. I've also tried deleting the Flash regkey and the configuration folder but still can't get it to work.

Specs:Windows 7 64
Intel Core 2 Duo E7200
4GB RAM DDR

View 7 Replies

ActionScript 2.0 :: Same Instance Name Makes Code Only Work For One Object?

Apr 17, 2010

I happen to have this real massive code for an object in my game.(please guys dont move this to the game section the problem has hardly anything to do with that) One of them is a propane tank, the other a box and the third is a barrel.(it doesnt really make much diff i just want you guys to get a better picture of whats going on)So inside of each movieclip i put in this MASSIVE code.

ActionScript Code:
onClipEvent(load) {
var right:Boolean = true;
}

[code]....

it works fine but when i put in an instance name the whole thing messes up.only one of them works and all the others follow commands from the same one. so lets say if presse is true for the working on, presse will be true for all the rest. The problem still happens if i use different combinations of objects like 3 crates or 1 propane tank and 2 crates. Can someone please help me find a solution without changing the instance name. By the way '_root.hater' is the character.

View 0 Replies

ActionScript 3.0 :: Classes / No Errors Code Doesn't Work

Aug 12, 2011

Basically I have a class called player.as The symbol "Player" is the only linkage it has.[code]It is trying to make the player, a movieclip onscreen, with an instance name "Player", move with the arrow keys. Sadly it doesn't work.

View 9 Replies







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