ActionScript 2.0 :: Functions Not Working Together

Oct 19, 2004

I have these two functions which both happen on an onEnterFrame event;"basichittest" and "photo". They each work by themselves, but not together.I attached the fla file.I commented out lines 6-10 and line 58.I want the red dot "photodetector" to get brighter as the mirror slides to the right. I also want the beams of light to bounce back and forth when the drag happens.If I uncomment the offending code, the beams no longer bounce, but the dot behaves the way I want.

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Var And Functions Not Working?

Nov 30, 2009

Flash won't let me access my functions or variables. And I can't figure out why. Do I have a syntax error?

package {
import flash.display.MovieClip;
public class Base extends MovieClip {

[code]......

View 4 Replies

ActionScript 2.0 :: Functions Not Working Together?

Oct 19, 2004

I have these two functions which both happen on an onEnterFrame event;"basichittest" and "photo". They each work by themselves, but not together

I attached the fla file

I commented out lines 6-10 and line 58.

I want the red dot "photodetector" to get brighter as the mirror slides to the right. I also want the beams of light to bounce back and forth when the drag happens.If I uncomment the offending code, the beams no longer bounce, but the dot behaves the way I want.Can I only have one function on enter frame?

View 3 Replies

ActionScript 3.0 :: CS4 - Rollout Functions Not Always Working

Jul 14, 2009

I have these little menu tags which move down when you roll over them. Then, if you click one, it stays down. Then the other menu tags move down when you roll over them, until you click one, at which point the previous tab moves back to original position. (I'm sure that makes little to no sense... so look here: [URL]. Anyway, it works great for the first couple of seconds, then after a while (especially after a click) some of the menu's don't return to their previous position. My fla is attached, but here is my script.

PHP Code:
//import classes
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import flash.display.MovieClip;
[Code] .....

View 3 Replies

ActionScript 2.0 :: Two Functions Not Working Together OnEnterFrames

Jul 29, 2009

I have two functions that work individually, but not together because they're both onEnterFrame functions for the same mc (which is not possible).

Here's the code from the mc "A" class file:
Code:
function onEnterFrame(){
removeA();
connectT();
}

This works until the next function runs...
function removeA(){
if (this._x < 500){
removeMovieClip(this);
}} var strandID:Number
function connectT() {
[Code] .....

Explanation of code: mc "A" hits "strandT" and the two move together across the screen. Mc "A" needs to disappear when it hits x = 500.

View 2 Replies

ActionScript 2.0 :: Working With Two OnEnterFrame Functions?

Nov 5, 2011

How can I combine these two functions without any of them failing or interrupting each other.

[Code]...

View 6 Replies

ActionScript 3.0 :: Nested Functions Not Working?

Mar 14, 2012

I initially posted this in the AS3 NEWBY forum but I think it probably belongs here. On stage I have 5 boxes, the letter A and two buttons labelled button1 and button2. The letter A is also defined as a button labelled AA_btn. When I click on button1 I want a condition to be set so that if the letter A is clicked, boxes 2 and 4 will disappear. Conversly if I click on button2 I want boxes 1, 3 and 5 to disappear. To do this I have nested the letter A and B functions under the button1 and button2 functions.

I also have a reset button which resets the display of all five boxes back to their original display.Everything works fine when I press Button1 to set the first scenario. When I then click on the letter A boxes 2 and 4 disappear. (perfect). Everything also seems to work when I press the reset button, ie: all five boxes reappear.

[Code]...

View 2 Replies

ActionScript 1/2 :: KeyPress Functions Not Working On PC?

Jun 21, 2010

I'm having a problem with PC applications. Notably, the keypress command no longer working when my app is fullscreen. It works just fine on Mac, but bugs out and doesnt recognize and of my KeyPress actions when fullscreen. When its not fullscreen, it works. I dont know what to do, as i need my apps to play fullscreen on both pc and mac.

View 1 Replies

Actionscript 2.0 :: OnRelease Functions Not Working

Oct 12, 2010

I have a serious situation regarding the onRelease Funciton not working properly.I have a FVLplayback componant inside a flash project inside a movie clip. Inside that movie clip I have two layers, One for actionscript and and the other for the actual component which contains instance name of 'myPlayer' (without quotes)[code]That cameraRoll is the instance name of another movie clip I have located in the movie clip as shown in path above. Inside that movie I have rollover, Rollout effects. The actionscipt is in an invisible button right on top of the objects. The actionscript is:[code]The objective: the movieclip to carry out the rollover Rollout effect and to have the function that will start the video.The Problem: When I run the flash project, it does the effect but won't start the video. If i move things around, I can have the video start playing but then the button won't do the rollOver, RollOut effects.

-the path to the video component:-root.menu.video

-the path to the movie clip taht contains the timeframes for rollOver/rollOut effects )which contains invisible button on top of everything. root. menu.cameraRoll

View 1 Replies

ActionScript 2.0 :: Button Functions Not Working?

Sep 14, 2006

i have a lil problem with making button functions to work on a mc within a mc...i have this on my outer mc:

Code:
onClipEvent (enterFrame) {
this.onRollOver = function() {

[code].....

View 6 Replies

ActionScript 3.0 :: Button Functions Not Working Properly?

Oct 17, 2010

I'm putting together a pretty basic website/portfolio. The buttons/code that go from page to page work great. The code I'm using to access larger images from thumbnails is basically the same, however it's not working.I have the site setup so that each larger image is it's own separate page, so basically the thumbnails act as buttons to access a specifically labeled page. Ex- Thumbnail/button "Character1_btn" goes to the page labeled as "Character1" to display the larger image. I hope this makes sense.Below is the code I'm using. As I said- all functions but the character1 function are working properly.. I really need the character 1 function to work.Quote:

stop ();
home_btn.addEventListener(MouseEvent.CLICK,playhom e);
function playhome(event:MouseEvent):void{

[code].....

View 2 Replies

ActionScript 2.0 :: Flash To Php - Functions From GET To POST - Not Working

Jan 20, 2007

The form is inside a flash site. the actionscript on the "submit" button is as follows:

[Code].....

I have been up now for 30 hours trying to figure this out and my wife is complaining that my eyes are getting bloodshot. I've played with every variation of these codes as i could think of. Changed all the variable names, changed functions from GET to POST, removed the HTML to simplify the php... nothing works... what am i missing?

View 1 Replies

ActionScript 2.0 :: Assigning Functions To Buttons = Not Working

May 20, 2008

here's the essence of what i'm doing:

[Code]....

View 9 Replies

ActionScript 3.0 :: Flash As 3.0 Volume Functions Not Working

Feb 17, 2011

This is the code am using to create a mp3 player,everything is fine but the volume controls,not able to mute or increase the volume,kindly tell whats wrong in the code

import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;

[Code]....

View 1 Replies

ActionScript 3.0 :: Nested Functions And Tween Classes Not Working?

Feb 18, 2009

For some reason I can't get this nested set of functions to work, it executes the first tween and the tween invoked after motion of the first is finished but it doesn't ever get to the third!

ActionScript Code:
var t1:Tween=new Tween(p1,"rotationY",Strong.easeOut,90,0,50,false);
var t1x:Tween=new Tween(p1,"x",Strong.easeOut,-900,0,50,false);
t1.addEventListener(TweenEvent.MOTION_FINISH,onMotionFinished);

[Code].....

View 3 Replies

ActionScript 2.0 :: LoadClip Button Functions Stopped Working

Oct 23, 2008

created a .swf that continously scrolls with a pause and play button with only actionscript. The file was too large so I created a preloader in a seperate file loading the .swf with loadClip, but the buttons on the .swf stopped working! What do I need to do to get the buttons working again? I'm completely baffled.

[Code]...

View 1 Replies

ActionScript 3.0 :: Functions Aren't Working - How To Make It Work

Jun 25, 2009

I have one function that for some reason, isn't calling the next function. I've been looking over this code all day and I feel like it's probably going to be something really small and stupid but I jsut really need help at this point. The function that isn't working is showUsers().

This is my code:

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

[code].....

View 14 Replies

ActionScript 3.0 :: Flash Working With Functions In External As File?

Oct 22, 2010

Im trying to understand alittle more about using external files.

In my flash actionscript window i basicly want to access a function that i wish to put in an external .as file ... but i just cant seem to get it..

like:

Code:
myFunction();
in external file

[Code].....

View 4 Replies

ActionScript 2.0 :: Calling Functions Of Loaded Mcs Inexplicably Not Working?

Feb 15, 2011

i've got this movie clip. I've loaded a swf called "page1.swf" into a holder called "page1MC". This child movie DID have a button in it called "page1_buttonA" in it when I made it, but I can't get it to do anything once I've loaded it. I recently discovered you can trace movie clips, and the trace below is coming up undefined, which might explain why it's not working. Now, can anyone explain WHY it's coming up undefined?

The code for the entirety of this debacle is as follows:

stop();
//Create empty movie clip holder:
this.createEmptyMovieClip("page1MC",1);
page1MC._x =0;

[code]....

I'm a mostly self-taught actionscript hatchet-artist, so there's a HUGE chance I'm missing something obvious because my knowledge is completely unstructured with large gaps where much foundational learning should be.

View 2 Replies

ActionScript 2.0 :: Flash8 - OnRelease Functions Not Working With Attached Button?

Jan 12, 2010

I'm loading an item to the stage and trying to apply a function to it but it doesn't seem to work.

Code:
_root.attachMovie("FullScreenBTN","FullScreenBTN",_root.getNextHighestDepth());
_root.FullScreenBTN.onRelease = function(){
trace("test")
}

When I press the button nothing happens, but when I remove the attach code and just put the button on the stage with the appropriate instance name it does work.

View 5 Replies

Actionscript 3 :: Calling Functions In Functions And Avoiding The Player To Crash / Hang?

Oct 6, 2011

I have a series of calculations i'm doing over a bunch of objects stored in a array. Each function is pretty CPU demanding but if you only run one function, it just works fine.

[Code]...

View 2 Replies

ActionScript 3.0 :: Import Vs Include - Basic Functions To Be In BasicFunctions.as And The Make A Library For More Specific Functions

Jun 6, 2010

I've got a project thats getting a bit big, so Im taking the actionscript out into separate as files. I want all the basic functions to be in BasicFunctions.as and the make a library for more specific functions. I find that a lot of people use the import statement but I cant get that to work with a simple Hello World trace, yet the include statement works fine (see attached). I understand that import/include work differently, but which is the better method? If import, then is that heavier to work with. Any rate, what's the best way to organise code when it gets to the 1000+ lines?

[Code]....

View 9 Replies

ActionScript 3.0 :: Mimicing The Until Functions - Load Of Global Functions In One File?

Nov 4, 2009

I'm trying to find a way to have global functions in my as project, similar to how flash does with stuff like the util functions (describeType()...), where you can just call the function wherever you need it. For example:

[Code]...

So when I call Test(), it prints out "hello world" fine. My problem comes in that I can't change the name of the Test function, and I can't add any other functions without compiler errors. Is it possible to have a load of global functions in one file, or do I have to split them up into separate files like in the example? Also, I know that I can make a Global class and call static functions like Code: Global.doSomething() but I'd like to know if there's a way to do it as flash does it (describeType(), getDefinitionByName(), etc), or rather, how does flash do it?

View 9 Replies

ActionScript 2.0 :: Call Other Functions From Generic Mouse Event Functions?

Nov 25, 2010

Is it not possible to call other functions from generic mouse event functions?

Code:
_root.myButton.onPress = function(){
hide();

[code]......

View 6 Replies

ActionScript 2.0 :: Functions And Sub-functions - Button Doesn't Work OnRelease?

Jun 17, 2004

I have one function that puts text in a text field and makes a button goto a url onRelease.The code is like this:

Code:
item.onRelease = function() {
myButton.onRelease = function() {
getURL("http://google.com", "_blank");
}
talk = this.txt;
}
the only problem is that the button doesn't work onRelease. i think that it is because there are too many functions there, but at the same time,

View 5 Replies

ActionScript 2.0 :: Multi-functions -values Of (12) And (21,39) Are Lost At The Geo And Geo1 Functions ?

Dec 2, 2004

in this example why the values of (12) and (21,39) are lost at the geo and geo1 functions

[code]...

View 11 Replies

Flash - Add Functions To Playerglobal.swc Or Allow Compiler To Pass Own Functions

Oct 25, 2011

Im adding lot of simple functions to prototypes of top level objects ( Object , Array , String ...) and have 2 questions :

Is possible to add functions to top level's classes in compile-time ?

If not , is there a way to allow this functions to compile ? I dont like to turn off strict mode

ex:

string.removeWhiteSpace();
string.sliceStr("." , "end");
textField.scrollBottom();

this return compile-time error , cause there is no such function , i have to write it in braces :

string["removeWhiteSpace"]();
string["sliceStr"]("." , "end");
textField["scrollBottom"]();

and i like to aviod it )

View 2 Replies

ActionScript 2.0 :: Calling Functions Within Mouse Event Functions?

Mar 16, 2003

Is it not possible to call other functions from generic mouse event functions? Surely it is !!??ie....

Code:
_root.myButton.onPress = function(){
hide();

[code]........

View 11 Replies

ActionScript 3.0 :: Functions Embedded Inside Other Functions?

Jan 14, 2011

Functions embedded inside other functions?  In all my years of ActionScript programming, I've never seen this (this is part of legacy code written by someone else which I am adapting):

[Code]....

View 6 Replies

Actionscript 3 :: Prototype Functions Off Custom Functions?

Mar 19, 2010

Its a complicated senario for me. I have a sound management singleton with an asset like dictionary storing all referances to my urls and assets and the guff inside it-

I have a function called addItem(id:String, url:String):Object

I would love to do something similar as soundManager.addItem(id:String, url:String).play() or soundManager.addItem(id:String, url:String).stop() of which it'll both add my item to my dictionary, and begin playing the sound

[Code]...

View 2 Replies







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