Help pls! Flash game problem.
Update*
Now getting this error:
Symbol 'levelcomplete'
1046: Type was not found or was not a compile-time constant: nextlevelBtn.
Hi guys, Beginner here having some trouble creating my first flash drag and drop jigsaw puzzle game.
The drag and drop jigsaw puzzle works to some extent, but it is the "level complete" movieclip which is causing problems.
On testing the movie i get this error:
1061: Call to a possibly undefined method addEventListener through a reference with static type Class.
Scene 1
Frame 1 = Welcome screen, click "start" to play, play goes to Frame 2, works fine.
Frame 2 = The first level, if completed within the timelimit, load object to stage "levelcomplete" movieclip which contains a button to move to the next level. The button does not work, although everything else appears to.
The "Next Level" button nested in the "levelcomplete" movieclip does not send the playhead to the Frame 3.
This is the ActionScript 3 which loads the 'levelcomplete' movieclip onto the stage:
var fl_MyInstance:levelcomplete = new levelcomplete();
stage.addChild(fl_MyInstance);
fl_MyInstance.x = 350;
fl_MyInstance.y = 250;
This is the AS3 which I want to work on the next level button, which is contained within the "levelcomplete" movieclip:
nextlevelbtn.addEventListener(MouseEvent.MOUSE_UP, gonextlevel);
function gonextlevel(e:MouseEvent):void
gotoAndStop(3); // Frame where level 2 is waiting
Frame 3 = Level 2, movie does not get this far.
Frame 4 = Level 3
Scene 2
Frame 1 = Game over screen with a retry button, which sends you back to Scene 1 Frame 2
Am not sure if am going about this the correct way, could anyone give me any feedback please?
Thanks
Kev
You're response makes me think I am completely going about this the wrong way
Am using the actionscript editor in Flash, and not an external .as file. Should i be using an external .as file to create a flash jigsaw puzzle game ?
If so I need to re thinking the game and get back to reading this book i borrowed.
Am very new to actionscript, I can not stress this enough, I am currently reading through things, but am having some difficulty understanding.
Sorry for being abit stupid.
Similar Messages
-
Flash Game Problem Need Help! Action-Script 2.0
Im making a flash game its a sniper game btw and i am have a problem with after killing the target for it to go to the next frame. I have tried on(press) on(release) for buttons i hae tried lots of different stuff (1.3 hours of trying) and so i was wondering if you could help me out. and here the link to the download for the source .fla yes i uploaded it cuz i really need the help ! thanks for any help! http://fileape.com/?act=download&t=yz6Lhp0oDdAB-7whXWB62WIoACXMVgV7r1flbKy17aJZamyC-vXNFwx tZP6pwXV50NGk3XWK9anDa4m6tBfGEtPOZwKbuZFcaFyGyEGiYqeILdcvVuEZy3QVHX3xY6S170xapkdrZJN9lov4k hxeqJ4_S6aGRpNQWjTT3MhudPLa1ZBAi79CiPqX5kN835lD7vzAU0O6WJZaK6jZBROg2A,,
or
http://fileape.com/dl/2gI8YiSW9QGzIgAu
if the top one doesnt work (the top one shouldnt have a time wait)
Thanks for all help
also please if you can find the problem itd be nice to know what it isI will not download the .fla - maybe if you hosted the .swf I would view it.
to change frame use: gotoAndStop(<framenumber>);
(without the < >, just a number for the fram).
I recommend you use movieclips for buttons and place all code on the main timeline. For movieclips, give them an identifier name (bottom left int he properties box of the movieclip) then on the main timeline use:
movieclipName.onRelease = function(){
gotoAndStop(10);//change 10 to the frame you wish to go to. gotoAndPlay(10) plays from the frame. -
Please help me with a simple flash game problem
I am trying to learn how to make flash games with Adobe flash 5.5. I am doing a tutorial from a book and am stuck.
The game is called concentration and you are suppose to match 2 tiles of the same shape. there are 10 shape tiles
and 1 question mark tile. These tiles are held in an array. 20 tiles are suppose to be displayed 5 to a row with 4 rows
and the question mark is suppose to be up on all 20. My problem is I get a blank screen when I test the movie. I
think the code is good but I beleive I have not uploaded the tiles right. I did upload the 11 tiles to the library and have
those 11 tiles and tile_movieclip in the library. Here is the code:
package {
// importing classes
import flash.display.Sprite;
// end of importing classes
public class Main extends Sprite {
public function Main() {
// variables and constants
const NUMBER_OF_TILES:uint=20;
const TILES_PER_ROW:uint=5;
var tiles:Array=new Array();
var tile:tile_movieclip;
// end of variables and constants
// tiles creation loop
for (var i:uint=0; i<NUMBER_OF_TILES; i++) {
tiles.push(Math.floor(i/2));
trace("My tiles: "+tiles);
// end of tiles creation loop
// shuffling loop
var swap,tmp:uint;
for (i=NUMBER_OF_TILES-1; i>0; i--) {
swap=Math.floor(Math.random()*i);
tmp=tiles[i];
tiles[i]=tiles[swap];
tiles[swap]=tmp;
trace("My shuffled tiles: "+tiles);
// end of shuffling loop
// tile placing loop
for (i=0; i<NUMBER_OF_TILES; i++) {
tile=new tile_movieclip();
addChild(tile);
tile.cardType=tiles[i];
tile.x=5+(tile.width+5)*(i%TILES_PER_ROW);
tile.y=5+(tile.height+5)*(Math.floor(i/TILES_PER_ROW));
tile.gotoAndStop(NUMBER_OF_TILES/2+1);
// end of tile placing loop
Can someone please explain to me what I am suppose to do to make the this work? I beleive the problem is it doesnt know where the tiles are.
Thanks.To create the tiles, draw 10 distinct shapes in the first 10 frames of your symbol, and
the back of the tile in the 11th frame. You are free to draw them as you want, but I suggest you make them as 90 pixels squares with registration point (starting x and y position) at 0, because these are the properties of the tiles used in this chapter's
examples. At least, they should all be the same size.
It didnt say put in a library. It is saying to draw them in frames of symbol but it didnt walk me through that. Can you guide me through this? I also was looking at how to add the link identifier but it said I need a popup window but I cant see one. I thought that was done
when I went to insert new symbol. It said something about actionscript linkage. I am familliar with perl, java and c++ so I can follow the code so far but I dont have much understanding of the flash interface. I made the 10 shape tiles and the 1 question mark tile
in paint. They are .jpeg images. -
2 player web-based Flash game problem
I have a two player web-based Flash game. The Flash calls a
JavaScript function on the webpage to get and store the user's IP.
Then an XML file with user's game data is loaded and parsed. The IP
address is used to identify which player is player 1 and which is
player 2 according to the XML file. There is a Java applet to send
and receive messages between the players.
The first player loads everything just fine. All the first
player's messages regarding the progress in loading different parts
of the code sent by the game for debugging are displayed in the
Java applet's text box, but none of the second player's messages
sent by the game for debugging are displayed.
The problem is that the second player's ActionScript code
appears not to be executing except that I do get a message in the
game that the XML file attempted to load but was not successful.
The IP address call is not made and no messages can be sent to the
other player. The second player's Java applet displays only the
messages for debugging that came from the first player's game and
any chat messages sent by the first player.
This problem always happens to the second player, never to
the first player. Both player's are always using IE6 or IE7.
Does anyone have some idea(s) what could cause only the
second player's ActionScript code not to execute and/or not to load
an XML file correctly?
This is just a general question, so any general answers would
be appreciated. Code specific answers are hopefully not required.
Thank You in advance.Hi,
I am not very familiar with the multiplayer Game development. For multiplayer games, you'll need to set up a matchmaking server and have the clients connect to it. It can then pair them off and facilitate communications. If the clients have publicly available
network addresses then it can introduce them and they can talk directly to each other.There isn't anything built in for this so you'll need to either build your own or find a third party implementation. If you are using Unity3d then check out
http://docs.unity3d.com/Documentation/Components/net-MasterServer.html
Also, you can use Xbox services, and I find an article below:
https://msdn.microsoft.com/en-us/library/bb975801.aspx
For windows Azure problem, you should go to windows Azure forum.
Best Wishes!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey. -
I've posted in several forums looking for answers and have yet to receive a response. I've had this problem for over a year and I've yet to figure out the cause.
My problem: I have lag in flash games whenever I input a command (ie - push a key to do something in a game). The lag is a delay in the graphic update after inputing a command (ie - moving left in a game takes a second and then appears to "jump"...aka it's not smooth animation).
I've had this problem since I got my computer. Here's all the specs and software I'm using:
Mobile Core 2 Duo T7600G @ 2.33ghz
Nvidia Geforce Go 7950GTX Driver Version: 7.15.11.8520
4 gigs PC-5300 DDR2 memory
Windows Vista Ultimate SP1 all latest updates
Firefox version 3.5.1
Flash Version 10.0.22.87
I've done a fresh install of OS, Firefox, and Flash. All BIOS are update to date. I monitor CPU usage while playing flash games and the firefox process (firefox.exe) uses about 30% of the CPU so the game isn't exactly a workout for my computer. The games (or videos) runs like silk as long as I'm not imputing commands (ie playing the game). I've monitored CPU rating to insure CPU is not running at a reduced power mode during tests.
I defrag my HD regularly and update all other drivers as necessary. All anti-virus (avast) and anti-spyware (ad-aware and spybot) programs are up to date and scanning my computer regularly. I've set them on active and passive to test if they were the problem but they are surely not interferring (trust me I've tested extensively).
In conclusion: my computer work 100% great except for this problem and I have no idea what's wrong. I'm convinced it's just 1 setting that needs to be tweaked but I've yet to come across that tweak.
Any suggestions/help would be appreciated. Thanks!I forgot to add this is ALL flash games. When I say ALL I mean every single one I've ever playedr regardless of detail.
-
Flash games problem with Mozilla Firefox
Ok so, I'm trying to play one great flash game, I'm actually Texas hold'em addict :D so, as soon as I open it, firefox just crashes and that's it, nothing appears, no crash report or anything like that..
I'm trying to play this game: [http://www.4yahoo.com/board-card/play-governor-of-poker-2 Governor of Poker 2] and this one [http://www.4yahoo.com/puzzle/play-the-forest-temple The Forest Temple]
What to do? Should I reinstall it or it could be my windows problem?
I don't really want to re-install it, because I have tons of bookmars there and got no idea how to save them, also I'm afraid that it will be waste of time.
So I'm asking you guys, maybe someone faced this problem.
Thanks in advance.I mean, it's ok when I run other games, but those two are the problem :(
-
Car Customization (Flash Game) Problem
I'm currently making a car customization flash game, i've already done the coloring part (while user click "Red", the car become "Red").
The problem is i want to add an animation before changing the color, eg: when user click "Red", a sprayer is going left to right, and the car become "Red" after that. So i make a movie clip named "Spray", and i got 5 labels "Red", "Green", "Yellow", "Orange", "Blue" in following order, i add the movie clip in every label, but it look weird because when user click "Red", it play the movie clip and become "Red", after that user click "Orange", the car will become "Black" (Black is default color of the car) when playing the movie clip. And user click "Green", it become "Black" again before changing to "Green". It always become default color when user choose other colors.
What i want is remain the car's color when user choose the other color, eg: when user choose "Red", it play the movie clip first, and become "Red", after that user choose "Orange", it play the movie clip and remain "Orange" color in the same time, after that it change to "Orange", and so on so forth.
Any solution for this? ThanksOk,i will describe the scene that i haven't make the "Spray" movie clip yet, so i won't confuse you. In the main scene, I got 1 movie clip, inside got few labels, as i mentioned before, "Red", "Green", "Yellow", "Orange", and "Blue" labels. Frame 1 contain a image, which is the black color's car image, the other labels contain different color of car image. So the sequence is Frame 1 is the black car, Frame 2 is the "Red" label, Frame 3 is the "Green" label, and continue until Frame 6.
I got another movie clip which is in the main scene, inside this movie clip is a menu and button, which contain different type of buttons that allow user change the color. It only have 1 Frame, and here is the AS:
var myCarArray = [Red, Green, Yellow, Orange, Blue];
for each (var Car in myCarArray) {
Car.addEventListener(MouseEvent.CLICK, onCarClick);
Car.buttonMode = true;
function onCarClick (event:MouseEvent):void {
MovieClip(parent).car_color.gotoAndStop(event.target.name);
So what should i do in order to archive the target that i want? I need to show some animation before changing the car's color. -
Using "Flash Help" to help make flash game?
Hello,
I've noticed the other day that in Flash, the "Flash Help (F1)" found under "Help" is licensed under "Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License". The resources found on adobe.com in the Flash Development Center is also licensed with this.
The license state:
" You are free:
* to Share — to copy, distribute and transmit the work
* to Remix — to adapt the work
Under the following conditions:
Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
Noncommercial — You may not use this work for commercial purposes.
Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one."
- CC License
I'm trying to learn flash so I can make flash games. I plan to get them sponsored by game portals and attach them to MochiAds--so technically this would be commercial, yes?
So does this mean I CAN'T use "Flash Help" or any of the resources found in adobe's Flash Development Center to learn how to use actionscripts?
Of course I don't plan to bluntly copy-paste codes, but it would be nice if I could adapt and learn how things work. Sometimes I get stuck and I need a reference... The last thing I'd want is to get into some copyright trouble =/
Sorry if this post is out of place. I tried to ask in Customer Support days ago but I get the feeling that they've ignored me.
Any extra advices are welcome.
Thank you,
JaneWhat is with all the folks asking "copyright" questions lately? Are you all in some class or something? I am not a copyright lawyer so don't take anything I say as the absolute truth, but I have had a long standing interest in these issues...
Anyways copyright is not an absolute right, there is an important part of copyright law called "fair use" and it is important. Of course it is also the source of a lot of disagreements and law suits...
A clear case of infringement would be if you tried to just take the Flash help and publish your own "learn actionscript" help book or website.
But given that the help documentation is meant to teach you how to use the product it seems that it would be clearly within fair use to use it to learn how to use the product.
And while the US courts have not been particularly intelligent about technical innovation -- often granting patents and copyright to very basic code, while not protecting truly innovative and clever invention -- the argument that the basic instantiation of a class and invocation of its methods, properties, and events, is pretty clearly the only way to do these things. Adobe would have no reason -- in fact they would have quite the opposite -- to pursue a claim against somebody who used actionscript.
Given the absurdity of the US courts (if here is where you be) just change the names of the variables from the samples and you are most likely fine since it would confuse them. -
Flash game problem: Game wont start until user clicks stage
Hi Everyone,
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. Can anyone help? Here's a link to the game if you want to check it out. Thanks a lot!
http://sandbox.westphal.drexel.edu/~kg394/DIGM265.htmlIt was also required on my PC using IE8, so your Mac theory is out. If it requires that you set focus on the stage to get it running, then you probably want to have focus set there using code as soon as the game section starts... but I usually have a heck of a time managing focus with actionscript... regardless of how they say to implement it, it tends to not work for me on any reliable basis (probably just Murphy's Law).
-
Help downloading flash and problems with Safari
Hi
I've got two questions. I'm aware that the main problem is my operating system is old (OS X 10.4.11, Safari 4.1.3) I'm saving up for a new computer, but meanwhile....
1) Sometimes when I go to open an address this comes up:
"Safari can’t open “http://www.thegreenparent.co.uk/downloads/Writers_Guidelines_2010.pdf” because Mac OS X doesn’t recognize Internet addresses starting with “http:”."
2) I'm desperately trying to download Adobe Flash as I can't listen to radio/watch films etc without it. It's a real pain. I don't know how it happened, until a couple of weeks ago I could listen to BBCiPlayer etc no probs, but now when I try it tells me to download flash - I go to the Adobe flash site, download the programme, restart and still BBCiPlayer asks for flash. I've had a look through the forums here and allowed permissions, plus I downloaded 'wimpy' nothing has worked... help!
Thanks in advance for your help..
MaryThe latest version of Adobe FlashPlayer can be obtained from here:
http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFl ash
You can check here: http://www.adobe.com/products/flash/about/ to see which version you should install for your Mac and OS. Note that version 10,1,102,64 is the last version available to PPC Mac users*. The latest version, 10.2.152.25 or later, is for Intel Macs only, as Adobe no longer support the PPC platform. Note that the latest Flash Player update only works on YouTube with Safari in 32 bit mode - until YouTube correct this.
* Unhelpfully, if you want the last version for PPC Macs, you need to go here: http://kb2.adobe.com/cps/142/tn_14266.html and scroll down to 'Archived Versions/Older Archives'. The first one on the list, Flash Player 10.1 is the one you download. More information here: http://kb2.adobe.com/cps/838/cpsid_83808.html
You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
http://kb2.adobe.com/cps/865/cpsid_86551.html#prob1=uninst,os=m10.6,
and also that you follow the instructions closely, such as closing ALL applications first before installing. You must also carry out a permission repair after installing anything from Adobe. -
Please Help! Flash Template Problem
Hello all. I am in desperate need of some help with coding
problems. I recently bought a flash template for a photography
website. I know flash a bit... (been through about 300 pages in the
flash book) but i'm by no means a pro.
Only problem is I don't have it up so I can't really show you
guys what i'm talking about.
it's a very basic site with categories on the left (animals,
architecture, etc) and thumbnail images on the right. Only problem
is that I've spent hours and hours searching through the supplied
files but i can not for the life of me figure out how to edit those
categories OR the descriptions of each thumbnail that appears under
the category column when the mouse is held over each individual
thumbnail. Almost all the supplied files in the library are
basically blank with outlines of shapes and nothing else. I have no
idea what to do.
Would it be possible to somehow send someone the file (or
maybe i can upload the file to an ftp site?) and have someone just
give it a quick look? I've asked three people at work (whose job it
is to know flash) to find it and none of them can. Thanks in
advance for any help.All of that seems to be in a file titled: "images.xml". You
can open that file in a text editor. In there you'll see the
category names and the image descriptions. Just change the text to
what you want to see and save the file. -
Help! flash player problem
Well i just downloaded the new version of Flash and well ever
since i cant open any page that contains flas thingy... i cant even
open youtube or this page
http://www.adobe.com/products/flash/about/
that is where the thing takes me
i get this msg:
The page “Macromedia - Flash Player” has content
of MIME type “application/x-shockwave-flash”, but you
don’t have a plug-in installed for this MIME type. A plug-in
should be available on this page:
https://www.macromedia.com/go/getflashplayer
Do you want to open the page? Cancel/Ok i click ok and takes
me to the page i downloaded flash so i dont know what to do please
help!!The only solution i see right now is to go back to version
9r47 archived flash version it can be found here:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=1
just goto c:/windows/system32/macromedia/flash then goto edit
select all and delete. Then install 9r47 you should be good togo
untill they come out with a newer version than 9r115. On a mac
delete flash folder flies and the archive has mac installation
too. -
Please Help! Flash quitting problem.
Hello All,
"Thank You" in advance for your help on this one.
Flash 8 is force quitting on my students whenever they add
actions to a movie and test it.
Does anyone know what could cause this?
We are using the new iMac’s with Intel processors.
Student accounts are managed via workgroup manager.
Thanks for you help… I really need it on this one!!
ToddI had a similar issue on one button only on a flash project
that had been started on a PC, then taken to a Mac and worked on
more, then published. When I took it back to the PC and
republished, everything rectified itself... Was there any
cross-platform work going on? Might be a place to start. -
Help pls Lots of problems and Is this a Neo Platinum
I have bought and installed what is supposed to be a K8N Neo Platinum. MS-7030. It has a AMD 64-3000+. The board is stamped "K8N Neo Rev 1". I can't find any Platinum anywhere and NONE of the MSI software utilites pull back any information at all about the motherboard, other than MS-7030.
Biggest problems:
1) There's no Gigabit lan option in the BIOS (version 1.2). Other than that, the BIOS seem to match what the book says they should be. I have a MAC LAN option, but no Gigabit lan option. It's just not there.
2) I have the MAC LAN enabled and installed the system drivers ok. It shows up in device manager. But none of the MSI software utilities recognize the onboard ethernet card. Third party utilities such as "TCP Optimizer" don't show the Nvidia LAN adapter but show a "1394 Net Adapter" even though I have the Firewire disabled in BIOS and not installed in Win XP Pro. Internet access is ok as far as I can tell but I wonder if performance is suffering.
3) Live Update says I need the ADMTek network drivers or something like that. Never heard of them, and do I really need them, what will they do?
4) Temps are hot. 120 F/49 C idle immediately after boot up. Can get up to 61 or 62 C when under load. I have max cooling options in BIOS and CoolnQuiet enabled in BIOS.
5) The MSI Software utilities such as DMI, Infoview, WMIinfo don't work right or report a bunch of garbage. Internal/external cache reports invalid in the DMI browser, etc. The Infoview shows no network information (see item 2)
6) The power light blinks sometimes. It IS hooked up correctly - it is NOT hooked up to the HDD LED. The HDD LED works fine. But the power light blinks, especially in Windows and when under heavy load, or when logging on and off accounts.
I switched to Nvidia because of all the headaches I had with old VIA chipset on my last board. Was it a mistake?
This board seems really flakey!!!
Thanks -jFlashing to the official 1.3 seems to have helped the temperature problems quite a bit....
Could this be the problem with my network card: when i first repair installed XP Pro after installing new mobo/cpu/ram, I left the nVidia LAN disabled and kept my old PCI ethernet iinstalled. After I had everything set up correctly, then I disabled the PCI ethernet card, removed it, and enabled the onboard nVidia LAN card. Internet works and everything. It shows up in device manager after I installed latest system drivers.
But, it's like no other software can see this network card, not even MSI's own software utilities.
The LiveUpdate says I need something called ADMTEk network drivers or something like that but I don't know what this is or why I need it.
Thanks -
Can someone help pls? smsing problems
I have recetly downloaded the new software ios6 but before that i already cant send any messages. Does anyone have a solution? pls help.. my phone is a iphone 3g.
iPhone 3G with iOS 6? Maybe your iPhone its a 3GS. So check Settings>Messages.
Maybe you are looking for
-
I have been trying to reset but the manual says "settings>general>restore" this does not appear at all so I cannot reset.
-
Want to use ouput of a report in my program
Hi all, I want to use the output of report rm07mlbd(stock on posting date) in my report program. How do I get the same done.
-
Microphone problem on loudspeaker
Since I have update my phone to iso7 the microphone on loud speaker has stoped working this must be a software problem can any one give me any clue to fixing this problem
-
GetMethods from AuthoringScope is never called
There are two threads on the theme: "I'm working on MPF package containing the language service. I need to implement MethodTips feature. I've created the class inherited from the AuthoringScope class from MPF and override following methods: GetDataTi
-
How can I empty thr iphoto TRASH....
On opening iphoto,underneath the left hand column (below the heading 'Library' ) there is the item 'Trash' which when selected shows all the pics I have deleted from iphoto. How do I empty this ? Surely these are not stored in the trash for ever ? Th