What I need is for each of the nodes highlighted in green to return the child Nodes. Example: when I move the mouse over the menu Indoor lighting, the results should be: Indoorlighting | LED 10W> 3W LED> LED 6W
Im trying to get the Total number of images for each project. But it only returns the first image for each project....Do I need to nest a loop within the project loop to get the images for that project?
[AS] function loadXML(loaded) { if (loaded) { projectNode = this.firstChild;[code]......
For those unfamiliar with tree structures, tree structures are usually dynamic lists where every node has a pointer to two other nodes. They are arranged so it makes for faster searching and stuff and are very useful in programming languages that offer direct access to heap memory. Although I don't know if there would be benefits of making tree structures in AS would be of any help but I decided to have a go at it anyway. Since there are no pointers in flash I tried to just replace pointers to nodes with nodes themselves. Such things usually work in java I think because the language just automatically makes pointers for variables.
The dictionary use strict equals(===) for key comparison, how to change the comparison, so I can use my standard for comparison, for example, I have a class named Student:
class Student{ var id:int; var name:String;[code]....
I want Dictionary use id to compare if the two keys are equal, not use strict equal(===) to compare if the key is the same.
i've started to make like a quiz in flash with 218 questions in it! i've made it so the computer will show X amount of random questions.i've already got the code on the buttons so it will jump to a random question, but i'm having trouble with limiting the number of questions asked.
i've got an inputbox so the user can chose how many questions they do and the buttons add 1 each time thier pressed to a different variable.
i've got this code, but it never seems to stop asking questions
on (release) { score = score+0; page = page+1 if( (page == pagemax) ) GotoAndStop(220) if( (page != pagemax) ) myVariable = random(219); //creates a random number between 0 and 5 if (myVariable < 2){ //checks to see if it's value is zero myVariable = 2; //set it to 1 if it is zero } gotoAndStop(myVariable); //goes to and plays the frame. }
I have a couple of mc's that are added to the stage after one another.I want them to have equal space between them.Here i the code snippet with the problem, below is the full code.
Code: for each (var link:XML in settingsXML.links.link) { i++; newsItem = new NewsItem(); newsItem.menuLabel.text = link.@name;
What's the best way to sort an array while making sure that elements of equal value stay in the same position?
When I do something like this:
var i:uint; var myArray:Array = new Array(); myArray.push({num:1, type:0});
[Code].....
The objects that have equal num values swap places everytime I do a sort. So how do I get the sort to not swap the positions of objects that have the same value?
Then how do I make it so all the children added are equal distance apart? I know I can set the X coordinates for each one,but I want it so that the objects can be added in any sequence and then be set to equal distance apart.
If I want a a random number not to be equal to a number in an array so that the random number dose not repeat itself.Or if can't be done with an array how would you get a random number to randomly generate numbers but not repeating itself?
I have a movieclip called background_mc; this movieclip contains 20 different movieclips each loading content. This works so far. When the minus key is pressed the background movieclip scales to 25% [this works] while scaled down the movieClip can be dragged around[this works]. I should note that while the movieClip is at 25% if a nested movieclip is clicked(onRelease) it tweens to 100% at the correct cooridinate. The problem is that after the movieClip is scaled back to 100% it can still be dragged whereas I only want it be dragged when scaled down.
If you look at schematic's site I am trying to achieve something similar. [URL]
This is my code so far
Code: Select allvar minusKey:Object = new Object(); minusKey.onKeyDown = function() { if (Key.isDown(109)) {
I'm having some troubles with the use of interface and inheritance in AS3. I've done lots of OOP in the past and what I'm trying to do seems obvious to me, but doesn't work in AS3. The question is : Is it possible to override a function that return an Object of class A, and make it return an Object of Class B which extends A ? It seems not to be possible, since I'm getting a signature error in Flash, when compiling. For example, the following set of class do not compile (the code in function definition doesn't matter):
Is there a way to write an "ANY" conditional statement? For example, I want to write an IF statement that if the user presses ANY of 10 specified keys, I want to execute the same bit of code.However, the only ways I know to accomplish this is by
1) writing a switch statement, which seems unwieldy because I'll have 10 separate cases which all duplicate the same [code]...
Is there a better/faster/more efficient way to check if a variable is equal to ANY of a set of values?
The Problem I have is that I need to enlarge my Movie from the standard 550 x 400 to an equal proportioned 825 x 600.But when I do that it only enlarges the one Frame that I am on in that moment. How can I enlarge everything at once?
how to scale a SWF in the browser window, but not larger than the original stage size in the FLA file? For instance, I've designed a course in Flash with stage size of 1024x768 in Flash. In the published HTML document, I change the following values:
'width', '1024' changed to 'width', '100%' 'height', '768' changed to 'height', '100%' 'scale', 'noscale' changed to 'scale', '100%'
These changes in the HTML source code allow the SWF to size with the browser, but I don't want the SWF to grow larger than 1024x768 if the browser window is greater than these dimensions. I want the max size of the SWF to be 1024x768 regardless of the browser window.
how to achieve this in the HTML source code and/or AS2?
A slideshow containing advertisements, randomized in a way that each ad gets the same chance at being the first one to show when the page gets opened. Or rather, not randomizing, but alternating between about 25 different ads, perhaps even more
basically i have this jigsaw code, and i need to modify it so that the only jigsaw piece that will be accepted is the answer to a question which is randomised as follows,
var child1:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); var child2:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); var same:Boolean = (child1.parentDomain === child2.parentDomain); trace(same);
Is there an easy way to compare two TextFlow objects with each other? I have two text flow objects that are created with TextConverter.importToFlow() and want to check if they are equal or not. Only way I found so far is to use TextConverter.export() to export them to a string then compare which seems bit convoluted...
My dynamic text box is set to: _root.selectedcolor but instead of displaying "Rose" it displays"_root.fabric01_chip10_name" Basically I need to get the literal value to equal an expression- how do I do this????? I've done this before, but it's slipping my mind.
I am building a horizontal navigation and I am having trouble getting equal spacing between the mc's. Inside the mc's there is a text box that will contain different titles.