ActionScript 3.0 :: Error 1151 In A Reaction Timer

Nov 26, 2011

i have been working on a reaction timer and i need to run the same program multiple times but put in different colored squares (when the square shows up click stop to get time) to see if that effected the reaction time so i made a bunch of seperate files with the different colors but i wanted to combine them and after i combined them i had a bunch of duplicates and i got those fixed but i still have error 1151.
 
i have the same text thirty times and where the numbers and myy is they are to get rid of duplicate terms
var blueSquare=new blueSquare();
 
timeline 1
stop();
var myy1Timer = new Timer(2500);myy1Timer.addEventListener(TimerEvent.TIMER, blueSquareDelay1);myy1Timer.start();
var blueSquare = new blueSquare();

 [code]....
 
if you are planning on building it to test i have three buttons the stop start and reset with the instances stop_btn etc. then there is an adaptive text box with instance of myText_txt i also have not put time in to get the start and reset buttons working it just starts on its own.

View 8 Replies


Similar Posts:


Actionscript 3 :: Flash Error 1151 In A For Loop?

Jul 25, 2010

I have a strange problem regarding Flash error 1151: A conflict exists with definition i in namespace internal.Here is the problematic code:

for(var i:Number=dt.getFullYear(); i >= dt.getFullYear()-90; i--)
{
dtYear.addItem( {label:i, data:i} );
} //for

[code]....

You cannot declare more than one variable with the same identifier name within the same scope unless all such variables are declared to be of the same type. In ActionScript 3.0, different code blocks (such as those used in two for loops in the same function definition) are considered to be in the same scope.

What the friggin hell is this? I mean the i variable is all the time exists as a Number, typecasted as a Number, why the hell would the above code then fail?

Working code:

for(var i:Number=dt.getFullYear(); i >= dt.getFullYear()-90; i--)
{
dtYear.addItem( {label:i, data:i} );
} //for

[code].....

View 2 Replies

ActionScript 3.0 :: 2nd Font WONT Embed Keep Getting Error:  1151 A Conflict Exist

May 8, 2010

I am trying to embed a font. It is the same font but, different sizes ( I dont know if that matters, one size is 11 the other is 15).  I set up my actionscript as so (please see below), but I continue to get this error message: 1151 A conflict exist  with definition dtText2 in namespace internal. WHAT I AM DOING WRONG?  And do I need another set of code if I am using the same font but instead of size=15; I am using size=11;?
 
var font3:Font=new Font3();
var dtFormat:TexFormat=new TextFormat();
var dtText2:TextField=new TextField(); 
dtFormat.Font=Font3.fontName;
dtFormat.size=15;

[Code]...

Why is it giving me error 1151 A conflict exist.....?  I have tried changeing the name of my var dtText2, and I even instance my dynamic Text, naming it myText2 but I continue to get errors.

View 5 Replies

ActionScript 3.0 :: Error 1151: A Conflict Exists With Definition My_flvPb In Namespace Internal

Apr 21, 2009

Keep getting this: 1151: A conflict exists with definition my_flvPb in namespace internal.
 
The AS is: 
import mx.video.FLVPlayback;
var my_flvPb:FLVPlayback;
my_flvPb.autoPlay = false;
my_button.label = "Seek to point2";

[Code]...

View 1 Replies

ActionScript 3.0 :: Error 1151: A Conflict Exists With Definition IArea In Namespace Internal

Oct 27, 2011

I am developing an application where the user chooses the game he wants to play. In my main timeline I have a different layer for each game(movie clip). Movie clips - games - have some common function/variable names with totally different implementation.
When I try to compile I get the :

Code:
...1151: A conflict exists with definition iArea in namespace internal.

I unchecked 'Automatically declare stage instances' option on stage settings.There are 30 errors of this kind and there will be 6-7 games so coming up with different names will be a real pain.

View 3 Replies

Flex :: Flash - Error:- 1151: A Conflict Exists With Definition Obj_inst1 In Namespace Internal?

Jun 16, 2010

I have wrote a function like ,

private function addSelectedFunc():void
{
/**

[code].....

View 1 Replies

ActionScript 3.0 :: Using Loadmovie - Get The Error Code : 1151: A Conflict Exists With Definition Loader In Namespace Internal?

Jun 26, 2008

i dont know if its me but have things got alot more complicated? i have made 4 .swf's that all work fine individually. i have 4 scenes that each .swf is to load into and play in turn when the main movie loads in.before the loadmovie code was:

stop();
unloadMovieNum(2);
loadMovieNum("fcbp01.swf", 2);

now however i have been advised to use:

var request:URLRequest = new URLRequest("achange.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);

this does not work and i get the error code: 1151: A conflict exists with definition loader in namespace internal.var loader:Loader = new Loader();.

View 3 Replies

ActionScript 3.0 :: Error 1151 "A Conflict Exists Within Definition XmlReq In Namespace Internal"

Oct 16, 2011

I already have a couple discussions active regarding some duplicate script troubles I am having, but felt I needed to start a new one... I have two slideshows inside of one Flash site. I have been receiving "duplicate function definitions" all over the place as a result of both slideshows having similar script. I've managed to remedy most of these with some different naming devices. But I am not sure how to get around this latest....

The latest is a 1151 error "A conflict exists within definition xmlReq in namespace internal." for the clearing that up, Flash! These are the two conflicting lines of script - which reside in separate "label" sections actions layers - below. I am not sure why I'm getting an error, as you'll see I've got distinct xml file names in them:

[Code]...

View 8 Replies

ActionScript 3.0 :: Error "1151: A Conflict Exists With Definition Bg_mc In Namespace Internal"?

Apr 3, 2007

I am migrating one of my project to AS3.I have a structure of one main movieclip attached to class MainApp, which is having some movieclips each of those attached to some classes (say MyItem class). Now I am getting two problems,

1. I have some simple movieclip in my MyItem movieclip. The instance name say bg_mc. Now in my MyItem class in AS2 I used to write something like : private var bg_mc:MovieClip;

and then make visible true or false depending on some action.If I am trying to do the same in AS3, it is showing me error saying :

"1151: A conflict exists with definition bg_mc in namespace internal."

If I am attaching the movieclip using addChild then it is fine. But for my app this will be a hectic job as I have atleast 40 of such items and the shape are different. So I have manually placed those movieclips inside whatever designers have given me. Can't we have simple movieclips in a AS3 class without doing addChild?how to call a method from MyItem to MainApp.In AS2 I used to call something like

_parent.onItemSelection (this);

In AS3 the same is throwing some error though I have the method in my MainApp.as file.Both my classes are extending MovieClip class.

View 8 Replies

ActionScript 3.0 :: Control Sound - Error "1151: A Conflict Exist With Definition Mysound In Namespace Internal"

Jan 18, 2010

Iam trying to control my sound via AS3.  My code looks like this:

[Code]...

I gives me an error code:1151: A conflict exist with definition mysound in namespace internal. I and also the website doesn't function properly like my intro movie doesn't play and then it skips thorough everthing else.

View 5 Replies

ActionScript 2.0 :: Slow Reaction On Function?

Aug 21, 2002

it's quite hard to explain, especially cause i'm not a native english speaker.. i've uploaded my >fla< and the >swf< as wellplease have a look at it. when handle 1 is being dragged, handle 2 swings elastically on one axis around handle 1.in case of dragging handle 1 (upper) everything is just perfect. but when i drag handle 2 (lower), the movement of the line, which connects the two handles all the time, is slower than the movement of handle 1.why? both handles have got (basically) the same code.

View 6 Replies

ActionScript 2.0 :: Loading GIFs Into MovieClips... No Reaction?

Jul 28, 2005

I'm using the following code to load two gif images into two movieclips

//---------------------------------------'
var team1_img_file = "hamburg.gif";
var team2_img_file = "gladbach.gif";[code].....

The gif images are in the same folder as the flash file- does flash require a physical path / full address?The facts:

- I receive no error.

- "_layer2" does exist and is not obscured by anything.

- using "this" instead of "_layer2" gets the same result.

- the images don't show up.

View 3 Replies

ActionScript 2.0 :: Visualised Reaction To A Dragger/slider?

Jun 8, 2011

set up a draggable slider in Flash CS4 that, when dragged through 10 years (1990 - 2000) will make a series of circles grow or shrink accordingly.

View 3 Replies

ActionScript 3.0 :: 1151 Errors In Lines 31 And 32?

Sep 2, 2011

1151 errors on about line 32 and 33, cant find the problem

View 9 Replies

ActionScript 3.0 :: Create A Game Similar To All The Reaction Time Games?

Oct 25, 2009

I want to create a game similar to all the reaction time games out there, with the difference that my game has a set amount of time that you as the player will have to guess when it occurs (with a simple click). Each player has a number of tries where the closest time from the set time wins.

View 1 Replies

Professional :: Create A Mouse Reaction Similar A Animation In The Web Site ?

Aug 9, 2011

how do I create a mouse reaction similar a animation in this web site http:[url]...

View 2 Replies

ActionScript 2.0 :: Game Developing And Isometric Design And Reaction Please Respond?

May 27, 2004

I is chuckmul again. I am starting a new game of war stratigy. It has an Isometric veiw point. I was just wondering how I could first make the I sometric grid using flash and second make a fully interactive enviroment

View 7 Replies

Flash :: Getting An Error #1009 On A Timer Variable

Feb 22, 2011

I'm having Error #1009: Cannot access a property or method of a null object reference. I'm not exactly sure how to solve this problem myself, I've traced to see if the object var enemySpawnTimer:Timer is actually null and it isn't. So I don't understand why I'm getting this error.

Anyway here is my code, it's a class I use to spawn blocks that fall from the top of the screen to the bottom and is removed from the stage once it reaches the bottom of the screen.

[Code]...

View 2 Replies

ActionScript 2.0 :: XML Slideshow - Delay Timer Error?

Mar 14, 2006

There seems to be a time delay problem when the slideshow is playing. It will start playing, but as soon as I click on the next or previous button to view another clip it will mess up the delay time and screw up when the pictures will play. Is there a way on how I can fix this ... I attached a link to see what is happening. The following script is what I have playing for the images.

View 6 Replies

Actionscript 3.0 :: Error When Manually Entering Timer Delay

Jan 16, 2009

In addition to a timer i'm making I simplified my code, but i'm running in to an annoying problem when I try to input the Timer delay manualy. I want to enter the speed and the number my timer needs to start running trough an input textfield. The counting number is no problem, but when I try to do the same with my delay it wont take it. Is there a way to get around this? I keep getting this error[code]...

View 3 Replies

ActionScript 3.0 :: Error 1065 - Variable Timer Not Defined

Dec 30, 2009

I've been practicing this tutorial: [URL] (Using the Document Class - how to use this new feature in Flash CS3 which makes OOP much easier.), and made my DocumentClass.fla and DocumentClass.as file. Both files reside in the same folder, D:Work\_FLA.
I have set all data that are pointed in tutorial - DocumentClass name in "Document class:" section in Document properties, ActionScript 3.0 language for .fla, "Star" as a movieclip name and Class in Symbol Properties.

And my as file is like:
Code:
Select allpackage {
import flash.display.MovieClip;
import flash.utils.Timer;
import flash.events.TimerEvent;
public class DocumentClass extends MovieClip{
private var time:Timer = new Timer(100);
[Code] .....

Unfortunately, I get:
ReferenceError: Error #1065: Variable timer is not defined.
at DocumentClass$iinit()
In Output panel every time I try to export movie.

View 5 Replies

ActionScript 3.0 :: 1151: A Conflict Exists With Definition Timer_txt In Namespace Interval

Dec 5, 2010

I'm pretty dumb when it comes to AS3. I've never really done any coding before AS3, so it's pretty tough for me.

Anyways, this should be easy for someone nice to fix. This is just a simple timer that I can't get to work.

[Code]...

View 2 Replies

ActionScript 3.0 :: Error #1009 When Goto The Next Frame When The Timer Is Finished

May 11, 2009

In a game I'm creating, the only last part I have left is to create a timer. Or a countdown to be precise. But I get thrown an error when I go to the next frame when the timer is finished.

[Code]...

There must be a way that works so that flash will "gotoAndStop(2);" after 3 minutes?

[Code]...

View 1 Replies

ActionScript 3.0 :: Preloader Class Timer - Keep Getting Error Message After Simulating A Download?

Sep 21, 2010

I recently switch from AS2 to AS3 (too late - I know) and bump into (probably easy) problems now and then. I'm making this preloader in a class - I read that this might not be a good idea to put it in a class (?) - and I'm using a timer in it. But I keep getting this error message after simulating a download:

Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MethodInfo-7()
at flash.utils::Timer/_timerDispatch()[code].........

View 5 Replies

ActionScript 3.0 :: Timer - Implementing - Error 1120: Access Of Undefined Property TimerForSounds

Apr 10, 2010

First time with a TIMER and get the error message. 1120: Access of undefined property timerForSounds. BUT I have imported the correct classes I think and the code is exactly the same as I see it everywhere else. It is pasted in my document class.

[Code]...

View 1 Replies

Actionscript 3.0 :: Test Reaction Time "how To Create It"

Feb 18, 2009

Does anyone have any idea of how I could create something like this? Here's the link:Now, I'm not too concerned about giving the user multiple times to try but I would love to know how this little flash game calculates your reaction time.

View 7 Replies

ActionScript 3.0 :: Circle Circle Frame Independant Collision Reaction?

Apr 10, 2010

Trying to do circle circle collisions via math which I'm really having trouble with. One circle (player) just moves from keyboard. The ball reacts to the player. All the code shown is in my players class and I passed in a reference to the ball.

On my enterframe I have:

Code:
var xmov1 = xSpeed;
var ymov1 = ySpeed;
var xmov2 = ballRef.xSpeed;
var ymov2 = ballRef.ySpeed;

[code]....

Perhaps I'll go with a box2d equivalent instead of trying out my own physics shenanigans.

View 2 Replies

Flash - Timer Object With TimerEvent.TIMER Event Globally Accessible To All Objects?

Feb 16, 2012

I am working on a very simple game in Flash. I want to make all the animations framerate agnostic, so that I can change the framerate without affecting the flow and speed of the game.I read somewhere that if you want to do that, you simply create a Timer object and attach an event listener to this timer.

What if I have many objects that have to listen to the same timer? See the code to understand what I am trying to do. At this stage nothing breaks, but the event does not fire.Here is the Main class, the one that runs on swf execution:

public class Main extends MovieClip {
private static var _stage:Stage;
private static var _timer:Timer;

[code]....

View 1 Replies

Actionscript 3 :: Error #1006 RemoveChild Is Not A Function. Timer Delay RemoveChild

Mar 29, 2010

I'm trying to build a conditional statement that will addChild and removeChild at different Timer Delays. Before I go any further, I thought, I should mention that I'm usinig TweenMax to ease the alpha of ease Child from 1 to 0 and back during the process to imitate a fade-in/out.

I'm getting issue with only one line - inside a conditional statement.It's running "OK". The movie runs as I want it, but the remove/addChild transitions are not at the speed I want it at. I am getting an error message in the output, but other than that, the movie runs fine.

stop();
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;

[code]....

View 2 Replies

ActionScript 3.0 :: Flash Sound With Timer - Error #1034: Type Coercion Failed: Cannot Conv?ert Flash

Dec 18, 2010

I'm trying to play a sound after a 3 second delay. I'm getting the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::TimerEvent@3e021971 to flash.utils.Timer.at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Code:
var birdTransform = new SoundTransform(1,0);
var birdStartTimer = new Timer(3000, 1); //milliseconds (1000 = 1 second), fire 1 time
birdStartTimer.addEventListener(TimerEvent.TIMER, playBirdFunc, false, 0, true);
birdStartTimer.start();[code]....

View 1 Replies







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