This is my actionscript problem (AS2)The aim if this script is to load images from a xml, show them on screan, and when clicking on one of them, show the big one. I know there are a lot of ready-made scripts, but as I would like to learn AS, I try to do it myself.Now the problem actually is the onRelease... in this example whatever the picture i clic, I always get: "clicked on image: 5" as output.. (when 5 images are loaded...)[code]
This is my actionscript problem (AS2)The aim if this script is to load images from a xml, show them on screan, and when clicking on one of them, show the big one. I know there are a lot of ready-made scripts, but as I would like to learn AS, I try to do it myself....Now the problem actually is the onRelease... in this example whatever the picture i clic, I always get: "clicked on image: 5" as output.. (when 5 images are loaded...)
ActionScript Code: ////////////////////////// //PARAMETERS ////////////////////////// espacement = 10;//l'espacement en px entre les images
I am drawing 12 concentric circles, and on each circle I plot dots. When I click on a dot, I need to display a text(I will be displaying usernames).
I have the circles and dots in place. But a funny thing is the mouse events work for few dots and does not for few. I am totally stuck now. Please help. Pasting my code. On running, dots on the left side of the circles show the hand pointer whereas the ones on the right donot work!
i am doing a slideshow with images occuring randomly wch hav clickable links,okay it works but at times the transition is very fast instead of the 8s interval i expect ,when i view the trace() output ,i have noted that at times the timer is triggerd twice or more simultaneously...my code is below...what maybe the cause may u kindly assist i have 21 frames with 21 images
I am making a game where random letters and words are generated into movieclips, thats the background. I built it using arial as my font, however I then decided to go with a fixed width font to make sizing the movieclips to the words much more straightforward. Yesterday this worked fine, the font i am using (Liberation Mono) is installed on my computer, all the textboxes which use this font have the character embedding on them, and I have not changed any of the movieclips, only non-relevant code. So I run it up again today and none of the words appear. Thinking it might be some code changes I made I go thourhg tracing out everything, only to find the wrds are being generated, and written to the textbox absolutely fine. I switch back to Arial just as a check and bang it works again.
The specific problem (first four lines in first for loop) is related to mcName it doesnt have a problem if I replace it to an actual name of a movieclip.
I'm trying to reference mcName to the array that stores the names of the movieclip. In other words I'm trying to generate dynamic variables that include movieclips generated from a multidimensional array.
how to create movieclip variables that get the names of the movieclips from multidimensional arrays.
ActionScript Code: //VarName, mcName, XPos, YPos var row1:Array = ['thisBall', 'thisball', 100, 200]; var multiArray:Array = [row1];
Our client has tasked to dynamically generate grids with different size boxes. The grid should not have defined edges, but each movieclip should have a certain defined border. I'm pretty new to AS3 still, but can handle pretty much everything besides this sort of giant math problem. Here's a simple layout of what I'm looking for on a much smaller scale: [URL].
I can almost emulate this, but sometimes my boxes will overlap, and that's a dealbreaker. If I start hitTesting it works up until I try it with 55+ movieclips, then I fear that the script could freeze. Here's the code that works, but may freeze at times. How can I optimize this so that stack overflow errors can't happen?
package { import flash.display.MovieClip; import flash.display.Sprite; import flash.utils.getDefinitionByName; public class box_builder extends MovieClip { private var _path:MovieClip; [Code] .....
I have very big problem with generating movieClips at the begining of my code I have two preloaders I'm using createEmptyMovieClip method to create them and then I need to attach some movieClips using attachMovie method and thay are uncompatibile... :/ what shuold I do to make this code work properly...
I am generating movieClips dynamically using attachMovie and then using a setInterval to animate them. However, if I repeat the operation the second set of mcs move twice as fast, the third set three times as fast etc. I can't for the life of me work out why.
I'm having a really strange problem with movieclips that use a mask for reflection. On my main timeline i'm creating two instances of a movieclip named 'item'. In item.as i'm calling cacheAsBitmap and setting a gradient movieclip as a mask. When I run the clip I am only getting the clickable hand icon when I hover over the first clip. However, if I comment out 'this.mask = mask_mc' then both clips are selectable.
Main Timeline Code: var item_mc = new item(); item_mc.x = 0; item_mc.y = 100; addChild(item_mc); [Code] .....
I have a movie clip that is dropped onto my main scene, and I have the AS below as the frame's AS.
The concept is simple: Create dynamic empty movieclips, position them, fill them, make them clickable. The code under "//////////////////////////////////////Code below here doesn't work" isn't working. The code worked fine when attempting to do this on my main scene, but I ran across some interface issues that caused me to put them into anorther MC. I understand that I only included the code for the first button, right now I would like to get at least one working.
I'm trying to make 3 sliders that, depending on each other, changes the value of a text-box.
Example, If Slider A moves to 150, the value in the text-box changes to 150.
If you then move Slider B to 40, the value in the text-box changes to (150+40) 190.
Same thing for Slider C.
So basically I want the value of what you select in each Slider to be added together in real time like this:[URL] Only this shows just one slider, and I want three, added together
I have an FLV file but need to generate an SWF to then upload onto the internet (with a play/stop bar)
I have no idea how to do this. Is there a step by step I can access or can someone point me tell me where and what to do!!!! I have CS4
I understand that I need to have all the files in the same folder and then link them all in. I will be uploading onto the website (back of house html) is there a basic code that i can modify that will suit my needs?
I want 16 numbers generated in a row, like a credit card 3456 6765 4564 3453 Is there a good way to do that? The card would generate The numbers when it's loaded.
What I'm looking for is to have a button on the screen. When clicked it will generate a random fact. I'd like to have around 25 facts, although the number doesnt matter at this stage.
I'm only learnigng flash and actionscript at the moment so my thoughts are a bit confused. Would I store all the facts in an array and use the math function to generate a random number that will access the fact stored in the array? not sure how the code would look like.
I'm trying to dynamically create links from data in a JSON file.
I can load the JSON file and extract the data, but I'm not sure how to keep track of which URLs go to which titles.
For example, I create a text box and put the words "AOL Homepage" in it and another that says "Google Homepage". I know their respective URLs are [URL] and [URL], but how do I store that information so that when someone clicks on "AOL Homepage" it knows to take them to [URL]
I considered creating a dictionary that stores Titles and URLs so that whenever someone clicks "AOL Homepage" it looks that up in the dictionary and sees [URL]. However, if there are two equal titles, this method will not work.
This line of code is generating codes for other keys but not the Enter Key trace("key code: : " + e.keyCode); It's like AS3 doesn't know there is such a key. The code should be 13 but on my system according to AS3 it doesn't exist. I'm usind CS4 is this a CS4 bug?
Below I have an array that works but it is far too long and I am thinking there is a far easier way to generate the same result using a loop but I just can't get my head around it at the moment. The array is as follows:
var CardDeck = new Array(); CardDeck[0] = new C1(); CardDeck[1] = new C2(); CardDeck[2] = new C3(); CardDeck[3] = new C4(); CardDeck[4] = new C5(); CardDeck[5] = new C6();
In C++ I Can Read The MAC Address Of The NIC and Use It To Generate A Unique Identifier For Each Computer That Interacts With My Web Service. Even If The User Deletes Their Cookies, And Temporary Internet Files, Reformats Their HardDrive And Installs A Different Version Of Windows, That Computer Still Generates The Same Unique ID.How Can I Create Such A Unique Key Using Flex Or Air? The Number Has To Be Either Hardware Based Or Similarly Tamper Resistant.
I'm writing a simple html page creator that will generate html code on customized settings. Now i want to add a "Demo" button that will generate a html page on the fly for the user to see the end result.
I want to appear one of a set of colors randomly on timer fire using the below code:
var myTimer:Timer = new Timer(1000); myTimer.addEventListener(TimerEvent.TIMER, timerFunction); function timerFunction(event:TimerEvent) {
[Code].....
This works to randomly generate a color, but I want to call one of a set of colors. this.graphics.beginFill only takes a numeric value or a fixed color value.
How would I add the var here to activate my set?
var myArray:Array=new Array("0x000000","0x0000FF","0x00FFF0","0x0FFFFF") ; var i:int; for(i=0;i<myArray.length;i++){
I have an engine for platformer game and I need to generate random blocks while moving and of course delete old ones, when the hero leave pervious position.Here is the code for generating random platforms when the game starts (costructor):
ActionScript Code: public function TheGame() { bla-bla...
[code]....
As you can see, I create a loop which creates 10 platforms in different positions.My goal is to create a function which will delete blocks from the array which are not in the stage anymore and create new blocks when screen is moving up.
I was wondering if anyone could enlighten me as to how I could generate a rectangle movieclip on top of the longest section of a frame of a movieclip using AS3?
If this is the movieclip frame, I want it to find the longest portion of the movieclip on the right.
And then generate a rectangular movieclip on the longest section of the frame on the right side.
(Don't mind the white bg, I just used paint quick, it won't be there)
I can figure out how to generate the rectangle and all of that, but I am confused as to how I could determine the length of the longest portion of the movieclip, and how to tell AS3 to place it there.
I Have started to learn AS3 from scratch and have decided to create a simple maths game for small children. The game consists of multiplication and division. I have everything working accept for this one last thing that I'm just not sure how to tell Flash what to do. Basically there are 2 text boxes that randomly generate a number between 0 and 12. The 3 box is where the user enters their answer. They press check and the code checks to see if box 1 divided by box 2 equals box 3.
However what I want to do is ensure that only whole numbers are used and that the number can actually be divided. I told I need to use this method but I don't know how to implement this in Flash AS3. "For division, the trick is to generate the question, but make sure that the product of the two random numbers is actually displayed in the first box (product / rand1 = rand2) otherwise you get difficult sums..."
Here is my current code: function divSetup(){ displayRandomDivNumber(); }divSetup(); var divQuest1:String; var divQuest2:String; [Code] .....
hi, i'm generating two random numbers, between 1 and 4, which must be different to each other each the two numbers are picked. i've tried the following:
var firstRandom = Math.random()*3+1; var secondRandom = Math.random()*3+1; var boxA = "box"+(Math.round(firstRandom));
[code]....
and i still get two numbers the same occasionally. why isn't it comparing the numbers?
I want to know if it is possible to create a vector based file (PDF) from a web based Flash application. The application would be a 'Design it yourself' type deal, it would just be a fancy text generator. All this will be designed by the user using the flash application.What I want to know is once the user has finished designing their text, can this 'creation' then be exported as preferably a PDF, or Jpg, etc. once the user submits the design?