ActionScript 3.0 :: Disable A Function?
Dec 21, 2010I am currently have this script on frame 5, AS3:
var timer:Timer = new Timer (2000,45);
timer.addEventListener(TimerEvent.TIMER, timerFunction);
timer.start();
[code].....
I am currently have this script on frame 5, AS3:
var timer:Timer = new Timer (2000,45);
timer.addEventListener(TimerEvent.TIMER, timerFunction);
timer.start();
[code].....
I'm doing a basic site with frame labels on the main timeline whose name corresponds to the btn names. A simple otoAndPlay(evt.target.name); I have a basic navigation setup of 7 mcs with mouse eventlisteners for CLICK, ROLL_OVER and ROLL_OUT.
Example:
prepare.addEventListener(MouseEvent.CLICK, navigate);plans.addEventListener(MouseEvent.CLICK, navigate);retire.addEventListener(MouseEvent.CLICK,
[Code]....
Does anyone know a better way to do this so when my mcs are clicked they display the rollover content/art? In essence I'm trying to achieve that when the user clicks a btn it goes to that "page" and the corresponding btn stays highlighted. Pretty standard web navigation technique but I just don't know what the best way to do this in flash is and with how my site is setup.
hi,is there disable ctrl+c function? and cutomize this for own function
View 4 RepliesI've got a project that consists of a main SWF that pulls external SWFS via an XML document. Within the main SWF are the navigation controls (i.e. next button and back button). When the next button is pressed, it pulls up the 'next' external SWF called in the XML file. When the back button is pressed, it pulls up the 'previous' external SWF called in the XML file.
The external SWF pages contain different interactions (i.e. drag and drop, multiple choice exercises, etc). Is it possible to disable the next button until the user completes these exercises?
If the navigation buttons were contained within the individual external SWFS, I know how I could make this work, but the XML setup has me confused. My only thought is using the Timer class, but that doesn't ensure the interaction is complete; rather, it just means the next button won't work for x amount of time.
I have a button that when you roll over it a big window pops up, but then when you click on it, it pops the window up again, now its not a problem but i would like to know if i can disable the click function somehow. so that only the roll over works.
I know you can probably use a movie clip and just tell it with actionscript to load when rolled over, but i don't know how
[code]How come I cant disable the button by this function?
View 1 Repliesi have a music player in my shell that plays background music. In swf files that are embeded (two layers in) I have videos playing.i want to make a button that stops the background music. Its too hard to communicate with the music player which is many layers away so i think i should use stopAllSounds.However, after i press it, it also disables the videos. how do i disable the stop sounds function, so that I can play videos, without turning the background music back on?
View 1 RepliesI have two functions, I need one that of them at the start would be disabled and after decent amount of time or when x = 1000, function would be enabled and become active. How can I do that?
View 1 RepliesI have a movie clip and i and coding here[code]...
is there any way i can make this type of function ,like true on and off ? i dont wanted to use removeEventListener
some kind like Move="true" pX=20 if Move="false" pX=0
I have a small client that needs to put information into Flash and prevent people from printing the document out on their printers.
Of course, you can always print anything you see on your monitor (Print Screen and other apps), but I am only concerned with preventing users from printing from 1) any browser and 2) from the Flash contextual menu.
How I can make it so when the right click is pressed the zoom in/out 100% quality and all that does not show.
View 12 RepliesI am designing a graph to allow line drawing. After the user draws the line, they will drag words (movieclips) from a menu onto to the graph. I am not able to turn of the line drawing function, so when the words are dragged another line is created. I tried to turn off the line drawing onRollOver of the word with no luck. Here is what I'm doing.
Draw line function:
var isDown:Boolean = false;var xPos1:Number;var yPos1:Number;var xPos2:Number;var yPos2:Number;
_root.onMouseDown = function() {
[Code]....
i have about 40 buttons in one movie clip called showmcall i have a massive movie clip that covers all of the movie clips , i've tried disabling the buttons by disabling the movie clip :
ActionScript Code:
showmcall.enabled = false ;
but that didnt disable the buttons.
In my Timeline there are two keyframes with some complicated functions, but the mistake lays in several lines. In the first one I have:
ActionScript Code:
stop();
var fadein:Tween = new Tween(pictureOne,"alpha",Strong.easeOut,0,1,true);
In the second one I have:
ActionScript Code:
stop();
button.addEventListener(MouseEvent.CLICK, goBack);
function goBack(e:MouseEvent):void {
gotoAndStop(1);
}
The point is to make the Tween from the first frame work only once after opening SWF and to disable it after using te command gotoAndStop(1); from the second frame.
Can we disable the right click function in Flash?
View 5 Repliesi am working on small project where i find my self stopping at this rateMmm.. this project is dealing with buttons placed in MC name = main.ButtonCon the main i am programing those buttons as if
Code:
_root.main.ButtonC.b5.onRollOver = function() {
this.swapDepths(11);
[code]........
Can we disable the right click function in Flash? How?
View 11 RepliesI have a combo box in my application. I also have a variable called "Status". I want the combo box to be enabled only when the value of the Status variable is 5 or 6. Otherwise, I should not be able to change the value in the combo box. It should have the previous value only.. I had written a click event to disable the combo box. But even though the combo box is disabled, I get the drop down list of the combo box, and If I select some othe value in the drop down,it changes..Only after that it gets disabled.
[Code]...
In my AIR application in Flex 4, I use mx:HTML, and when I navigate to a location like this ut, some websites have "alert" function in javascript like this :lert('hello world!');nd AIR show the message in a box...I just want to remove, or ignore these messages, but I don't know how...
View 1 RepliesWhile a user is in a frame, I have the user press F1 to gotoAndPlay another frame, press F3 to gotoAndPlay another frame, etc. But when the user presses the F1 or F3 function key, they get the IE browser search screen or IE keyboard shortcut. How do I use AS3 to have the action taken when the user presses F1 perform the function within my flash file and not the IE process for the function key?
View 0 RepliesI have a button that I would like to enable and disable a function within my game. The button is called "flashBang". I'm thinking this may need to be done with global variables to make the switch do this procedure. How would I go about scripting this variable? Also I want to be able to target this function during gameplay, if this function is enabled do this line of code - _root.gotoAndPlay("flash");
The code needs to fit somewhere in here i guess.
//hitTest top + bottom wall
if (_root.ball.hitTest(_root.topwall) or _root.ball.hitTest(
_root.bottomwall)) {
_root.yspeed = -_root.yspeed;
_root.audio.gotoAndPlay("flash_bang");
I want to make a scope wich can zoom in on button click and go back to previous stage (zoom out) also by clicking a button.Now i made it work for zooming in (when i click my button it zooms) but when i want to zoom out everything i tried didn't work .Here is the code:
//button for zoom in
zoom.addEventListener(MouseEvent.CLICK,glassMove);
function glassMove(event:MouseEvent):void{[code]..............
I've got a Vector of ViewToActionMap objects, which have following constructor:
public function ViewToActionMap(_forModule:eModule,
_forAction:eViewAction,
_toFunction:Function,
[code].....
Does anybody know how to disable TLF in CS5, specifically, on import of an AI file?
When I import an .ai file into Flash, I want the text to come in as classic text becasue the TLF is to memory intensive and makes my application unusable (the application is very font heavy).
Right now, my workaround is to produce the assets of the file in CS4 and then open it with and convert to CS5. This is fine for the initial build, but is a pain when I need to make updates to the file.
Is there a way to use ActionScript to disable all buttons in a movie at the start of the movie (or at any given time in the movie), and then re-enable them at a certain time? I'm using Flash MX (only version I have access to), and I know how to get to the ActionScript panel and use it for basic things like stopping/playing a movie or jumping to a certain frame, but I haven't figured out much about ActionScript beyond that.
(btw, what version of ActionScript does Flash MX have?
using an FLV, with SeekBar component...works fantastic, but the scrubber clashes with my cuepoints when dragging along the timeline. So i want the scrubber to be inactive. Tried everything but can't get it to disable.disable this, I've looked everywhere, seems a few people have asked here but with no solid response
View 3 RepliesHow to disable Alt F4 in a swf file
View 1 RepliesI know it should be simple, but I can't find a solution to this question.
How do i disable a particular key in AS3?
On the root, I have a movieclip (input). Within it is 1 frame of codes (well, 2 layers, each with 1 frame of code...).
Alongside on the root, I have another movieclip (banana), which has a stack of animation within... the first frame within is labelled "main".
What I wanted was that if banana's current frame was main, then input is untouched (enabled). If banana's current frame WASN'T main, then input is disabled ENTIRELY (everything within is disabled as well, especially the frames of code).
What I have tried was applying this code on a frame on the root timeline:
onClipEvent(enterFrame) {
if(banana.currentFrame = main); {
input.enabled = false;
[Code]....
I looked up some things and they said that enabled false or true only applies directly to the movieclip, and leaves all codes within the MC untouched.
I've made an AIR Application. It definitely has a .swf file. Running the .swf file alone works till a point where user tries to press keys like A, S, D, etc from the keyboard which will not be detected as the .swf if running using a flash player. So inorder to avoid such problem I'd not allow the users to run the .swf file natively. Only if the .exe is clicked it must run. So is there any functions that implement this??
View 1 Replies