To illustrate what I'm trying to do I think the best point of reference would be something like the original "The Legend of Zelda" game, that is, a top-down adventure type game, with single-screen areas created using a grid of images.I'm trying to create something similar for a local charity's website, something in which the player can navigate a created area and find out about the charity by interacting with NPC staff.The environments in the above game seem to be a grid of images representing various environmental objects. Up until this point in my project I've only had to add single objects. I'd do that like this:
Code:
// add a single placeholder graphic
public var myStage:Loader = new Loader();
I am trying to make connection between two datagrid in two separate windows.
Until now, I am able to create a datagrid in one FLEX browser window but got stuck furthur.
On some click event in one of 1st datagrid row-column field value, (i.e itemRenderer in form of button), I want to open a new window (using some LocalConnection or ExternalInterface.call) to open another window with the part of the original data grid.
Which method should I use - LocalConnection or ExternalInterface.call ?
I have a grid that is drawn by the graphics library. I have small pieces, let's call them blocks that are the shape of a square. These blocks connect to each other to form pieces. I want the user to be able to rotate the pieces and then snap them to the grid.I've looked at the geometry libraries but I'm unsure how I would get the points of each square in a piece to match it up with the board after it has been rotated
what if i wanted to create varioues grids, depending dynamically, i mean, that maybe one time there will be 3 next 4 stuff like that, and their x and y will vary to that, im recolecting data via php.
I'm assigned to do the portfolio section for my company's website and my supervisor has specifically told me what he wanted in terms of navigation and layout. Basically, he wants each portfolio piece to be square and in the form of 7 x 7 square grids. Each square's dimension is 100x100 px. He wants each portfolio piece to load randomly every time the page loads, so that it makes a shape of jigsaw puzzle-like if the piece is less than 49. Each image needs to be imported externally so that when we have more portfolio, we can simply added it to the array. Each portfolio piece should behave like a button that links to a bigger image.I was able to get it to the point where the squares are generated dynamically on 7x7 square grids ( I used script from "Flash Hacks" book by Sham Bingal) Now I'm trying to develop the script to get it to work like my supervisor wanted.
This is probably one of several ways to do this..."myData" is an array that contains information displayed in "myDataGrid". "toBeMoved" is a variable containing, um, the item to be moved.
btn_up.onRelease = function() { // this is a button to move items UP in the list
whoseSelected = myDataGrid.selectedIndex; // gets the index # for the selected row/item if (whoseSelected > 0) { // makes sure you dont have the already top item selected toBeMoved = myData[myDataGrid.selectedIndex][code]...
It's just a pure curiosity of mine . I'm using flash to create movie clip objects and never thought about creating them programatically. But today I came across this articlevertheless, there's no official explanation of the process.What if I have e.g. 5 images, and I wanna turn them into a short piece of animation. How can I do it using pure actionscript 3?
After a click event I want to dynamically create 2 movieclips with the sequential number in their name, e.g. mc_001 & mv_001 so that I can 'link' them together later on.How can I create a movieclip with a dynamic name?I am trying to use this at the moment:Code:var movieclip["name"+dynamicNumber]:MovieClip = new MovieClip();I can't use an array unless someone can tell me how to access it across multiple classes...
Is there any way to create dynamic animations? Say if I'm creating a game and there might be multiple sprite sheets for different NPC's, would I have to manually create the walking/whatever other animations manually?
I have a problem creating multiple movieclips inside a container mc. The one created later always overwrited the one created immediately before it and ended up with only the last one left in the container mc. Below is the code:
I am new to Action Scripting 3 and am struggling to create movieclips in a for loop. Basically I am trying to create a series for movieclips and add these to my stage based on an array of values.
I'm trying to create a container movie clip, then inside that, create several other movieclips with an image in each and display them with an offset x.It does the offsetting but only displays the last one at the last x.When i dont put the clips in a container it works fine. but i want them in the container so that i can movie the container around on a press.
Heres the code:
var itemsArray = new Array("pic1.jpg", "pic2.jpg", "pic3.jpg", "pic4.jpg"); var clipArray = new Array(); _root.createEmptyMovieClip("carousel", this.getNextHighestDepth());
I have the following code, which should display some square clickable clips over a map. This is done by calling a function (shown below) with arguments. However, when I call this function, only the last box is shown... The clips are drawn on the same level (9000) but that should not be a problem as they wont overlay...functions calls....
Alright, So i have a function which generates alot of the same MovieClip on the stage, however i need to be able to both Hitcheck this MovieClips and Remove them in other functions, so somehow ( what i have attempted here and isn't quite working yet :confused: ) is putting each MovieClip in an array slot, so if you needed to remove them it would be as simple as a For Loop to run through the Array. Also, when i hittest them, optimally since they are all in an array, i could just reference them via MovieClip.Hittest (movieClipArray[i]) i being the instance to remove.
Background for the project, adding and removing colored MovieClips Which are all systematically distributed on the stage. When the player Pushes the # Keys color it would run the construct function creating the MovieClips on screen. After that if the player hit the same color key again, before generating a new layout it will remove the previous first.
Also a key is to be able to hittest the colors against other MovieClips on stage so it needs to be linkable. Right now im attempting that by containing all my generated colors in
ActionScript Code: "ColorContainer"
Currently my color Remove Function has Children Being removing which aren't referenced to the Array, i realize this... But want to get the generation of the Array down before i start cutting away at it.
Here is the code i have so far: For some reason i keep getting:
ActionScript Code: TypeError: Error #1007: Instantiation attempted on a non-constructor. at ColorantConfusion_Current_fla::MainTimeline/frame1()
I have set up a Qwerty keyboard within a swf using duplicateMovieClip() - all works fine. If I have no tabbing whatsoever then I can use the tab key to randomly jump all over the keyboard.
But I would like it to tab in an order. Other buttons at the _root level are tabbing fine but these dynamically created ones are not doing a thing.
The keyboard buttons are created within a movieclip called mcContent which is sat at the _root level, anything within this mc is usually referenced by mcContent. or _level0.mcContent. (if it is being really fussy).
I have an instructions button - if this is NOT included in the tabIndex then the tabbing will work on the keyboard, erratically, but it at least goes there. As soon as I set _root.mcInstructionsBtn.tabIndex = 1; then nothing but the _root level buttons work
I have tried to add the tabIndex when creating the movieclips but this has not worked either. I have tried to set the tabIndex in a copy version where the keyboard buttons are created at the _root level and it functions exactly the same.
I make classes that extend movie clip, but I want to dynamicaly create instances of this class, so I really create MovieClips, but with the added features of the class. How should I create this instances? I want 'this' to be the root of this new movieclip with added features
I am trying to create a movieclip, load a jpg into it, and if successfull, create another movieclip (or even better: create that movieclip right away too), with a textfield in it, and place it under the loaded jpg, depending on the postion and height of the jpg. I tried something like this, but the jpg and text don't show.
Code: this.createEmptyMovieClip("nieuwsfotoMC", 2); nieuwsfotoMC._x = 15; nieuwsfotoMC._y = 194; var loadFoto:LoadVars = new LoadVars();
creating some with the .createEmptyMovieClip() method.you see i have a variable rks and accoding to the amount specified in the rks,i want flash to create that number of movieclips
where I can find a tutorial to create resizable movie clips? The viewer should be able to resize movie clips during playtime... I tried a lot of things... the objects get resized but they just "blow up" from all sides...
I make classes that extend movie clip, but I want to dynamicaly create instances of this class, create MovieClips, but with the added features of the class. How should I create this instances?
I'm trying to create a series of scripts that will create some custom event listeners. I have three movie clips on my stage. One is a movieclip who's sole function is to hold array's and the event listeners. A second which moves around the screen. And a third that is motionless. The problem is that the argument I want to test (which activates the custom event) is held within a string. What I want to know is, how do you test to see if the string argument is true?
Is it something similar to this: var myCode:String="1<0"; if(myCode){ trace('one is smaller than 0'); //Strangely apparently one IS smaller than 0!!! }
I think I'm going about this in the wrong manner, however this is the only way I can think of this working... (since I need to be able to dynamically create these events).
I'm trying to create a magnify glass tool.I am familiar with copypixels() function for Bitmaps so i've had no problem making a magnify glass on a regular bitmap image, the problem is i want to magnify a movieclip full of other movieclips, layers, videos, active links etc....is there an efficient way to do this? i really dont want to load the whole thing into another movieclip just bigger....?
The idea is that the user can scan over the content and read, view, watch in a slightly bigger view.I have a zoom function when the user goes to full screen mode but this isn't an option in this case.
I am currently working on a map of the US that is interactive. My goal is to be able to mouse over the states and have them turn red and then a window with contact information will open at your mouse when clicked. I am running into a few problems. I dont know the process for creating a color tween for my movieclips. my solution was to make a copy of the states, color them red and place them behind the gray ones and attatch an event listener to all the states that lowers their alpha when moused over. thats not really the problem though. for my code that i have used to call in the window is as follows. I will use texas as an example.
I am creating a scrolling portfolio, but am having issues assigning movieclips to an array. I'm loading xml with the image info. That works just fine. I've created an empty movieclip in my library called pane() and set it to export for actionscript with a class name pane.