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


Similar Posts:


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 3.0 :: Preloader Code Not Working [renamed]?

Feb 4, 2009

Code:
import flash.display.*;
import flash.events.*;
import flash.text.*;

[code]....

My Problem is getting a preloader to work In AS3 code above, loading in media_player.swf from the same directory.

View 2 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 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

ActionScript 2.0 :: While() Not Working Properly

Apr 2, 2004

i tried following the duplicate mc tutorial, however the part on putting the code in a frame to get it to duplicate on load doesn't seem to work for me

here's my code in the frame:

stop();
amount = 5;
while(amount>0) {

[Code]....

apparently the clip only gets duplicated once where's the problem?

View 5 Replies

ActionScript 3.0 :: URL Loader Not Working Properly

Jun 25, 2009

I'm trying to do in this case is populate a List UIComponent that I created with information that I get back from the PHP file. For some reason the loader.addEventListener(Event.COMPLETE, userOnLoad) isn't working and my program never gets any farther than that.

Here is my code:
import fl.controls.*;
import flash.display.Sprite;
import fl.managers.StyleManager;
DECLARATIONS
var backgroundArea:Sprite = new Sprite();
var loginArea:Sprite = new Sprite();
var userArea:Sprite = new Sprite();
[Code] .....

View 1 Replies

ActionScript 1/2 :: IsNaN Not Working Properly?

Nov 26, 2010

I've noticed that by using isNaN(number), it doesn't always return true when needed. In fact, by using:
 
var bool:Boolean = isNaN(parseFloat(numberStr));trace(bool);
 
It will return true with:

-sdfda
$%&$
asdf
 
BUT, false (when it should be true) with:
 
230asdfs
230sdfasd.50
 
It seems like the letters between the numbers aren't even considered and it returns false when it should in fact return true... If it starts with a letter, it returns true, otherwise, with a number, it's false...I need to check whether or not there are any non-numeric (except "dot") in the parameter "numberStr" (a String).

View 4 Replies

ActionScript 3.0 :: CS5 Preloader Not Working Properly

May 6, 2011

I've implemented an internal preloader in my project but it's not working properly. I use Simulate Download but the preloader only shows after something like 80% is completed, which sort of destroys the purpose of the whole thing.

import flash.events.ProgressEvent;
stop();
function preloader(progressEvt:ProgressEvent):void{
var totalBytes:Number = progressEvt.bytesTotal;
var loadedBytes:Number = progressEvt.bytesLoaded;
[Code] .....

View 6 Replies

ActionScript 3.0 :: UncaughtErrorEvent Not Working Properly

Oct 2, 2011

I don't really get UncaughtErrorEvent working for my Air 2.6 application. if i step through the code with the debugger, i get very strange results.that's the code:
 
public class Main extends Sprite{
public function Main(){
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR,

[code].....

View 9 Replies

ActionScript 3.0 :: SWF Not Working Properly After Upload

Dec 29, 2011

I have a Flash gallery that works locally but not after upload.I added several photos to the xml file and only the original 8 jpgs are displayed.URL...

View 5 Replies

ActionScript 2.0 :: Preloading Not Working Properly?

Jun 30, 2009

I have a preloader in the first frame. The preloader appears only after 80 percent loading of swf.

View 0 Replies

ActionScript 3.0 :: Stop() Is Not Working Properly

Jul 6, 2009

The stop() is not working properly as if it were being ignored. I have even recreated a dummy flash document the stop() did work, however, it is still not working on the original design.

View 6 Replies

ActionScript 3.0 :: Droptarget.name Not Working Properly?

Aug 6, 2009

I'm setting up some objects connected to classes onto a movie clip dynamically, and although I'm setting the name fine, when I drag another movie clip on top of it and trace for droptarget.name I always get something like "instance01" what am I doing wrong?

View 4 Replies

Actionscript 3.0 :: URLLoader Not Working Properly?

Jun 26, 2009

i've been going over this code all day and I have no idea what's wrong with it. I'm doing a similiar operation a little higher and that one works so I have no idea why this one doesn't. All I'm trying to do in this case is populate a List UIComponent that I created with information that I get back from the PHP file. For some reason the loader.addEventListener(Event.COMPLETE, userOnLoad) isn't working and my program never gets any farther than that.

Here is my code:

Code: Select allimport fl.controls.*;
import flash.display.Sprite;
import fl.managers.StyleManager;

[Code].....

View 1 Replies

Flash Not Working Properly In Firefox And IE

Mar 4, 2011

I sorted this problem before, but it's back again.

Both of my animations work fine in firefox, but don't loop in IE.

ABOUT ME [URL]

KZX ANIMATION 2ND FROM BOTTOM [URL]

confirm that these animations don't loop properly in IE?

View 2 Replies

IDE :: Email Link Not Working Properly?

Aug 25, 2009

When tested my email window opens twice.

There is no target attribute used at all.

Also ?subject= don't work. Subject field blank in email popup box.

Using Flash 8.

on (press, release) {
getURL("mailto:me@thisplace.com?subject=No subject showing");
}

View 2 Replies

IDE :: Xml Images Not Working Properly With Masks?

Sep 8, 2009

I have created an image gallery for a client using actionscript 2 and xml. I have the gallery pulling in the images and text from the xml file and displaying correctly. The problem is the rollover/rollout affect I need to do. The image need an itunes affect flip, so the image looks like it flips to display a description then when you roll out it should flip back to show the image. The flash so far can be seen here [URL]

The flash works by pulling the image in from xml and putting it inside a place holder MC inside another movieclip. This movie clip contains a mask which creates the flip affect and shows a white box containing text over the image. When you rollover this works fine, but when I roll out the image, and title have disappeared when the white box is removed.

At the moment I have left the rollover affect out (as you can see on the link) but for my own sanity I would love to know why I can't get this to work. I probably havent explained this very well so I have attached a demo of how I am trying to get the rollover affect to work.

View 1 Replies

ActionScript 3.0 :: AddEventListener Not Working Properly?

Nov 25, 2009

have generated a random grid from movie clips stored in timeline. When I click on the movie clips, it should show a trace statement, but it is not working properly. Sometimes it shows the trace message, sometimes it does not show. My code is like this

Code:
package
{

[code].....

View 3 Replies

ActionScript 3.0 :: SWF Not Working Properly After Upload?

Aug 18, 2004

I have a Flash gallery that works locally but not after upload. I added several photos to the xml file and only the original 8 jpgs are displayed.Here is the html file.[URL]portfolio_residential_ fireplaces.html

View 14 Replies

ActionScript 2.0 :: If Statement Is Not Working?

Jun 22, 2010

on my main timeline i have a movie clip called "screen" within that i have a dynamic text box for inputing a number. var for text box is txt_1

on the same timeline i have another mc called "animation" withing that i have a mc called "prizes" there are 2 animations in the prizes movie clip that are supposed to run based on the if statement...i have an action assigned to the prizes as below:

//this.onEnterFrame = function () {
if (_root.screen.txt_1 == "11111") {
prizes.gotoAndPlay('prizes1');[code]........

but this is not working...basically i want to say that is the text that was inputed was "11111" play the first prize animation inside the "prizes" mc, and if its "22222" play the second prize animation in the "prizes" mc.what am i doing wrong?

View 7 Replies

ActionScript 1/2 :: If Else Statement Not Working

Jul 30, 2009

I'm sure I have the conditions and statements typed in wrong. Here is the original code:[code]only now I want to add an if/else statement so that if none of the mouseDown conditions are met, it then goes the the Timeout variable:[code]

View 2 Replies

ActionScript 3.0 :: If Statement Not Working/being Run?

Nov 25, 2009

I have a button which makes a panel flip 180 on the x axis if its name is not in an array called "panes", it determines this by running an if statement. If its name is in the array then the button should run some code to make the panel flip back. However it isn't. It will let the panel flip one way, but doesn't run the code to flip it back. I was wondering if someone could take a look a see if they know why.

View 4 Replies

ActionScript 2.0 :: If Statement Not Working?

May 28, 2005

For some reason my if statement is not working. It is in a movie clip of a blinking eye and I want the code to pause the blink for 4 seconds between blinks.The movie clip does not have an instance name (which may be the problem).Frames 1-12 is the eye blink animation. (no script)

Frame 13

Code:
timeDelay = 4+getTimer()/1000;
Frame 14 is empty

[code]....

When I run the movie, the varaibles change like they should according to the time, but for some reason, it skips over the if statement even is timeYet is greater than timeDelay. I probably labeled the variables wrong, but I do how they should be.

View 2 Replies

ActionScript 2.0 :: For Statement Not Quite Working?

Jan 4, 2006

ActionScript Code:

</p>
<p>function flasher () {</p>
<p> trace ("flasher running");</p>
<p> count = 20;</p>

[code]....

If i am right this should make win11 flicker 4 times but it aint:confused: I dont need to use a onEnterFrame for this do i?

View 14 Replies

ActionScript 2.0 :: Else If Statement Not Working?

Aug 9, 2006

Here's my code:

Global variable _level0.menu_2 is populated with one of 5 values. Function exists for each value. The function for the value should only be called if the _level0.menu_2 variable matches the value. What is happening is that even though _level0.menu2 is correctly populated, only the first if statement executes--even if the first condition is NOT met.

I looked all around and can't figure out what's wrong. As far as I can tell (and I've been over the code character for character) the syntax is correct.

function loadMenu2():Void{
if (_level0.menu_2 = value1){
trace("_level0.menu_2 is value1");
value1();

[code]....

View 2 Replies

ActionScript 2.0 :: CS3 : HitTest Code Not Working Properly?

Oct 9, 2009

I have had this problem for a long time and have not been able to fix it. I am using ActionScript 1, although if you can help me using AS2 I should be able to change it. I have a static movie clip with no code referring to it called "ship". Its center point is 275, 324.9. I have a series of planets coming down from the top of the screen and I need to check whether you "died" or not. The planets movie clips are contained inside blank movie clips that are there so thre registration point does not change. I was using the code

Code:
if(this.hitTest(275, 324.9, true)){
gotoAndPlay("gameover");
}

View 3 Replies

ActionScript 3.0 :: Mouse Up Event Not Working Properly?

Dec 22, 2009

attached is the fla which has a part of code i am working on for a project.with help of mouse you can draw a circle on the image, but for some reasons the mouse up event does not work. it works fine when the eventlisteners is attached to the stage, but does not work when its attached to the movieclip.also how can i restrict the circle to be drawn only inside the movieclip which is a rectangle.here is the code

Code:
const CANVAS:Sprite = new Sprite();
var _dragging:Boolean = false;

[code]....

View 3 Replies

ActionScript 3.0 :: SetChildIndex Over Movieclips Not Working Properly?

Aug 30, 2010

the code which works over stage, is not working properly over a movieclip..sample, i have many objects to stay at different indexes at flash..with that code block below. I add 300 mc's to stage,

Code:
for (var j:Number = 0; j<300; j++) {
var mc2:MovieClip = new MovieClip();
stage.addChildAt(mc2, j);
}

TO be able to change indexes with different items.. i have random movieclips which have to be placed indexes between 5 and 300.. And everything goes great when i do this directly at stage..But when i do this with a movieclip.. example;

Code:
for (var i:Number = 0; i<300; i++) {
var mc3:MovieClip = new MovieClip();
my_mc.addChildAt(mc3, i);
}

i can't see the movieclips inside.. but i know they are at their right indexes..but somehow they are getting behind those fake movieclips..

View 15 Replies

ActionScript 2.0 :: CS3 Contact Form Not Working Properly

Sep 24, 2010

So I have built a contact form out of AS2 and PHP. PHP 5 is enabled on my server, so that's not a problem. I think there is a slight error within my code somewhere. What happens is once online, you fill out the form and hit post, it goes to the "error sending email!".

[Code]...

View 1 Replies







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