Actionscript :: Commands To Check Duped/multiple Mc's?
Apr 28, 2010
Currently I'm working on a platform type game. I have a for loop in place to check weather or not the players feet are touching the ground. I had this;
[Code]...
This works fine only if one of the floors exist(IE if floor1 is on the stage, but floor2-5 aren't); So to try and counter it I tried using;
[Code]...
But to save myself time, and to give myself the ability to add floors without altering more then i<5 to the amount of floors I have, I would prefer a easier method hopefully something to do with for loops.
I have a .swf that opens in a popup. At the conclusion of the clip, I have a button. I would like the button to redirect the parent window and close itself.
I am doing a flashlite project (AS2) for an embedded application and am having trouble figuring something out. I want a single instance of a menu button that I can move with keyboard cursor presses to specific locations on the Y axis. Figuring out that part was easy but I am stumped on adding multiple commands to the same button.
The initial script I am working with is:
on (keyPress "<Down>") { import mx.transitions.Tween; import mx.transitions.easing.*; var xPosT:Tween = new Tween(high, "_y", regular.easeOut, -234.8, -186.8, 6, false); }
[Code].....
To tell it that if the button is at -186.8 go to -135.6. So obviously I am having trouble using keyPress "<Down>" twice. What would be the best way to approach this? I would like to have numerous keyPress "<Down>" and keyPress "<Up
I have this code on a button that relates to AS elsewhere in the movie (this works fine, BTW):[code]and I want to add the following to the same on (release) command:[code]But I don't know the proper syntax to make both work.
I am trying to read a XML file and check a parameter for duplicates of that parameter in the file. There could be up to 200 entries with this parameter which is a number. How can I check to see if there are any duplicates?
so how can I check for multiple same listeners? what if I have few same type listeners registered with different functions and I wan to do different actions?
Is it possible to make a multiple switch to check more than one case at a time? I'm trying to use a case statement to check both frameName and buttonNumber to check boxes ticked for multi-choice quiz (there can be more than 1 ticked per question).
I've used various combinations but they only partially work. This is one of the latest (I'm still tinkering).
I have three movieclips mc1 mc2 and mc3, my requirement is if you click them in the right order, it will trace ok, else in any order it will trace not ok. but how can I do it. I tried if and function together but it didnt work. there a short way to check a mc is clicked ( like a switch on swithc of logic or if mc clicked ??)( or how to check if a function is activated once)???
I am trying to check 3 scores at once. Is there a better way to code this... I want to check to see if they are all tied? If one score is greater than another? Seems like there should be a more cleaner way.
I am new to writing ActionScript and I'm designing a customer form for my web site. I am using multiple textInput's, Dropdown boxes and check boxes. Here is some of the code I have now for this form: [URL]. Code: package{ import flash.display.*; import flash.events.*; import flash.text.*; import flash.net.*; [Code] .....
I have been reading these forums for like 2 months, thus i never felt like being able to post something as a valuable answer to someone's problem, since i've been AS3ing for like 3 months now. I have a small problem here on a game that i am trying to create. I am trying to make a shooter game . Like the ones u kill enemies and then the the level advances ( imagine the pseydomovement depth feel of the background giving the player the taste of further movement of the field , yes like old airplane games ). Ok to the point.
1) created a main .as where all the code is running. The movement of the player is written there also. no problem with that. 2) created a bullet class where i assign the bullet speed and i check for the collisions with enemies. the problem occurs somewhere here i have created a statement where every some time ( like 0,5 secs ) an enemy appears and takes a random road till the stageHeight . here is the code .
[Code]...
So when all 5 mikros are out i start firing them . BUT only the last child of mikros seems to follow the hittestobject procedure of my code. Which means that if all of the 5 mikros are on stage the one with the smallest .y value will disappear when hit by "sfera". I know it is huge but this pains my head for like 1 week and i cannot think anything . Tried some staff. but i do not know if this is proper thinking or if my programming is proper for this and i must redo all.
I've had flash for a long time now but I've only decided to take a good look at it recently. I was looking around the net for tutorials and the like when I came across an interface that was only 50k by Synez. I don't know if you guys have seen it, but it looks larger than 50k to me, yet it's not. I downloaded the .fla file and looked at what the designer used the if tag a lot on the buttons and even certain frames. I guess this way he didn't have to remake anything and this contributed greatly to the file size since he reused existing movie clips.
Say for example that I make a movie clip where the buttons shoot out from nowhere. From this movie clip, I want to target another movie clip, the one with the content on it, without having to add anything to the buttons' movie. know how to use the "if" tags.
See [URL] Now there is a button called Answera, which when clicked should have a symbol (movie clip) called Check appear at the cordinated specified. Check exists in the libary (but does not have an instance name) and no where else on the stage. when I run this code I get: 1180: Call to a possibly undefined method Check. -> var rightCheck = new Check(); How is it undefinded if it exists in the libary?
I have BUTTON_A inside MOVIECLIP_A on frame 1 this script on BUTTON_A is:
//goto the root and goto frame2 on (release) { _root.gotoAndStop(2);
[Code]....
THE PROBLEM: I cannot get flash to do both commands from BUTTON_A. When BUTTON_A is clicked, its supposed to goto frame 2 AND show a blue square (just a simple graphic) AND loadMovie into the container 'MOVIECLIP_B'
I can't seemed to get both commands to work simultaneously. DId I write this script incorrectly?
The execution of JSFL files seems to have slowed down in Flash CS5. Or, at least, the updating of the display has been severely slowed down. I have a command I use all the time -- so much that I don't even think about it -- that worked fine in CS4 and earlier, but in CS5 it seems to execute too slowly. My command is a replacement for the "Step Forward One Frame" and "Step Backward One Frame" commands in the control menu (the "<" and ">" keys). I wrote them so that the selected symbols remain selected when going to a new keyframe. Of course, I use this all the time just like I did with the original "<" and ">" keys, and they need to run fast enough that I don't notice their execution time. They don't do that much processing at all, so it really shouldn't be a problem.
I also wrote some functions for profiling, and they indicate that the command is actually running in a reasonable amount of time (around 50ms). When I run it again immediately, though, the execution time balloons to about 300ms. Not only that, but in both cases the display takes its sweet time updating itself. It seems to wait until all activity is finished, and then updates. This means that when I execute the command repeatedly (keyboard-scrubbing the timeline) I don't get to see the current state of the stage until I stop completely and wait for it to update.
As I said before, I never had trouble with this in CS4 and earlier. So my question is: is there any way to tell Flash to update its display in a command, so that I don't have to wait for Flash to get around to it? Relatedly, is there any way to give the javascript interface a higher priority so it'll execute commands faster? keys). I wrote them so that the selected symbols remain selected when going to a new keyframe. Of course, I use this all the time just like I did with the original
We have a web-framework with Flex and Java, whose basic functionality is to execute commands at the background(Unix) and parse and send it back to the client(Flex). This works fine for all silent commands.
We are using Runtime,process to execute commands at java side on request from flex side. The same we need to do for interactive commands/scripts as well.
The following is my codes. This is still work in progress; so, you will see some functions with empty contents. Plus, this is my first Flex application; please bear with me. This is a quiz application that gets the questions and answers to each questions from a ColdFusion web service. There are three types of questions, True or False, Multiple Choice with single selection, and Multiple Choice with multiple selections. So, based upon the question type, the application would dynamically generate the appropriate amount of radio buttons or check boxes for the users to select. I got these working. The problem that I am having is, I am not sure how to check what the users have actually selected. In some other forums and posts on other web site, it said that I can use event.currentTarget.selectedValue to get the user selection. But when I actually do it, I got a run-time error saying, "Property selectedValue not found on mx.controls.FormItem and there is no default value." My question is, what do I need to do to capture the user selections?
I'm trying to reset my flash movie from inside toolbook by sending a variable to flash. I could have two problems: either flash doesn't understand toolbook or my actionscript is just wrong. How should I recieve a the command from toolbook? I've tried alot of different things.
Can we run command prompt commands (like copy, rename etc) from an AIR or flex application?I thought of creating a bat file and running it using fscommand, but that does`nt serve my purpose.
I would like to execute a CMD command from my flex application programmatically. Something like
> mediaplayer.exe "mySong.mp3"
I also tried using fscommand but was not successful. While googling I learnt that its not supported by AIR. I would like to know if there is any other alternative for executing the commands.
I am beginner in FLEX programming , I am trying to implement a very simple LOGIN system using PHP, FLEX, MySQL.
protected function button2_clickHandler(event:MouseEvent):void { var create_new_user:Users= new Users();[code]..........
I have added the "alert.show" to check the sequence , it was really strange to find out the it is executing "6,5,4,3,2,1"..?? Which mean user is created before checking the verification result?
im trying to make a text box in flash... soo when someone types something in one line and hits enter... the line gets executed... how do u do that?? and plus I want that text box to send commands to IRC basically how can i execute irc commands in flash....
I'm making a CD flash projector that exectues on the autorun script of a musician's CD..Anyways, I've gone around and figured out how to disable menus when the movie is running but still the user had full control to resize the window. Does anyone know of a ocmmand that will restrict the user access to window resizing?
how you can pause an actionscript code? I've found posts which explain how to pause animations, but none on how to pause actual actionscript commands .A quick example would be to make a box increase in size (which was done through AS). But when it gets to 100 pixels wide, i want it to pause for 3 seconds before continuing again.
is there a site out there that has a translation from all the common AS2 commands?I'm just learning AS3 now and i have no idea how to do the basic things such as _root.mc.loadMovie("asd.swf"); anymore