ActionScript 1/2 :: Set The Game To Complete Once The User Has Placed All The Pieces Where They Belong?
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
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
Apr 17, 2011
I am unable to produce the kind of synchronization effects I would like to in ActionScript. The issue is that I need to make several external calls to get various pieces of outside information in response to a user request, and the way items will be laid out on the page is dependent on what each of these external calls returns. So, I don't care that all of these calls return asynchronously. However, is there any way to force some amount of synchronization on ActionScript, so that at least calling the method for doing the final layout and placement of items on the page is dependent on all of my calls finishing?
View 1 Replies
Oct 4, 2010
I have a problem with a dynamic video player that I have created in flash. The video player is "SCORM" compliant so that when the user clicks the "exit" button a class file is called to mark the user complete in an LMS.I have tested the SCORM Code previously and it works with out issue. Usually I have the completion code embedded in an Actions Layer of the movie. This is the first time I have attempted to call the completion status in a class file, I have added a "trace statement" when the movie is tested within flash it runs the trace statement properly, but when uploaded to the LMS environment the course does not complete properly
View 3 Replies
Apr 24, 2011
I'm making a game that populates user-designed cards into the game using an external xml file. My main class loads the xml file and then calls to the "Card" class, which wants to use the xml file. I've tried using this.parent and it just gives me a null object reference error. This is what I have so far: Main.as
[Code]...
View 2 Replies
Apr 3, 2009
im creating a card game. i have a seperate timeline for the menu bar. ive placed this code on the first cell of the timeline:
Code:
import mx.controls.Menu;
import mx.controls.MenuBar;[code].....
the problem i get is that when the user selects "new game" it should restart the game. when it does this the toolbar is not reset. instead a new menu item is added (without removing the old one. so evertime the user hits new game, a new "file" menu is added). how do i make sure there is only 1 "File" menu? and im using actionscript 2
View 1 Replies
Mar 8, 2012
How can I know if a point is contained inside of an Sprite in Flex?
For example:
// My example point
var A:Point = new Point(5,5);
// My example sprite
var s:Sprite = new Sprite();
s.graphics.lineStyle(1,0x000000,1);
s.graphics.moveTo(0,0);
s.graphics.lineTo(100,100);
The point A belong to sprite s because its position is inside of it. Is there any function to know it? I want to do it for all kind of sprites, so use math formulas to calculate linear or quadratic equations (line, circle, rectangle, etc) is not valid for me.
View 1 Replies
Mar 2, 2012
I'm using robot legs, I've got a bunch of ServiceResponses that extends a base class and have a dependency on a Parser, IParser. I need to wire in a parser specific to the subclass. Here's an example: ModuleConfigResponse extends SimpleServiceResponse and implements IServiceResponse.
The initial part is easy to wire in the context, here's an example:
injector.mapClass(IServiceResponse, ModuleConfigResponse);
injector.mapClass(IServiceResponse, SimpleServiceResponse, "roomconfig");
..etc
Each Response uses a parser that is used by the baseclass:
injector.mapValue(IParser, ModuleConfigParser, "moduleconfig");
injector.mapValue(IParser, RoomConfigParser, "roomconfig");
The question is how to tie these together. The base class could have:
[Inject]
public var parser : IParser
But I can't define the type ahead of time. Im wondering if there a nice way of wiring this in the context. For the moment I've decided to wire this up by instanciating responses in a ResponseFactory instead so that I pay pass the parser manually in the constructor.
injector.mapValue(IParser, ModuleConfigParser, "moduleconfig");
View 1 Replies
Sep 14, 2010
I'm trying to sort MCs on stage that belong to different instances of different objects.
[Code]...
is there a simple way to use the Depth Management methods to control their sorting order? Right now, all I know how to do is place objectTypeB either in front of or behind all members of objectTypeA.
View 3 Replies
May 24, 2010
If u have any tutorials, books or links related to this type of code, please forward me for this or my mail id - swamy.webdesigner at gmail.
View 1 Replies
Feb 17, 2006
I'm developing a game and the objective is to drag some objects to a container. Some objects add points, and some other subtract points. So, all the objects are in the library and have a linkage name to be called by attachMovie. I want to create an Array with all the objects that belong to container, like for example filename1 = ["obj1", "obj2", "obj3"]; etc... I have a var called count1 that defines the number of objects to appear on the Scene
[Code]....
View 4 Replies
May 24, 2010
now i am trying to make some games, I want to design a game with multi users.If u have any tutorials, books or links related to this type of code
View 1 Replies
Sep 6, 2010
I'm a student at Drexel University and I just completed a basic platformer for a actionscript class. My professor docked me some points for the game not working until the user actually clicks within the swf. I've heard that this problem is caused on mac osx, but I don't have any concrete evidence to get the points back. Here's a link to the game if you want to check it out.
[URL]
View 1 Replies
Dec 29, 2009
I want to put two games in my website but they both start at the same time.How can I get them to start separately when the user clicks them?
View 1 Replies
Oct 24, 2011
Here's the battle plan:
User logs into website.
User clicks the Play button and a new window opens with the flash game in it.
If the user is logged into website, have the flash game load. Otherwise ask him for credentials.
Is this type of interconnectivity possible? Can I give a flash object (.swf) something to use?
View 1 Replies
Mar 28, 2004
im making a game but im already having trouble with the first code, i just want the user to fall when he is not touching a floor....i put this code on the user:
[AS]onClipEvent(enterFrame){
if(falling=true){
this._y=this._y+5}[code]....
theres is no errors but it doesnt stop when it hits the floor
View 4 Replies
Nov 24, 2010
I have a jet_mc object flying from left to right, i got that part ok but my question is how can make it fly from left to right again and again untill the user finish the game. what line of code should i add to make it loop.stage.addEventListener(Event.ENTER_FRAME,run)function run (e:Event){ jet_mc.x-=5}
View 4 Replies
Oct 31, 2011
A student of mine is wanting to create a drag and drop game in which the user selects a possible answer for a range, drags it over a object named as "dropzone". the correct answer is left over the dropzone, and the user clicks the check button they need to be sent to a frame displaying "correct" - otherwise, sent to a frame for incorrect.I currently have a set up in which the user is given an auto response using a dynamic text box and all is done on the one frame, but this student wants to be a little different.
View 3 Replies
Jan 28, 2009
I'm using Flash CS3, AS2, PHP, mysql database with phpbb user registration. What I'm trying to do is a make a contest game where you have 5 different ladies and the users get to rank them in order from 1 to 5. Since it is a contest, users will need to be logged in. We already have a database of users based on phpbb, and a registration page. I need them to be able to log in using that username/pass and then they can play the game.
The game consists of a drag and drop mechanism (which I have) so the user can drag "#1" to "girl-4", drag "#2" to "girl-5" etc. Once they drag and drop all the boxes into the order they want, the user then submits it. The data I need to capture in the database is the User, date/time, their rank order (seperated so we can do a query to figure out how many they got right out of the 5.) The final twist is that we are going to have 9 total 'games', one each week for 9 weeks, and we only want users to be able to play once per week.
For an example you can see a working version here. That one does a bunch of more complicated stuff that I don't want to do. The programmer that did it is no longer here and it has been hard trying to decipher his code. I have the whole drag and drop mechanism using the old code from the above example. This is a snippit of the code. drag1_mc is the number they drag (there are 5, so drag1_mc, drag2_mc etc.) and drop1_mc is the rank location. (also 5, drop1_mc, drop2_mc, etc)
[Code]...
View 6 Replies
Sep 3, 2011
I've developed a game that records how long it took to complete the game. At the end of the game it shows the user how long it too to complete. I want to be able display message to the user depending on how quickly they took to complete the game. I have set up a dynamic text box called "message" that will display the message, but I am struggling to figure out the syntax for :
If gametime is less than 60 secs then message = "well done thats very quick"
If gametime is between 60 and 80 secs then message = "Not bad at all"
If gametime is between 81 and 100 secs then message = "Its good but not good enough"
If gametime is between 101 and 120 secs then message = "You can do better than that!"
If gametime is between 121 and 140 secs then message = "Too slow, you need to practice"
If gametime is greater than 140 then message = "Did you fall asleep?"
View 3 Replies
Apr 29, 2009
ive got the following code. bevvy is a movieclip, theres a dynamic text box called feedText nd a box.. imaginately called box. I'm trying to create a drag and drop game when the user drags a word into the box that will have its meaning beside it in a text box, the dynamic text box will tell them if they are right or not. if they are right the word stays, if not the word will go back to its original location. the dynamic text box will give feedback whether they are right or not.
the code below means that the word will stay in the box, but the text message is displayed all the time. i also have a reset button to make the word return to its origal location but id rather not have the button.
[Code]....
View 2 Replies
Jun 14, 2011
I made a test where I download a file using URLLoader - something like this:
[Code]....
in the middle of the downloading process I physically disconnect the internet connection. the download stalls - but after aproximately 30 seconds downloadSuccessful is invoked, although only half of the data was downloaded. how can I make sure that the data to be downloaded is complete and correct?
View 2 Replies
Feb 17, 2011
I am loading in binary files with the url class which can be quite large 10mb + and it works fine on my server but another server I am testing on it can sometimes not work. Sometimes it will not load the file and other times it will only load about 20% and it throw a complete event??? Then of course other times it works fine. This server is https maybe that has something to do this it?
View 0 Replies
Mar 19, 2010
I'm making an interactive kind of game, and I want a number of scenes to change once the user has looked at each once.For example, they go into three different scenes. When they finish looking at them all, Flash records this, and then when they look back at each scene again, they've all changed.
View 10 Replies
Dec 12, 2009
I'm trying to create a game where circles appear on the stage and when the user clicks on one it disappears and their score is updated. The circles appear for a short time then dissapear. If they dissapear before the user clicks the user looses points. The game is to last 20 seconds then the user will be shown their score and a little thanks for player message. This is what I have so far:
stop();
addEventListener(Event.ENTER_FRAME, playGame);
function playGame(Event):void {
[code]....
Now what I'm having trouble with is all the timing. I need a way to turn the visibility off the circles after a few seconds of being created and I also need to set the duration of the game for 20 seconds.
View 5 Replies
Mar 28, 2012
I have been trying to make a score counter for a small game where the user clicks on a button on the stage, each time the user presses the button the score increments by 10, however I cannot get the score to display on the dynamic text field.
var score:uint;
//scoreCounter is the instance name of the dynamic text box
function updateScore():void{
score += 10;
scoreCounter.text = score.toString();
}
View 2 Replies
May 6, 2007
I'm just trying to store a simple cookie that will remember the score for the next time the user plays the game (the score governs if an option is visible or not)It all works fine until I close browser/reload the page, at which point the shared object seems to disappear, any clues?
Write:
Code:
var rem_score:SharedObject = SharedObject.getLocal("score");
rem_score.data.score = new Number(score);
rem_score.flush();
The problem prolly lies in my write code but ill post the reading aswell just incase there is a problem with that too
Code:
var rem_score:SharedObject = SharedObject.getLocal("score");
if (rem_score.data.score != undefined) {
this.remdscore = rem_score.data.score;
if (rem_score.data.score >=30) {
[code]...
There is another point it is read but it is the same sort of thing as the above.
View 1 Replies
Mar 12, 2012
I made a game as the same site URL..Anyone knows how to prevent user open and play game on multiple browser windows at a time?I used flash control to embed flash into aspx page and connect to sql server
View 4 Replies
Dec 21, 2011
I have create a game and added keydown event on Stage but but problem is user need to click on stage then it start capturing keydown event. I want that when game window open after that user don't need to click on flash stage area for unable keydown event..
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 2 Replies