ActionScript 2.0 :: Nested If Statement That Refuses To Work Properly

Oct 28, 2009

I have written a nested if statement that refuses to work properly. My fla file consists of the main timeline and a movieclip. The problem lies in the pwrbtn function. I need the pwrcomp Boolean to prevent the call to firstpage() from happening more than one time. However when I test it keeps cycling so my traces are frame2, true, frame2, true, so on and so forth. Have I just made some small mistake that Im not seeing?

[Code].....

View 2 Replies


Similar Posts:


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

ActionScript 2.0 :: If Statement Inside If Statement Won't Work

Mar 30, 2011

why this code won't work

[Code]...

I'm sure you can put if statements inside other if statements, seriously I can't figure it out

View 4 Replies

ActionScript 2.0 :: If Statement Not Working Properly [renamed]?

Dec 16, 2005

For some reason my first if statement is allways fulfilled, even when I set the varaiable to different values, I cant work out why. My variables are not used anywhere else in my site.

_global.roller=0
if (_global.roller=5){
var speed = 0;
}

[code]....

View 4 Replies

ActionScript 3.0 :: Function Not Triggered Properly From Within IF Statement

Feb 3, 2009

I have set up a system that spawns barriers for the player to dodge but it appears the functions won't trigger properly from within "if" statements.

PHP Code:
var speed:Number=2;
var barNumber:int=6;
var barLoop:int=0;
var timer:Number=0;
var limit:Number=100;
[Code] .....

View 8 Replies

ActionScript 1/2 :: Conditional Statement Not Working Properly On Button?

Nov 25, 2009

Here is my current small piece of code I have on a given "letter" button..

on (release) {  if (_root.Acheckmark._visible=true) {  _root.AScore = _root.AScore+_root.APoints;  } else if (_root.Bcheckmark._visible-true) {  _root.BScore = _root.BScore+_root.BPoints;  }}

View 1 Replies

ActionScript 2.0 :: Nested If Statement For TextField With User Input?

Mar 16, 2012

I have the following function
ActionScript Code:
IncludeInfoItems = function (bool) {
if (!bool) {
proof_txt._visible = true;
} else {
proof_txt._visible = false;
}};

This dynamically on/off the description. I have one text field where user enter the values, If this value is =>1501 then i want to display it true. I am trying like this and getting error.

ActionScript Code:
IncludeInfoItems = function (bool) {
if (!bool) {
if (check_amount_mc.text ==> 501) {
proof_txt._visible = true;
}} else {
proof_txt._visible = false;
}};

View 2 Replies

Ruby On Rails 3 :: HTTPService Not Properly JSON-encoding Nested Objects On Send()?

Nov 22, 2011

i am creating an object like this:

var myObj:Object = new Object();
myObj["someProperty"] = {
anotherProperty: "someValue",
whateverProperty: "anotherValue"
}

now i want to send it to a web server (rails):

var service:HTTPService = new HTTPService();
service.url = "http://server.com/some/path/entry.json";
service.method = URLRequestMethod.POST;
service.send( myObj );

the problem is that the server receives the json like this:

{"someProperty"=>"[object Object]"}

is this a problem with HTTPService? should i use the good old loader/urlrequest and serialize myself? by the way, serializing and then passing the string doesn't work, webserver receives empty request as GET.but i kinda want to use the httpservice class though...

View 2 Replies

Can't Get Carousel To Work Properly

Nov 15, 2010

I am VERY green when it comes to flash and this is my first ever project. What Im trying to accomplish; *a website for myself that is "simple" and clean to be used as an art portfolio/gallery of my work. -three sets of buttons that go to three pages all with carousels that hold my artwork for that type (ie. press the concept art button and it loads page 2 where there is a photo carousel that containing my concept art pieces.
-clicking another button will then call for a new page with a new carousel (I have three types of art that I am showcasing: concept art, fine art, 3D game art)

I have managed to create a flash page that has my name and the buttons and upon pressing the buttons it goes to the page I need. However the pages are at the moment empty due to the fact that I cannot get the carousels to work properly. I have watched the tutorial and dl the class package on 3D carousels. I changed the .as file within the package so that my carousel will be vertical by changing imc.x = Math.cos(imc.angle) * 450; to imc.y = Math.cos(imc.angle) * 450;

[Code]...

View 1 Replies

ActionScript 3.0 :: GotoAndPlay Won't Work Properly

Sep 10, 2010

For some reason, the gotoAndPlay command in one of my frames won't work properly (I think that's the problematic command, but maybe it's another one in the movie).

Frame 1 consists of a button instance named "menu", which is a text reading "menu". When pressed, the animation starts playing and several menu options appear in a frame-by-frame animation, which lasts up to frame 7 where the movie stops.When the "menu" instance is pressed again, the playhead is released and the movie plays another frame-by-frame animation (from frames 8 to 16) of the menu options disappearing.So, in frame 16 there appears only the "menu" instance - just like in frame 1.

All of the above works fine.What I want to do is tell the player to go back to frame 1 as soon as it reaches frame 16, so the menu can open up again when the instance is pressed.I put this code in frame 16:gotoAndPlay(1)and it seems to be working fine, but when I press the "menu" instance for the third time (meaning, after it has already opened up and closed one time), the movie starts playing from frame 8 for some reason.

View 4 Replies

ActionScript 3.0 :: Can't Seem To Get These Imported Swf To Work Properly

Nov 20, 2009

I am trying to sett up an workflow for a project. I am going to do the programming and a friend of mine the graphics.I would like him to be able to update the graphic on the final movie without the need of publishing the full project. We are sitting on different locations and usually work at different times. So i was thinking of making separate swf for each of the movieclips. And importing these at runtime.Then he could do his magic and preview this if he uploaded them.I have done some small tests and can't seem to get these imported swf to work properly. Should this work?Any suggestion on how to set up a good workflow for this project? Or at least what to search for.

View 1 Replies

ActionScript 2.0 :: Getting Bullets To Work Properly?

Mar 19, 2005

I've got a mouse controlled person who fires circle bullets up towards oncoming enemies. but since i duplicated them, only the first bullet fired works as it is the only one that has the right instance name.What I mean is :The bullet is instanced bullet When it is duplicated to be fired, it changes to bullet1,bullet2 ect etc The hittest script on the enemies only reconize bullet, and therefore ignores all other shots except the first is there anyway of making it so it reconises all shots?

View 1 Replies

ActionScript 2.0 :: Can't Seem To Get Substr To Work Properly

Aug 7, 2007

can't seem to get substr to work properlyseem to get substr to work properly in this situation. i'm getting Sun May 13 00:00:00 GMT-0400 2007 back from a query and I want to strip it down to simply say "Sun May 13".

View 5 Replies

ActionScript 2.0 :: Getting The DuplicateMovieClip To Work Properly?

Nov 15, 2007

Working on FL8 AS2 I've always had a problem getting the duplicateMovieClip to work properly... So here's my code:

Code:
for (i=0; i<_root.level.length; i++)
{
for (j=0; j<_root.level[i].length; j++)
{
if (_root.level[i][j] == 1)

[code]....

In theory...for each pass shouldnt it:Reposition block0's x and y duplicate block0 on that position.move on but it seems only the setProperty works because my block0 eventually ends up at the last position.

View 1 Replies

ActionScript 2.0 :: Getting Navigation To Work Properly?

Aug 13, 2009

I had an idea for a navigation menu where I could press down a button and it would stay in its 'down' state. In addition it could be navigated by using the keypad and those buttons are used to call up xml images. Getting this to work has been more of a headache/challenge than I imagined. I'm fairly close, the code I have was suggested to me and it is getting more and more untidy the more I try to craft it to my needs. The problem I have right now is that when the mouse clicks outside of a button, it reloads the image (in this case firstImage.)

Code:
_root.onEnterFrame function() {
jms_btn.onPress = function() {

[code].....

View 1 Replies

ActionScript 2.0 :: How To Get Bullets To Work Properly

Mar 19, 2005

I've got a mouse controlled person who fires circle bullets up towards oncoming enemies. but since I duplicated them, only the first bullet fired works as it is the only one that has the right instance name. What I mean is: The bullet is instanced bullet. When it is duplicated to be fired, it changes to bullet1, bullet2 etc. The hittest script on the enemies only recognize bullet, and therefore ignores all other shots except the first. Is there anyway of making it so it recognizes all shots?

View 1 Replies

ActionScript 3.0 :: If Else Statement Does Not Work?

Oct 21, 2009

have a very common function i use in educational quizes that self rate the user depending on their score (resulting from answering multiple choice questions). So I have set up a variable called score no trouble...but when i implement my trust "if else" heuristic from AS2...i get all these errors and my flash file does not work.

stop();
if (score <= 5){ endMsg.gotoAndStop("score1");} else if (score > 6 and score <= 11){ endMsg.gotoAndStop("score2");} else { endMsg.gotoAndStop("score3");}

[code]....

View 6 Replies

ActionScript 3.0 :: If Statement Does Not Work?

Jan 3, 2011

the problem is that for some reason my if statement doesn't work

Code:
if( key.isDown( Keyboard.UP ) )
{

[code].....

View 2 Replies

ActionScript 1/2 :: Can't Get GetBytesLoaded And GetBytesTotal To Work Properly

Jul 22, 2009

I am using Flash CS3 with ActionScript 2 and am having a problem getting getBytesLoaded and getBytesTotal to work properly. Probably I am taking the reading in the wrong spot, but I can't figure out where I should be doing it. The code will read an xml file which contains pictures and url links to where I want each picture to go, and then loads and shows a picture for 3 seconds, then goes on to the next one. I am trying to show the preloader bar "LOADING" by adjusting the _xscale as a percentage of BytesLoaded/BytesTotal. The code should work, but my getBytesLoaded and getBytesTotal is either showing 0% or 100% and nothing in between. Here is my code and I have left some of my trace statements in the code below as well. The problem occurs in the this.onEnterFrame = function() which is about half way thru the code:

[Code]...

View 6 Replies

Professional :: How To Update Components To Work Properly

Sep 24, 2009

I'm trying to utilize the Learning Interactions in the Library of Flash CS4 included in the Adobe E-Learning Suite.I'm able to change the individual componens' properties (radio button, submit button) etc. using the component inspector, but cannot determine how to change the properties of the movie clip for items such as correct answer, etc.Has anyone used these Learning Interaction library items, and knows how to update the components to work properly?

View 2 Replies

Professional :: Loaded External Swf Does Not Work Properly?

Oct 13, 2010

I'm trying to create universal loader of flash games on one entertainment site. What I want is to make some kind of container (SWF A) which will load another flash to it (SWF B) (by some params).
 
SWF B could be anything - AS1 / AS2 or AS3 flash. SWF A is programmed with AS3. Problem is that not all SWF games, which I try to load, works fine. Some games lost their click events, some games does not load at all, some games are corrupted. When I run that games separately (not using my loader), games work just fine. Why is this happening? Why some flash games are not working properly after loading by another flash?
 
I'm using Loader object to handle this, without any special settings - same as on examples on AS3 Bible book...

View 9 Replies

ActionScript 2.0 :: Gettining Bullets To Work Properly?

Oct 21, 2011

I've got a mouse controlled person who fires circle bullets up towards oncoming enemies. but since i duplicated them, only the first bullet fired works as it is the only one that has the right instance name.What I mean is :The bullet is instanced bullet When it is duplicated to be fired, it changes to bullet1,bullet2 ect etc The hittest script on the enemies only reconize bullet, and therefore ignores all other shots except the first is there anyway of making it so it reconises all shots?

View 4 Replies

ActionScript 3.0 :: Rotate In Multitouch Does Not Work Properly

Dec 16, 2011

When I use the code below to rotate a image with multitouch screen I rotate but on a corner. how to rotate in the center of the image? 

import flash.display.StageDisplayState;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.events.Event;

[Code]....

View 3 Replies

Flash Gallery Will Not Work Properly After Uploading On Ftp?

Jan 31, 2009

I have been working on a flash website and finished it yesterday, and among other pages, i have a gallery section. The gallery works perfectly on my local PC, but when i try to upload the website to ftp so I can put it online, the gallery shows completely wrong, in fact only one picture is visible. The AS code for the gallery is written in one movie clip with the instance name gall, and this movie clip is located in the actual page of the gallery, the one with the animation. I don't know if that's relevant, but i thought i should mention.I have attached a pic of what the right gallery looks like on my PC

View 1 Replies

ActionScript 2.0 :: DateField Component Does Not Work Properly

Apr 27, 2006

I am using the DateField component in my movie dateField.swf. I am loading this movie into an empty movieclip in my master.swf. When I run master .swf the DateField component (residing in the loaded in dateField.swf) doesn't work properly! The dateChooser automatically opens up, which is good but when the dateChooser closes after I chose a date I can't open it up again! When I run dateField.swf on its own everything works as it should. And I have the DateField component also in both libraries. I have used the following code in the master.fla but to no avail!

empty_mc.loadMovie("dateField.swf");//this works fine
empty_mc._lockroot = true;

View 3 Replies

IDE :: Flash Gallery Will Not Work Properly After Uploading On Ftp?

Jan 31, 2009

I have been working on a flash website and finished it yesterday, and among other pages, i have a gallery section. The gallery works perfectly on my local PC, but when i try to upload the website to ftp so I can put it online, the gallery shows completely wrong, in fact only one picture is visible. The AS code for the gallery is written in one movie clip with the instance name gall, and this movie clip is located in the actual page of the gallery, the one with the animation.I don't know if that's relevant, but i thought i should mention.I have attached a pic of what the right gallery looks like on my PC

View 3 Replies

ActionScript 3.0 :: Getting A Toggle Button To Work Properly?

Sep 25, 2004

getting a toggle button to work properly.I have the following code for a custom btn to play/pause toggle a video I have loaded. The only thing is that its not working... I can get it to play and pause but I cant get it to resume playing. It just keeps being paused even after I press the playBtn.

[AS]
//btns added to stage in code not shown
playBtn.addEventListener(MouseEvent.CLICK, playPauseVideo)
pauseBtn.addEventListener(MouseEvent.CLICK, playPauseVideo)

[code]....

View 2 Replies

Actionscript 3.0 :: The If Statement Doesn't Work

Jun 14, 2009

im trying to make a website based on a tutorial. when a certain button is clicked a selected page will load when the previuos page plays the OUT:label and hits the end label which are situated on the every pages mc timeline. Tyhe problem is that the function doesent work

the function is like this

Code: Select all
kontakt_btn.addEventListener(MouseEvent.CLICK, newPage); 
function newPage(e:MouseEvent):void

[code]...

View 3 Replies

Tweener For /if Statement Doesn't Work?

Dec 23, 2009

I am executing a hittest when a chicken meets a crocodile; the chicken is afraid for the crocodile and turns back flying up in the air and back on the ground. In fact most of it works, allthough I can't get the wings to stop fluttering. As soon as the chicken returns on the ground, this must happen.This is the piece of code where it is about: (the function winger() is called once at the hittest)

[flash=]function winger()
{
var counter:int=0;[code].......

without the counter it works. changing it into an if-statement with the counter af the 2nd tweener, doens't work either.

View 1 Replies

ActionScript 2.0 :: Simple If Statement Won't Work?

Feb 18, 2006

I am using Flash 8, and for some reason, my if statement won't work. I have a scrollbar which scrolls a movieclip (that contains AS loaded material (eg. attachmovie). I want it so that only when the material is longer than the scrollbar do I see the scroll bar.For some reason, it doesn't work. The traces don't even work!

if (scrollbar._height < menu_mc._height) {
scrollbar._alpha = 100;
trace("works");[code].....

View 2 Replies







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