ActionScript 3.0 :: Adding Ability To Rotate Each Piece In Jigsaw Puzzle?
Mar 29, 2011
I have a jigsaw puzzle that I want to add the ability to have each peice rotate. This code is based off some code I purchased. I cannot reach the company other than some generic instructions to add an event. The instruction I was given was:
public function rotateActivePiece(dir:int=1):void
Rotates the active puzzle piece (last clicked),
90 degrees, clockwise if dir>0, and counterclockwise if dir<=0.
Parametersdir:int (default = 1) - Parameter defining the direction of the rotation.
CW if pozitive, CCW if zero or negative.
I dont know what to do with this or where to add.
View 3 Replies
Similar Posts:
Oct 24, 2004
how to rotate individual jigsaw puzzle pieces using the left and right arrow keys. Can anyone help? Here is the action script that I am using:
on (press) {
startDrag("_root.pic9", true);
this.swapDepths(100);
}
[code]....
View 9 Replies
Oct 24, 2004
how to rotate individual jigsaw puzzle pieces using the left and right arrow keys.Here is the action script that I am using:
on (press) {
startDrag("_root.pic9", true);
this.swapDepths(100);[code]....
View 7 Replies
Jul 2, 2009
The top left corner works ok - I copied and pasted the code and made the minor changes. The other 3 parts of the puzzle are causing a real puzzle for me.I've checked instance names, and everything else I can think of.Is there something in the code that could prevent the other bits working properly? Some of the names aren't brilliant - I thought this would only take a few minutes to knock up!
Code:
// Drag cameron 2
a2.onPress = function() {
this.startDrag(false);
};
[code]....
View 1 Replies
Jan 12, 2010
I'm trying to create a jigsaw puzzle and need to show a text when the puzzle is complete. I can't solve it. I have 12 puzzle peaces and when all of them are correct placed i need the "Congratulation" text to show. Is there a easy AC snippet telling a text to show when all peaces are in correct x and y? The puzzle peaces are buttons and have instant names as, puz1, puz2 and so on....
View 2 Replies
Apr 2, 2010
I am using the puzzle game sample from adobe and want to use it as part of an interactive narrative for students. However, everytime I try to go to new frame or scene the image stays with me. How do I remove or unload the puzzle frame and bitmap images so that it doesn't follow me. I am not a coder very confusing here is the entire script.
var puzzlePiecesArr:Array;var puzzlePiecesFound:Array;var topDepth:Number;var totalPuzzlePieces:Number;var correctPuzzlePieces:Number;var puzzleBmp:BitmapData;var intervalID:Number;var threshold:Number;var imagesArr:Array; var imageLoader:Loader;var requestURL:URLRequest; var puzzleBoardClip:MovieClip;var holder:MovieClip;
[code]....
View 4 Replies
Mar 14, 2009
I have a simple jigsaw type puzzle - only 4 pieces at the moment. The top left corner works ok - I copied and pasted the code and made the minor changes. The other 3 parts of the puzzle are causing a real puzzle for me. I've checked instance names, and everything else I can think of.
Is there something in the code that could prevent the other bits working properly?
Code:
// Drag cameron 2
a2.onPress = function() {
this.startDrag(false);};
a2.onRelease = function() {
this.stopDrag();
// Convert the slash notation to dot notation using eval.
if (eval(this._droptarget) == b_mc) {
b_mc._visible = false;
c2._visible =true;
a2._visible =false;
change_score();
}};
The fla is attached.
View 1 Replies
Mar 24, 2010
I know how to make a basic jigsaw but at the moment i'm trying to create a map of europe jigsaw. Unfortunately with the map taking up the majority of the room there's no space to have all the pieces on screen at once. I had a look for solutions and i found this... [URL] How would i go about making it so that only 1 piece appears on screen until you have placed it?
View 1 Replies
Aug 17, 2011
I want to make a jigsaw puzzle in flash. I know how to create square kind of shapes. But I want to create this kind of irregular shapes. See the live demo of puzzles in the links shown
[URL]
I just want to how to create the irregular shapes.
View 4 Replies
Oct 5, 2002
I'm trying to load 4 dfifferent SWF's into exact loactions in my MC. I'm trying to do this by loading my SWF's into individuale MC's inside my MC. The problem is that the SWF's Move down whe the load. I've posted FLA that I have been Testing with. It also contains the External SWF's to be loaded. Using Flash 5
View 2 Replies
Nov 3, 2005
I want to be able to add an action script for a button that is able to jump to different frames of a movie and play them in sequence. For example I want to be able to add an action script to a button so that when the button is released I want the movie (animation) to start at frame 10, play till it reaches, frame 20, then immediately jump to frame 30, play to frame 40 and then stop. The Idea is to play different animations in sequence with just one button. Whenever I press the button I don't want to see the animation in frames 1-9 or 11-19. If I can figure out how to do this I will be to have different buttons controlling different sequences of the animation of the movie.
View 3 Replies
Feb 9, 2012
I am planning to develop a jigsaw puzzle, by designing the puzzle pieces in Photoshop (with each jigsaw piece on a separate layer) and then importing all PS layers into flash, to compile the game. I haven't been using AS3 for too long, but am reasonably happy with the progress I've been making and would like to take this step up in terms of complexity.
The pieces will be stored in an array (piecesAry). I want the pieces to each be registered to a Point on the playing board. For example, if there are 100 pieces in the jigsaw, each piece will have correct place in terms of a 10x10 matrix (10 rows x 10 columns). The unique Point for each piece will, I think, need to be stored in the piecesAry.
My query relates to how I am best assigning the unique Point to each individual piece. For example, to take again the example of the 100 piece jigsaw, would it be possible / effective to create an underlying 10 x 10 bitmap square grid, and have each piece of the grid assigned to an individual piece (the thinking being that the square grid can be "cut up" easier than the jigsaw once in flash).
[Code]....
View 1 Replies
Jul 31, 2010
i need to make a jigsaw game. i want to make such a system by code(AS3) that when i give the bitmap it will split it. how can i split the bitmap in such a extraordinary shapes?
View 9 Replies
Apr 9, 2011
After 3 drag and drops of the puzzle I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MultimediaProducttest_fla::MainTimeline/dropIt()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MultimediaProducttest_fla::MainTimeline/pickUp()
restbar_btn4.addEventListener(MouseEvent.CLICK, restbar4Clicked);
museum_btn4.addEventListener(MouseEvent.CLICK, museum4Clicked);
sark_btn4.addEventListener(MouseEvent.CLICK,sark4Clicked);
market_btn4.addEventListener(MouseEvent.CLICK, market4Clicked);
[Code] .....
View 10 Replies
Mar 7, 2012
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,
[Code]...
View 6 Replies
Jan 24, 2010
My code in theory works find but for some reason things aren't doing what they're supposed to. Basically I have all my draggable puzzle pieces as movieclips; they start at specific x's and y's on the axis. You drag them to the corresponding hitbox movieclip and it pops into the other specific x and y spot on the axis (otherwise they go back to the first xy spot).
The problem is sometimes the pieces drag and drop fine, but other times when you click the mouse down, they drag, but when you let go, they don't drop! Randomly! They just follow the cursor around, til you click a few times, and then randomly it will drop and not move (when it's supposed to go back to the original xy position).
[Code]...
View 1 Replies
Jan 5, 2011
I am doing a 5 frame file that on frame 1 has 4 buttons and the following code
on (release) {
gotoAndStop(4);
} on (release) {
loadMovieNum("jigsaw.swf", 1);
}
I am happy with this as it jumps to frame 4 and loads the movie jigsaw that I done from a tutorial. The problem is I cant get it to close, I have got a button on page 4 that has the gotoAndStop(1) but it just goes to frame 1 (that's the good bit) but the jigsaw is now on frame 1 as well and I dont know how to close it.
I tried
on (release) {
gotoAndStop(1);
} on (release){
unloadMovieNum("jigsaw.swf", 1);
}
but it does nothing not even go to frame 1
View 2 Replies
Jul 31, 2011
I am trying to make a simple jigsaw game, I have copied the code but it isnt recognising my symbols. Is this an instance-naming problem? [URL]
View 7 Replies
May 21, 2009
I'm pretty new to flash but recently got an assignment at college to produce a childrens game, I've been following a tutorial online to produce a jigsaw puzzle, so I can get use to actionscript and gain a little experience. I cant get some alignment right. I've followed this tutorial exactly and this is where i am stuck, below are the instructions and how it should look:
This is how mine looks, as you can see its out of place:
View 2 Replies
Jul 27, 2009
I'm using CS4 and was wondering why when I import my PSD files onto the stage I don't get a symbol created in the Library but when I import into the Library itself I do? Is there a prefercence somewhere I can turn this off or on so I don't have them created?
View 7 Replies
Feb 7, 2011
I placed a large photo (movie clip object) as a background onto the stage, but it exceeds the stage size by 25%. It's done on purpose. While I see it in the Flash authoring environment, the image excess refuses to appear in Internet Exlorer once published.I also have an animated object over (foreground) that does appear past the stage in the browser.
View 1 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
Apr 10, 2012
I want puzzle in ActionScript 3.0 . Tutorial or Download Source.
View 4 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
May 17, 2011
make a classic 15 piece sliding picture puzzle. I need to shuffle the pieces in order to play the game and to do this have made an array of numbers 0 -14 and shuffled them. I then made a for loop which run 15 times using the pop method to take the last number from the array for each loop and store it in a variable shuffleVal. I have tested this and it works fine producing the 15 randomized numbers seperately, however when I try to use shuffleVal as a parameter for each Tiles boardPosition it only refers to the last value popped rather than each one from the loop. I have provided the code from my controller file .
CODE:-
import Tile;
import Jumble;
var shuffle:Array=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14];[code].....
View 5 Replies
Aug 10, 2009
I am having some dificulty making a path for this enemy i'm trying to create... cause i want him to rotate + move, then stop, then shoot, then rotate back and move off screen... Its easier if you see it.. you can download the swf file in the zipped archive to demonstrate what i mean. I did it there with tweens. Anyway.. i tried and make it but i'm a little stuck on the stopping part... you can also see what i did in the fla file attatched...
View 1 Replies
May 20, 2009
Basically I was instructed to put this code into my main timeline:
function completedPuzzleCheck(){ // add this to your main timeline
if(!numCompleted){
numCompleted=1;
} else {
numCompleted++;
[Code] .....
It all works great but the issue (on a couple puzzles like this) is that a person could move one piece 8 times into the same correct position and the "Great Job" message will pop up although the puzzle is visually incomplete.
View 7 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
Oct 7, 2007
I am trying to make a jigsaw puzzle where you can upload an image of a set size.Right now the only way I can think to do that would involve loading the same image for each piece, which I don't want to do for performance reasons.Is there a way I can make an instance of a movieClip the same as the instance of a different movieClip?
View 1 Replies
Mar 12, 2009
i've been asked to build a slide puzzle for an advertising company. While the puzzle itself will be straightforward they want it to thave a 'solve' button that shows the puzzle animating to the correct finish position from the positition the tiles are currently in (after the user has moved them around). It's a 4x2 grid puzzle.
Any thoughts on the best way to achieve this? Everything i come up with seems unneccessarily complex.
View 11 Replies