Welcome to Dream.In.Code
Become an Expert!

Join 149,506 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,342 people online right now. Registration is fast and FREE... Join Now!




Need some help with some AS.....Flash programming

 
Reply to this topicStart new topic

Need some help with some AS.....Flash programming

C++FTW
11 Aug, 2007 - 08:11 PM
Post #1

New D.I.C Head
*

Joined: 2 Aug, 2007
Posts: 7


My Contributions
The game im making is a shooting game....the one problem i have encountered and cannot figure out...is how to make it go to the different lvl's ......right now it just plays the diff lvls all at once like an animation...heres some of the code although i don't think the code is the problem
CODE

startGame.onRelease = function() {
    _level.level1.gotoAndPlay(2);
}
if(score>2) {
    _level.level2.gotoAndPlay(3);
        }
if(score>7) {
    _level.level3.gotoAndPlay(5);
}


startGame is the name of a button....the score is a dynamic text box.....the (2),(3),(5)....are the frames of the scene with the background i want....ones a city and ...u know watever ... just different maps.......the only thing in the code im not so sure about is the _level ....although it was _root......before and did the same thing...so i basically gotta figure out how to make it so it doesnt just play all the frames like an animation....and MAKE it listen to the button i made....so u can only start the game if u click the startGame button....
User is offlineProfile CardPM
+Quote Post

girasquid
RE: Need Some Help With Some AS.....Flash Programming
11 Aug, 2007 - 08:33 PM
Post #2

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,294



Thanked: 18 times
Dream Kudos: 725
My Contributions
Why not try using gotoAndStop() instead of gotoAndPlay()?
User is offlineProfile CardPM
+Quote Post

C++FTW
RE: Need Some Help With Some AS.....Flash Programming
11 Aug, 2007 - 08:43 PM
Post #3

New D.I.C Head
*

Joined: 2 Aug, 2007
Posts: 7


My Contributions
will try it right now thx :_)

damn didnt work...i could prob put the entire file in an attachment lol....cause i got no idea wtf to do lol
....hrmmm i looked in the options of the swf or watever it is....and Loop was on....might have been the problem

i tried to add an attchment but i dont think it worked...probably have to try and find a site to host it and watevs...but also i havent finished some other things in the game yet but it shouldnt conflict with what the prob is...like i wrote code for the Enemies...but didnt put the enemies in the game yet...so if i got it to work id just be able to get to lvl 1 ....since i wouldnt be able to obtain score yet since no enemies but ya i type to fast....

This post has been edited by C++FTW: 11 Aug, 2007 - 09:09 PM
User is offlineProfile CardPM
+Quote Post

C++FTW
RE: Need Some Help With Some AS.....Flash Programming
13 Aug, 2007 - 07:36 PM
Post #4

New D.I.C Head
*

Joined: 2 Aug, 2007
Posts: 7


My Contributions
i Figured it out!!!!!! you just go into the frame of the level ...go to its action panel and put in
CODE
stop();
........thats it lol

This post has been edited by C++FTW: 13 Aug, 2007 - 07:37 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 06:59PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month