ActionScript 2.0 :: Setting X And Y For Multiple Pieces?
Aug 25, 2003
I am trying to create a puzzle made up of nine pieces each named piece1, piece2 etc. each is a movie clip with an imbedded button. I am trying to make the pieces scramble upon load and be dragable, but I want to have them return to their original x and y coordinates when the viewer presses a button.
View 2 Replies
Similar Posts:
Apr 11, 2007
I have recently designed a children's educational game that is completed, however; it is a puzzle and the puzzle pieces can be dropped on top of each other and they hide behind eachother which I do not want to happen. I would like the game pieces to automatically get pushed off to the side of the other puzzle pieces that are in use...not stacked on top of each other. The game is complete except for this one problem.
View 1 Replies
Mar 5, 2007
Here's what I'm trying to do:I've got an external text file with a bunch of pieces that I want to load via asfunction. Here's my script:
Code:
_global.doSomething = function(what) {
myLoadVar = new LoadVars ();
[code]....
View 4 Replies
Oct 16, 2010
I'm completely new to this forum, and would like to ask your help for one issue. I am working on an interactive flash map, I was able to set all the countries borders with the help of fireworks (awesome tool), and import them back to flash and set each country as a button. I would like to set all of the buttons to have the same properties for example : All the buttons have default red color, and will have a mouse hover frame that will change the color of the button to blue. I DO NOT want to set each button manually, because I would like to have the choice to change the mouse hover color to a different one, and would like to avoid passing each button and changing each one's mouse hover frame.
Is there a way I can built a template of a frame, and for each button set its mouse hover frame as the template frame I built ? And then if I make any changes to the template frame, all of my buttons would be automatically updated ?
View 1 Replies
Aug 7, 2011
lets say i have 3 MovieClips: Tank1, Tank2 and Tank3. And i want to set them hittest or other setting. Its not wery dificult to do that, but i dont want to write the code if i create Tank4... I want my code to get all the tanks with a number, ant set them a setting, because there may be hundreds of tanks... I know it's posible on AS2, but i don't know about AS3.
View 1 Replies
Oct 16, 2010
I am working on an interactive flash map, I was able to set all the countries borders with the help of fireworks (awesome tool), and import them back to flash and set each country as a button.I would like to set all of the buttons to have the same properties for example :All the buttons have default red color, and will have a mouse hover frame that will change the color of the button to blue.I DO NOT want to set each button manually, because I would like to have the choice to change the mouse hover color to a different one, and would like to avoid passing each button and changing each one's mouse hover frame.
Is there a way I can built a template of a frame, and for each button set its mouse hover frame as the template frame I built ? And then if I make any changes to the template frame, all of my buttons would be automatically updated?
View 1 Replies
Sep 30, 2011
I get how to set depth in as3 - but with as2 i could begin multiple 'depth points' using numbers - where in as3 all i can seem to do is set this object to a higher/lower depth than that object. The problem is (when dealing with a stack of isometric boxes, which can be placed by the user on a grid in any order) i don't want to deal with the added complexity of having every element know where every other element is, then adjust appropriately.
What I'm trying to do is set up 6 total depth numbers/positions, one for each column in a 6 x 6 grid. So anything in column 1 will begin it's depth placement at say 500, anything in column 2 will begin its depth at 1000, column 3 would be 1500 and so on.
That way, the second i place an object on a particular column, it would tuck itself under, or place itself above all surrounding items in other columns, this to me is much much easier than somehow figuring out where 15 different sized boxes are, how they relate to one another, then figure out what depth order they need to go in. as3 seems to have removed the ability to set a depth to a specific number.
View 1 Replies
Nov 10, 2009
I've automated a lot of my script, but cannot automate the very beginning where one sets the variables. I have the following script that I'd like to put in a "for" loop :
private var aliPlane1:Plane3D;
private var aliPlane2:Plane3D;
private var aliPlane3:Plane3D;
[code]......
View 9 Replies
Dec 3, 2006
i have long string values how do i set it up ... like this
var longString:String = "Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. ";
View 1 Replies
Jun 16, 2009
I'm struggling setting up 4 live audio sources with fms 3.5. I have 4 streams input from our studios into 1 encoder server. From here I need to pass it to the internet via 4 FMS 3.5 servers. I do not want to have 4 * 4 encoding sessions on the encoder in order to service the 4 FMS servers. Is there any way to pull the streams from the encoders? I have also tried configuring explicit connections using 1 server as an origin server and 3 as edge servers but being a live stream the load and connections seem to get passed to the origin server which will eventually not handle the load. I've looked through the application.xml server settings but cannot seem to see any noticeable settings?
View 6 Replies
Jan 25, 2010
Right now, I have many MovieClips's in my array. I want to update all the alpha values of the MovieClips in my array. Right now, I am using a for loop but this is not the fastest way to do it.
View 3 Replies
Nov 19, 2011
I made a custom LabelItemRenderer, inside it I want to give some additional style to a StyleableTextField. How can I do it without losing inherited styles? I tried different things, but always got an error saying antiAliasType must be set.
s|List.customListStyle
{
fontFamily: Arial;
[Code].....
How should I set my text field style, and then set it in the createChildren method?
View 1 Replies
Apr 3, 2011
What I am trying to do I think is pretty simple.
Consider this code:
ActionScript Code:
var imageContainter:String;
var fileName:String;
[Code]....
This code appears to be working. I'm dynamically creating a bunch of movieclips that each contain an image. The also code stacks each clip on top of each other.
I'd like to be able to now set the alpha or visibility of all of those movieclips to 0 or false, except for the first one. I have other code that will set specific movieclips to display based on mouseEvents.
How do I refer to all of them? And should I be using arrays as well?
View 7 Replies
Oct 15, 2010
I have a splash page for a site I have built and it is 7 hexagons in a group like part of a bee hive.When I mouse over on it grows (tweens)and will ultimatley show some content when finally completed.on mouse out it shrinks back to normal size.what I want to achieve is that when mouse over the depth of that mc instance is on top and all the others a in the background.now for that part I can't seem to get right...
if I have mouse out from another of the 7 clips to mouse over another I want the mouse over tween of the new hex square to be on top and the mouse out tween of the prevous hex square to be below the new mc Instance that I have just mouse over and all the rest of the hex squares to be at a depth below the the hex square I have just mouse out from...This is the code I have on the buttons
on (press, rollOver, dragOver) {
this.swapDepths(100); // set this instance to top depth_root.x.swapDepths(50); // set mouse out instance below top[code]............
View 3 Replies
Dec 2, 2010
I have 35 movieclips, named s1, s2, s3 etc, depending on the value of currentDisplay, I would like to set a movieclip visible property to true while the others are set to false, I have tried the following:
Code:
for (i=1; i<36; i++){
trace(i);[code]....
but I receive an error message: 1083: Syntax error: dot is unexpected. I assume it is referring to the dot before visible.
View 1 Replies
Aug 26, 2010
I'm trying to figure out if we can use RSLs to contain common UI controls for our next project. I'm running into an organizational issue that I can't quite figure out - how to get the RSLs to work in both a local development/debugging environment, and on a production web environment, with the same exporting/importing URLs.
Here's what my setup would look like. Say I have a main application main.swf, an RSL lib.swf, and a UI module dialog.swf.
Main.swf loads or embeds dialog.swf. lib.swf exports some symbols that dialog.swf imports.
On a local development environment, these swfs are found in folders like so:
[URL]
Here is the problem. If I set the export/import url for symbols in lib.swf to "assets/lib/lib.swf" (relative to the location of main.swf), the runtime library gets loaded fine in the local environment. But in the web environment, it does not load - the player just shows the "..." graphic indicating it is trying to load.
Alternatively, I can use "http:/myapp.com/assets/lib/lib.swf" as the export/import url. Now, it will work in the web environment. However, in the local environment, dialog.swf will load symbols from the lib.swf that is out on the web, not the one that is local. But I need it to load from the local version, so that designers can muck about with the assets and see the results locally before publishing to the web.
Is there some alternative way to set up the swf's, or way to set the URLs, or some other hoop I can jump through that will make the RSL load properly in either environment without having to manually change URLs all the time?
(Details: I am using Flash Builder 4, CS 5, Action Script 3, Flash Player 10... No Flex! My example omits some details from my actual setup, such as the fact that we are using a preloader to load the main application, and a php script on the web page to start the preloader.)
View 4 Replies
May 14, 2011
how to cut a bitmap image in particular pieces specified by user. I want to create this in as3.
View 2 Replies
Mar 9, 2011
I'm trying to cut up a bitmap image into pieces, and then tween each piece away sequentially. Cutting up the pieces and placing those pieces in an array is where I'm at. But to tween each piece on a timer is where I'm stuck; here's the code:
package
{
import flash.display.*;
[code]....
View 6 Replies
Aug 14, 2006
I'm having a big issue getting a string to split into two pieces, and I can't for the life of me work out why. This is a function that is run, with the midText var, being a number between 0-100, spat out from a loader. I've traced it, and it seems fine, but my splitter function just wont work! The function works fine if you simple define a var in the code
[Code]...
View 2 Replies
May 12, 2010
Here's the code:
Code:
button1.addEventListener(MouseEvent.MOUSE_DOWN, pressButton1);
function pressButton1(event:MouseEvent):void {
(xml stuff)
[Code]....
Since the xmlData is within a function, I assume I can't access xmlData from the button. How would I go about reading the xml with the button?
View 1 Replies
May 14, 2011
how to cut a bitmap image in particular pieces specified by user. I want to create this in as3.
View 4 Replies
Jun 28, 2006
I just went through the ActionScript tutorial for the jigsaw puzzle found here: [URL] I would like to change the image used for the background and the puzzle pieces, and am running into problems. I can change the background for the work area with no problem, but the puzzle pieces are still displaying the original artwork.
View 6 Replies
Sep 10, 2009
I've been looking for a tutorial that describes how to make it so dragable objects can snap together when one is dropped in the right place next to another, but so far I haven't had much luck. Does anyone happen to know of such a tutorial, or can post something here about how to do it?
For example, how do I make something like this: [URL].. and how do I make it recognise when all the pieces are attached together?
View 11 Replies
Jan 4, 2012
I am making a jigsaw puzzle in flash. But I have a weird bug. There are 25 pieces, 5x5. I am passing in the background bitmapData to the pieces as they are created.
For each piece I create a single puzzle-shaped mask bitmap.
So each piece contains a bitmap whose bitmapdata is the puzzle texture. And each piece has a mask piece.
When I just show the masks, all 25 pieces are drawn to the stage.
But when I use the piece masks to mask out the texture, I seem to have a hard limit to 22 pieces in which the mask is applied. This happens if I am using 25 peices or even 80 or 100. Each time, only the last 22 pieces created will display the texture. [code]...
View 1 Replies
Jun 30, 2003
I've been working on this game for a little while and I got stock here. Any way to detect if a movie clip is surrounded by other movie clips as it shows in the above picture. [URL]
View 5 Replies
May 10, 2010
I'm looking into building a navigation system that revolves around the shape of a circle and each link is a slice of that circle. I could build it graphically and/or in the timeline, but the thing is that I'll have the links pulled from an XML file so it can be 3 or 6, or 9... Example: how to dynamically create a circle and slice it up depending on the number of arguments on an XML file? No need to add the XML part and all that.
View 2 Replies
Feb 8, 2010
I have a dynamic text box that is being populated by this line of code:
feedback.htmlText = myQuestion[counter]+"<br>You:<br>> "+myFoil[counter][userAnswer]+"<br>Chris:<br>> "+fbCorrect[counter];
I am needing to have the three distinct areas to be different colors of text. Can I do it in this line only? These elemnts are being pulled in from the first part of my file and I want them all the same unitl I pull the the info into "feedback.htmlText".
View 12 Replies
Jul 28, 2011
I created a drag and drop kind of game. Each item has the code below. How do I set the game to complete once the user has placed all the pieces where they belong?
[Code]...
View 2 Replies
Sep 7, 2011
I'm trying to created iregular puzzle pieces from a picture(in flash cs5.5) can anyone sugest some ways of doing this?maybe a usefull link.I know how to make rectangular shapes,but i'm looking in creating iregular pieces.
[Code]...
View 4 Replies
Dec 1, 2011
It's possible in plain HTML to wrap pieces of text in spans or tags that can make it easy to style them later. For example, if I wrap "part can be styled" in a span wit class stylable, I could define my own style later for it. This <span class="stylable">part can be styled</span> later if needed I'm new to actionscript, and I'm wondering if something similar exists for actionscript/flex?
View 1 Replies