ActionScript 2.0 :: Inactivate Parts Of My Code When Testing Different Stuff?
Sep 8, 2004How do I inactivate parts of my actionscript code when testing different stuff
View 3 RepliesHow do I inactivate parts of my actionscript code when testing different stuff
View 3 RepliesI'm looking for a good solution to automate testing of a website, major parts of which are in flash/flex.
The preferred language is c#, but I wouldn't mind java, python or php if the solution on any of those languages is better (meaning, easier to write on, less bugs and more tutorials and samples).
What is the best framework around for flash automation in my case?
I want to create a flash file containing some text given by HTML code. For example like this:[code]But i don't have such swf file. So how can i make an swf file like that? Is there any program for it? Or is there already an swf file for that?
View 1 RepliesI have several skin parts defined in a custom component and I want to execute some code after all parts have been added.Currently, my only idea is to use if statement in overrided partAdded method to test if all parts have been added. Something like this:
override protected function partAdded(partName:String, instance:Object):void
{
super.partAdded(partName, instance);[code]....
if the Flash IDE provides a way to test snippets of AS code without actually putting the code in a frame and playing a movie. In Visual Basic, for example, the IDE provides an immediate window. I can key in something like this:
for i=1 to 10rint rnd():next i
to print 10 random numbers. D
small code for testing a microphone which is written in flex/AS
View 1 RepliesHaving done some programming in Groovy, I know you can write test code in the Groovy console. I classify this as true a scripting language as it doesn't force you to have a class definition. So I'd assume with a name like ActionScript with 'script' in it's name that, you can write a series of statements that act linearly, such as a sequence of variables assignments, their manipulation and dumping out a value.
My question is if this is possible, how do you go about doing it, in order to test some code with ActionScript3? Does the code have to exist in a package?Can the code exist on it's own? (If so, what would the name be you'd give to the source file in order to compile it from the command line?
Would you use mxmlc?
Would you use compc?
I've heard about fsch too. How about that?I also read about a command called 'asc' in R.Braunstein's AS3 Bible 2nd ed (P8), but don't even see this in the SDK bin folders.... So what's that all about? Assuming I've managed to compile this name.as file, how do I execute it and see results? Do I have to run it through a browser and the HTML template, or can I execute from a command line?
Do you have to have a class in the source to bypass this? Can the code block be placed outside a dummy class? If so, does it have to exist in a function? Or can it exist on it's own?Does it have to exist in a code blocks, by wrapping them in curly braces?
So what I'm looking to do now is to actually get that movie clip - in this case an arrow -to rotate around another object - a ship - at a radius of 150 pixels and facing the mouse.This basically means to get the arrow to follow where the mouse goes around the ship - limited by the 150 pixel radius circle it can follow.p.s. This is the code so far:
ActionScript Code:
theArrow.x = theShip.x
theArrow.y = theShip.y
[code].....
I basically need to scale an object up when the user rollsover the button which I have created dynamically already and I need to make sure the object is fully scaled up before I can allow the user to scale it back down again.Ive tried putting 2 tweens (x and yscale) into a function but not sure how to check if the tweens have finished. Im assuming if I check the function is complete it wont take into consideration the tweens may still be running.
View 0 Replies1) I have a set of menus (movieclips) with 2 states: active and inactive (frame labels). I want to be able to inactivate all the menus but the one clicked. Let's say I have 3 menus and that are called m1,m2,m3.
2) The syntax for m1 would be something like this: (all inactivated and then the one clicked is activated)
on(release){
for(i=1; i<4; ++i){
menu="_parent.m"+i;[code]....
I know just doing this down here it works but I want to automate it...what if we had 30 buttons? The problem i menu.gotoAndStop ("inactive"). Menu gets the proper content in the loop..that is.. _parent.m1 , _parent.m2, _parent.m3.
/
_parent.m1.gotoAndStop("active");
//_parent.m2.gotoAndStop("inactive");
//_parent.m3.gotoAndStop("inactive");
}
I have a button and inside the RollOver-code I have this if-statement:
if (gprat == 1){
spelaupp("guide2");
s.onSoundComplete = function(){[code]....
But since the user can RollOver many times and start the sound several times I want to add a code that deactive the RollOver and activate it after the onSoundComplete.
I need my buttons to stay put, but, I need to figure out away to make them stop working temporarily. I have layers above themthat become visible, and the buttons underneath these visiblelayers are working, even though they're covered up. Is there a wayto inactivate them, or make the layers above them take precedencewithout changing the button's _visible property?
View 4 RepliesI would need help to inactivate all other actions on movie clips while the active movie clip is running. So in my flash scen when the user makes a roll over on a movie clip I would like that movie clip to play all frames in that movie clip before the user can roll over on an other movie clip. So the active movie clip don't gets interupted. What actionscript 2.0 should I look for?
View 4 Repliesinactivate all other actions on movie clips while the active movie clip is running. So in my flash scen when the user makes a roll over on a movie clip I would like that movie clip to play all frames in that movie clip before the user can roll over on an other movie clip. So the active movie clip don't gets interupted. What actionscript 2.0 should I look for?
I got this tip from another person.
var allowPlay = true;
door_swe_mc.onRollOver = rolloverFunction;
bush_mc.onRollOver = rolloverFunction;
[Code].....
But I can't really get it working. It only plays on of the movieclips once and then nothing more happens. It's like it don't get backs to it initial state, or don't release the allowPlay = false state after the movie clip has ended
I have a movie which when a button is clicked loads an external movie on top of it (just like a popup I guess). The only prob I am having however is that the buttons on the parent movie are still active and I don't want this to be the case.
View 2 RepliesMy setup has several movieclips in different layers. My problem is that .onRollOver, onRollOut and .onRelease functions are still active for movieclips lying underneath. Is it possible to inactivate these functions and then activate them again when it is needed? Or how do I solve this?
View 2 Repliesmy friend make me doing a map (in ActionScript). After the click on the some place in the map starts the redirect, e.g.
Code:
on (release) {
getURL("http://www.yahoo.com/"_blank);
}
I'm not a flash developer, but I would be to want add the every part of the map a identificator, e.g. id="part1"
PS: I have now the map, where every part have some ID. After the click on that ID I call jQuery event 'click' -- and this I need also in the new flash map.. Is it?
I have a one-frame .fla with script on one layer and a movie clip on another. The movie clip has an instance name of "titleBar," which moves from left to right using dynamic tweening.The tween code moves it from an X position of 200 to a X position of 820.Then I have a function called "xChange," which waits for titleBar's X value to be 820. Once it does, I'd eventually want to load an external swf but I'm just running a trace for now.Again, Here's the code.
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
[code]....
I've generated sample xml file:[code]This works ok. What the code is doing - its assigning each node of the xml file to one of the boxes in the fla file.My question is if we can assign to each of the node one box dynamicly? So bassicaly if i will have 5 nodes the code will -draw???- a box and putted the name of the node in the box.And so on, for each of the nodes? And if i will have 6 nodes, then it will draw 6 boxes and so on..
View 6 RepliesI know how to do stuff in flash. Ok, so here's what I want to know..on this guessing game, I want the person to enter in their 1 - 3 digit guess, the the number they need to guess is 577 (later I want to make this random whenever they go to play it). If they guess under 577, I have a box to say their guess is too low. If they guess over 577, it says their guess is too high. However, I am not sure how to make it so that what they put in the text box, it takes it as the new variable. I know this may sound confusing, but here is the .fla file.URL...
View 5 RepliesI have a specific request or a general pondering really.I know you can create a sine wave type thing with as, could you then perhaps create movie clips, letter by letter that would move along and up and down on this sine wave?could you then, instead of setting the size and scale of the sine wave have it react to the input levels of a mic.i've been hunting for something that will help for a while and have drawn a blank
View 5 RepliesI have a function, and inside of it is a LoadVars object to load a variable. The problem is that I need the outer function to return the results of the LoadVars' return.
View 2 Repliesbut this is my first time using flex, and I am kindof confused on how to remove stuff.Say I use <mx:Panel title="test panel"></mx:Panel> to add a panel, alongwith some textfields and such to create form.....now how do I remove all this entirely and create something new like a tabbed navigator?
View 1 RepliesI have a swf named home.swf on the stage of home.swf I've added a Sprite with this code
var onStage:bc_sprite = new bc_sprite();addChild(onStage);another swf called menu.swf loads home.swf into a loader which is added to a MovieClip named currentPage which is on the stage thusly.currentPage.addChild(swfLoader);
Have a little homepage, where I load some of the stuff from external swf's. But I have some buttons which is gonna be on top of the external load content, but when I export it the buttons doesn't appear anymore. Underneath I have some AS which I use to load the the external content, and to control my buttons.
stage.addEventListener(MouseEvent.CLICK, clickHandler_contact);
function clickHandler_contact(event:MouseEvent):void{
if (event.target.name!=null){
switch(event.target.name) {
case "contact_back_btn": gotoAndStop("index");
[Code] .....
I've a XMLList like:
<parent>
<one>
<child id="1" />
<child id="2" />
[Code]....
Where the _loc_1 would be "one" or "two". Is this possible with the getDefinitionByName() to do this?
I have a free text which allows the user to enter stuff. But that text box needs to be a 24bit hex string ONLY.How do I restrict this so that it only allows 24bit hex strings.
Code:
000000
.
.
FFFFFF
I've thought about creating a regular expression to parse the whole string then return a message. But what would be even better is if the thing worked at run time so that the user can never enter an invalid string.
So I've a symbol in my library with 3 things in it: textfield, and 2 movieclips (background and icon).
Should I place each item in different layer or i can place them in 1 layer? When should I place everything in separated layers and when not?
how can i make a store for a game where poeple can buy coins?can you guys give a step by step tutorial becouse i dont know nothing aBout MySQL servers.If you have a good book i could read to learn servers please give me the name.
View 2 RepliesI'm writing a Flash game for a class that is supposed to test elementary kids' math skills. After each activity is completed, Flash sends the results to our database (e.g., that 8/10 math problems were answered correctly). If the user is in the middle of an activity and hits our Logout button, we'll send what results they had to the database anyway. But if the user closes out of the browser in the middle of an activity, is there a way to quickly send stuff to the database before the swf dies?
View 2 Replies