Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




D20 Game System Help.



It's been about two years since I was last on this site, and I find myself in need of some more assistance. A friend and I are going to (try) to make a standalone D&D game (we'll work out the licensing issues if we actually get it off the ground), and I'm a little rusty on my Actionscript, and I don't have a lot of experience with programming. I need some help setting up a d20 system that has room for updates and improvements. We plan to implement just about every aspect of the D&D experience into one Flash game (maybe). I'd like to know if this is even possible, first off, and how I can actually get the system running.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 05-09-2008, 02:14 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Car Game System
hello
i would know if somebody know how to script a car movement like in this site
http://www.pepere.org/flash-game_1_x...parking_1.html

any help would be apreciatte

thx

Battle System In A Game
i'm trying to make an rpg in flash, and a major thing in this is the battle system. i was thinking golden sun, turn-based/gameboy type for this. a few people have suggested using a database for this, but to be honest, i haven't got a clue how to set one up, or use it.

any hints, tutorials i could use? using flash mx

cheers

Highscore System In A Game
Hi,

Here is what i want to do:

I have a game, which is finished and works fine. It has three levels: easy, normal and hard. Now what I want to do is to create a highscore system for each of these levels.
It has an endscore in time, for example:
13.09.15 (minutes, seconds, milli-seconds)
In the end of the game (game over screen) there must be a button which says "submit score". If you click that, it needs to go to another frame where you can add your name, and press a button named "submit". It must automaticly check if your score is in the top 10 (as that are the only ones it needs to remember). And write your name with your score down there.

I DON'T know any serverside scripting, so i need a full working script as i can't make that on my own.

Does anyone know a good tutorial or can explain to me what i need to do to get this working?!

Thanks, Death

Conversation System(game)
hello there,
in one of my upcoming rpg games i wish players to be able to talk to NPCs for infor etc. if you are unsure what i mean take the example below:

npc: hello there do you want a present

the player then chooses a response:
1) yes please
2) no thank you

this would then invoke a response from the npc depending on what they selected.

i was wondering if such a system/engine existed for flash that i may be able to use to save me writing my own. credit would of course be given to the author.

thank you for your help in advance

---------
ahref

Game Map System Design
Hello, I'm trying to sort out a way to create a seperate function that loads the graphical and positional elements for the bird's-eye-view maps of my game.

Basically what the repetitive code below does is create 9 movie clips. one for each direction from East CCW thru North East. All using the same (forest) movieclip and assigned a different frame and position depending on it's relationship to the center of the stage. All 9 movie clips are then added to the worldContainer which is a display object container that holds every visual element in the game.

My issue is I want to make each var mapXX using a movieClip() method and adding mapLoaded (in this case the forest MC) as a child. but i am forced to specify the method forest() because I'm unable to use mapXX.addChild(mapLoaded) more than once.

Any help with this or advice for a total rewriting of this code is great ty.

var mapLoaded:MovieClip=new forest();
function loadMap(mapLoaded:MovieClip):void{
// 9 Map sections
trace(mapLoaded);
var mapCenter:forest=new forest();
var mapEast:forest=new forest();
var mapNE:forest=new forest();
var mapNorth:forest=new forest();
var mapNW:forest=new forest();
var mapWest:forest=new forest();
var mapSW:forest=new forest();
var mapSouth:forest=new forest();
var mapSE:forest=new forest();

mapCenter.addChild(mapLoaded);
mapEast.addChild(mapLoaded);
mapEast.gotoAndStop(testArray[0]);
mapEast.x=600;
mapNE.gotoAndStop(testArray[0]);
mapNE.x=600;
mapNE.y=-550;
mapNorth.gotoAndStop(testArray[0]);
mapNorth.y=-550;
mapNW.gotoAndStop(testArray[0]);
mapNW.x=-600;
mapNW.y=-550;
mapWest.gotoAndStop(testArray[0]);
mapWest.x=-600;
mapSW.gotoAndStop(testArray[0]);
mapSW.x=-600;
mapSW.y=550;
mapSouth.gotoAndStop(testArray[0]);
mapSouth.y=550;
mapSE.gotoAndStop(testArray[0]);
mapSE.x=600;
mapSE.y=550;

//Add All 9 Sections of Map
currentMap.addChild(mapCenter);
currentMap.addChild(mapEast);
currentMap.addChild(mapNE);
currentMap.addChild(mapNorth);
currentMap.addChild(mapNW);
currentMap.addChild(mapWest);
currentMap.addChild(mapSW);
currentMap.addChild(mapSouth);
currentMap.addChild(mapSE);

//Add To World Container
worldContainer.addChildAt(currentMap,0);

}

Game Map System Design
sorry for the double.

Scoring System For Game All Wrong
HELP!! I would greatly appreciate any help I can get to fix the scoring system on a paddleball game I created. The scoring system is all messed up. HELP!!

Creating Password System For A Game
Hey guys,

I have an interesting problem I need some help with.

I have a game with different levels and I want a password system so that the player can continue from their last level during different sessions.
The password would be a string and would be unique to each level.
The game also has 3 difficulty levels.

The catch is that levels will be added dynamicly from an xml file, so the number of levels is not fixed.

My idea was to have 100 numbers for example for 100 distinct levels and 100 possible passwords.
EASY 0 - 9
MED 10 - 49
HARD 50 - 99

Initialy there will only be 5 levels per diificulty.
This way I have a maxium of 10 levels for EASY, 40 for MED and 50 for HARD which is enough.
If the player enters a password for a level that doesn't exist yet the game checks the database to see if it exists so it's not a problem.

So now i need to generate 100 passwords(5 chars from A-Z) for 100 unique levels.
Any ideas?
I guess i would need a function
level -> pass_string
pass_string -> level

Could someone point me in the right direction? Discuss different ways of going about it? Any Ideas?

Hope this make sense!

thanks

Making A Cheat System For My Game
Currently I have made a maze type game where you control the player with your keys and avoid walls...

However every time you beat a lvl it gives you a "code" wich you input on the starting page to resume that lvl

I was wondering if there would be a way where i could input a code and have that code edit the speed of my "Player"

currently all i am using for the speed is...

myspeed = 7;

(each lvl is on a separate scene)

This problem is quite puzzling and i want to figure it out

-Thanks

High Scoring System For Game
Armor bot ranks software, gives you an actionscript that sends the score you want directly online, I have successfully finished it but in the game if i enter a number like 200 and a name like "yair" it works out just fine but when i put a variable like tt that is connected to a number it doesnt work. Here is the Code do you think you can help. Im guessing tt is time because i made this game with a partner

The First keyframe has the code from my game in it then the next keyframe has the armorbot code:

stop ();
sintro.stop();
t = Math.round(_global.totaltime * 10) / 10 + " units";
tt.text = t;
ct.text = _global.totalclickcount;
_global.puNUM = 1;
par = 1;
clickcount = 0;
N = 30;
hs = 3;
ci._visible = 0;
flr = floor._y;
kuid = false;
xv = 0;
yv = 20;
g = 1.010000E+000;
xd = 0;
go = true;
boost = 1;
_global.score = 0;
ballx = ball._x;
bally = ball._y;
d = 9.700000E-001;
bbu = 5;
bu = 20;
bhu = 23;
hb2l = 10;
hb2r = 10;
vb2t = 3;
vb2b = 10;
var B = new flash.filters.BlurFilter(0, 0, 2);
var bupA = new Array();
////////////////////////////////////////////////////////////////////////////////////
Heres the code on the button to the next keyframe:

on (press) {
nextFrame();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
And Here is the ArmorbotCode take note of the t's:

//Send Highscore AS2.0 // Armor Bot Rankz
import ab3.rankz.*;
function __rankz_send__(par1,par2,par3,par4){
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = Armor_Bot_30_En_AS1.Encode(par4+"j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function(success){
if(success){
trace(par228.msg);
}else{
trace(par228.loaded);
}
}
par227.sendAndLoad("

Flash Game Scoring System
Hi, I just got a little case, it's a flash game, but I hvae a problem is that I don't know how to send the scores back to server side database, how should I do this? after I make a flash game, and then send the score to database, any tutorias? or samples? thanks a lot.

Tiered Scoring System For Flash Game
Hi,

I am new here and I have a problem that I have been trying to fix for a good month or so now. I am not overly familiar with ActionScript but I have an average understanding of how it all works. Anyway, here is my problem:

I have created a Flash game based on the kids learning game "Look, Say, Cover, Write, Check" using a quiz template provided by Flash, I don't know if anyone knows the game but what basically happens in the game is the user is given a word, audio plays the word, an animated hand covers it up, the user is then prompted to type in the word, they click a check answer button and that then tells them whether it is spelt correctly or not. This is where the problem occurs, at the current time, the student gets three goes at spelling the word correctly and what I want to do is have a scoring system so if the user gets the word right the first time they get 10 points, second time they get 5 points, third time they get 2 points and then if they get it wrong again the game proceeds onto the next word. Does anyone have any idea how I may be able to implement this kind of scoring system using ActionScript in Flash MX? Any help will be greatly appreciated.

How Do I Add A Friking Scoring System To My Dancing Game?
My game dance dance zucchinilution needs a scoring addition but it just doesnt work how can i make it work???? (i have flash five) should i also buy the new flash mx????

One *nasty* Equation-system In Need Of Solving For Scorched Earth Type Of Game
Don't let the length of the tread frighten you.

I'm working on a game much like the old DOS classic Scorched Earth.

http://www.rydeman.com/erik/tanks3.html

I have now come to a point in development when it would be a good idea to start poking the AI for opponents a little.

What I need is for the enemy tank to calculate the rotation/power combo that will hit another tank bullseye. After that I'll add some randomness to that depending on difficulty.

Anyway, here's how I calculate the projectile's path (all the hittest crap etc. of the function removed of course):

Code:
on(enterFrame){
count++
this._x =startX+power*count*Math.cos(-rotation*Math.PI/180)*AR;
this._y =startY-(power*count*Math.sin(-rotation*Math.PI/180)-0.5*gravity*count*count);
}
All values are constant except for rotation, power and count.

Again, the task:
Getting the best power/rotation combo!

For those who wish to know what these values do:
Power varies between 0 and 100 but is multiplied with 0.21875 above. you do not need to know this.
rotation varies between 0 and 180 but we can limit it to 0-90 by comparing x-coords or maybe 45-90 by rationalising.

statX/startY= the position of the tank fireing.
this._x/this._y = the position we want the projectile to be at ie the other tank's position.
AR=air resistance(0.95).
gravity = the acceleration down of pixels/(frame*frame) (=0.5)


Ideas for solving it (Allah knows I've tried):

Getting rid of count by replacement and put the derivative of rotation as a function of power to 0. (or the other way around)

Making power a high constant and just calculating the rotation. this will look kinda bad but a possible if-all-else-fails solution.

or if all else *really* fails making a few thousand calculations comparing all combos and picking the best one.

Anyone that works out a *good working* solution *will* be mentioned in the credits!

Even if you don't have the time to have a go at it, ideas for solving it or comments about the game so far is greatly appreciated.


[Edited by Rydeman on 07-15-2001 at 04:49 PM]

Flash.system.System.totalMemory Different Than Windows Mem Display
Anyone know why flash.system.System.totalMemory is much different than what I see FlashPlayer taking up in the Windows Task Manager?

I would expect to see some overhead, but the differences I'm seeing are quite large (i.e. 80MB vs 150MB).

Thanks

What Does System.capabilities.language Return On Your System?
I am working on a multi-lingual web site that automatically detects the user's OS or browser language by using System.capabilities.language .

Since I am running a german OS/browser, this returns 'de' in my case, but I wonder what it returns on other systems (english, french, spanish etc.)

To find this out, please copy and paste this code into a Flash doc and see what it says:

trace( System.capabilities.language );

Thx!

Mike

System.pause(); And System.resume();
I've been looking for a simple way to pause everything inside the flash player when a user clicks on a pause button. I found what I thought to be a solution by running System.pause() method. This sounds funny but the problem is that this method does exactly what it's supposed to do, meaning it pauses EVERYTHING.

There is another System method call resume(). But with the entire player pause, how is one supposed to call this method when the pause button is clicked a second time?

This is what I thought about using:


ActionScript Code:
public function pauseSystem(evt:MouseEvent):void {
            if(!sytemPaused){
                sytemPaused = true;
                System.pause();
            } else {
                sytemPaused = false;
                System.resume();
            }
        }

But once the pause() method runs, nothing is clickable. I've got tons of event listeners and things happen all at once, so I'd rather not have to go through removing and adding event listeners every time the user clicks a pause button. Any ideas? Thanks.

Needs EXPERT Help: 1. Save Game For Replay, 2. Reset Game
I'm rather new to Action Script, but doing not bad. I have searched the Board, found a link to a tutorial on ActionScript[Org], titled: "save a local copy of file". But that was yet not clear enough for me.

2 Questions at the moment (files attached):

1. Save Game for Replay: How can I save the set to a file in the Same Folder so it could reload for further play from that point on?

2. Reset Game: How can I Reset the Game for a NEW Attemp? I need to remove all Actors at once, to start a new game, without closing this SWF and reopenning it.

If you'd be so kind as to explain very clearly, and add Action Script, taking into consideration that I still get confused by trying to deal with Arrays and so. I promise to study your lesson carefully - this GameTest attached is the fruit of this week studies.

THANKS A LOT
Nit Kalish

Was This Game Made From Flash ? (Zadarider) Download The Game
Was this game made using flash 8 because it seems to run very well even when i have made up to 10000 lines.

Flash Game Help The Game Runs Too Slow In A Browser
lo there!
I'am so frustrated!

I have made a plattformgame in flash, and after I had published it I tested it (local) when it was embedded in a browser, and it hacks and laggs! But when I play it in the flash player it works just fine.
What should I do?

I removed all the heavy graphics, lowerd the fps to 30fps and removed all the code so now its just the bassis left (gravity, collision, key checking etc. and yes u should bounce on the walls giving a wall jump effect).

Anyone please! I am in big need of help!
Is it my code? Did I publish it wrong?

here are the links:

http://smh03.lbs.se/smh03niklas/prof...ofilbollen.swf
http://smh03.lbs.se/smh03niklas/prof...ofilbollen.fla
http://smh03.lbs.se/smh03niklas/prof...filbollen.html


//Qui

How To Disply Time In Game And How To Stop After The Game..
Hi all,

i need help on drag and drop game...

i have done the drag and drop function, for this game timer has to be shown, after user finishes the drag & match, it should give finish alert and time taken for this game (please tell me also how to stop time after he finish the game) is to be sent to some external file or some database...

can it be done?
i have attached the .fla file also..

[F8] Game Studio Needs Flash Game Programmer
Hi -

I've been working on cartoon Flash interfaces for awhile. Now my clients want games, so I'm looking for one or two Flash game actionscripters who can help out and maybe start a studio. Since it's a startup, I'm looking for someone who's good, but not yet making millions - hoping we can do that ourselves eventually. Someone dependable, easy-going and easy to get along with. Would be great to find someone relatively local, but not absolutely necessary.

We'll be creating custom Flash games for an existing client.

Hoping to check out people's games first.

J.

[F8] How Can I Make A Game With Levels And A Game That Restarts?
I know this sounds stupid, but I just can't figure it out. I need to make a platform game. I'm fine with making a points system and a scrolling background and it functions but I don't know how to get the player to touch an object, or reach a goal and then transport to another level...I don't want to make the user have to click something to go to a new level.

Also, when the character hits an enemy, I can make it die, but I don't know how to make a button or something appear saying 'Game Over - Try again', so they can pretty much restart the level.

Hopefully someone can help me.
Regards,
Andrea

Help With A Game.. Game Is Running Slow In Browser..
I am working on this game for work and for now all i have is placeholder art for the most part and nothing very heavy on the graphics end yet my game is running very slow.. i bumped the FPS to 60 since at 30 i was getting image tearing or a double vision effect.. the upped FPS fixed that but the game is still running very slow. To give you an idea of what's going on i have different intervals running so different things can happen at different times.. there are 2 constant onEnterframes for the 2 enemies flying around the screen.. there is 1 for the main loop, 1 for the character, 1 for whenever tickets generate which removes itself and deletes the enterframe when they disappear, 1 for the wrecks that occur on level 2 which also remove themselves and delete enterframes for themselves, and 1 for a holder that handles all the money flying in which removes themselves as they collide with the player or leave the screen. All enterframes that run during gameplay delete themselves at the end of each level and re-initialize at the beginning of the next.

I can't figure it out.. please take a look at the fla and html files attached. Could it be just the sheer size of the game screen.. should i make it about half the size?? I appreciate any help and thank you.

Also the game's scripted animations seem to be running a little choppy if you watch their movement closely like there is a little glitchy jump every second or so.. is this fixable?

AS Help Needed In Game(i Will Give Credit In Game If You Help)
ok so basicly this is my game so far
23.swf

my probelm is that i want to make my charcter a flame and the tips of his head will move depending on the direction you are going.
So here is basicly this what its like

Moving left-Flames bend to right
Moving left and down-Flames bend at an angle between the left and down
Moving Down-Shorter Flames
Moving Up-Stretched Flames
etc...

ill put borders on after i get the flames down

Updating Game Stats During Game
B"H

hi - happy new year

i have a small problem - i run a college sports website - i want to update game stats during the game and ppl would go my website and access the stats as i type them - they are in microsoft database and i have php cgi flash mysql on my server (just not asp) and i want it to be that as i type the scores and then switch cells w/o uploading the new file - flash could still access the files from my computer and update the page auto - (it could load the files from my i.p. addy)

what is the best way to do this - do you have any examples?

thanks

yechi

[CS3] Snake Game, Game Size
I'm using this snake game code from the old Nokia phones. The game takes place in a 150X150 square, i want this to be 384X512 but ideally it would be in a var so it can be changed easily. Can anyone help?


PHP Code:



var unit = 15;//size of snake partsvar uwh = 20;//?var canMove = false;var dir = 2;var score = 0;aPieceList = new Array();mouseListener = new Object();mouseListener.onMouseDown = function(){    if (!canMove)    {        canMove = true;        startGame();    }};Mouse.addListener(mouseListener);k = new Object();k.onKeyDown = function(){    var k = Key.getCode();    if (k == Key.UP && dir != 2 && canMove)    {        dir = 0;        canMove = false;    }    else if (k == Key.LEFT && dir != 3 && canMove)    {        dir = 1;        canMove = false;    }    else if (k == Key.DOWN && dir != 0 && canMove)    {        dir = 2;        canMove = false;    }    else if (k == Key.RIGHT && dir != 1 && canMove)    {        dir = 3;        canMove = false;    }};Key.addListener(k);function addPiece(){    var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length);    p._x = aPieceList[aPieceList.length - 1]._x;    p._y = aPieceList[aPieceList.length - 1]._y;    aPieceList.push(p);}function moveFood(){    var moveIt = true;    while (moveIt)    {        food._x = Math.floor(Math.random() * uwh) * unit;        food._y = Math.floor(Math.random() * uwh) * unit;        moveIt = false;        for (var i = 0; i < aPieceList.length; i++)        {            if (aPieceList[i]._x == food._x && aPieceList[i]._y == food._y)            {                moveIt = true;            }        }    }}function gameOver(){    delete this.onEnterFrame;    tScore.text = "You Lose.  Score: " + score;    canMove = false;}function startGame(){    for (var i = aPieceList.length - 1; i >= 0; i--)    {        aPieceList[i].removeMovieClip();        aPieceList.pop();    }    score = 0;    var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length);    aPieceList.push(p);    p._x = 10 * unit;    p._y = 10 * unit;    var food = this.attachMovie("food", "food", -1);    var c = 0;    moveFood();    var startingLength = 3;    for (var i = 1; i < startingLength; i++)    {        addPiece();    }    this.onEnterFrame = function()    {        canMove = true;        tScore.text = score;        for (var i = aPieceList.length - 1; i > 0; i--)        {            aPieceList[i]._x = aPieceList[i - 1]._x;            aPieceList[i]._y = aPieceList[i - 1]._y;        }        if (dir == 0)        {            aPieceList[0]._y -= unit;        }        else if (dir == 1)        {            aPieceList[0]._x -= unit;        }        else if (dir == 2)        {            aPieceList[0]._y += unit;        }        else if (dir == 3)        {            aPieceList[0]._x += unit;        }        if (aPieceList[0]._y / unit == 20)        {            aPieceList[0]._y = 0;        }        else if (aPieceList[0]._y / unit == -1)        {            aPieceList[0]._y = 19 * unit;        }        else if (aPieceList[0]._x / unit == -1)        {            aPieceList[0]._x = 19 * unit;        }        else if (aPieceList[0]._x / unit == 20)        {            aPieceList[0]._x = 0;        }        if (aPieceList[0]._x == food._x && aPieceList[0]._y == food._y)        {            score += 10 * aPieceList.length / 2;            moveFood();            addPiece();        }        for (var i = 1; i < aPieceList.length; i++)        {            if (aPieceList[0]._x == aPieceList[i]._x && aPieceList[0]._y == aPieceList[i]._y)            {                gameOver();            }        }    };}

Save Game/load Game
How do you get the browser to remember all the variables and what point you're in on the timeline when you press "Save Game," and how do you get it to reload those variables when you press "Load Game." Is this some extremely complicated process?

How To Save A Game And Load A Game?
I don't know the codes that can make a game can be saved and be loaded. I have been trying out some codes but they doesn't work. So, can anyone help me please? Im using Flash MX 2004 and Im doing a standalone game.
So, how to make it? Can teach me step by step? Please??

Card Game (turn-based) - Lobby Room And Game Room, Maintain State
Hi all, I´m new in this forum, since now i appreciate for any help.

I´m developing a turn-based card game in Flash 8 (multiplayer), using the concepts of lobby and room. In this case when the user login de game, he always see the lobby, where he can choice the games, then the user selects a game in a dataGrid and enter the game.

Inside the game (that resides in another frame in my .fla), there is a button that when clicked brings de users to the main lobby ( gotoAndStop(“lobby”) ) so that the user can visualize the lobby with the game running in background with the others users.
The problem is when the user return to the game ( gotoAndStop(“game”) ), the images, cards, players name and chat history text disappear, all the game object disappear, remaining only the original graphics (movie clips) to the game room.
In fact, I need a solution to maintain the state of the game when the user decide to visualize the lobby (with the game running) and after return to the game.

Thanks for any help.

Regards,

Luiz Filipe (CURURU)

Os: Sorry for my bad english -

Game Control Panel --> How2make Object Appear In Control Once Discovered In Game
Hey all you flashies,
here's a problem to scramble the flash nerves. I'm creating a game for my Major project and I want to have a control panel at the bottom. The aim of the game in brief, is to collect 6 pieces of fruit (just an example). These 6 pieces of fruit will be found in different order depending on which route the player takes in the game. What I want to happen is each time the player finds a fruit, I want it to appear in the control panel. How do I go about doing this? Can anyone help? Much appreciated! If anyone has an example to something similar to this it would be much appreciated if I could see it! thanks!

I Really Like This NAV System
I really like this nav system and would like to recreate it.

http://www.frontmedia.co.uk/

If some one could point in the right direction that would be great.
thanks

readyornot

Tab System?
How can I make a tab system which loads html files in a specific tab?

Suppose I create a Flash movie clip containing a tab system and on each tab the HTML file is loaded in a frame just below the frame housing the Tab movie clip while bringing the appropriate tab to the foreground. Is there a way to change the HTML file on a tab and/or bring up a different tab to the foreground by sending the HTML linked URL to the Flash movie via JavaScript or something like that. I'm trying to send/translate a variable with a URL as a value to a movie clip and then load that URL's file onto the relevant tab's "page".

Thanks for any help or hints...

jruben

How To Do A F1 Nav System
hi,
i want to do a navigation system similar to the F1 system (the one on the right side).

http://www.f1play.com

i got heaps of links to show in a list one after the other, so i think this would be a nice solution... could anyone give me a hint?

cobo

Help With Map Pin System
Well here is the deal.

I have a map of my country (Greece) and i want to place pins on it to point out the places i have been, links to photos etc, files etc.

I want you to guide me at how to make my programm to remember where i've placed those pins. Should i save the x,y location of the every pin to a table at a database for example and fetch them at loading?

Help With A Tab System
Hey all.. I'm trying to make a tab system and I'm having a problem with clicking on one tab, and then having that tab call a function that resets the appearance of any other tabs that are "on" to "off" Here is basically what I have here:

It all works, but I don't know how to have All instances of the Tabclass respond to the RESET_BUTTON event. I can't seem to figure out how to address the displayList or?????

Thanks in Advance!

C

Tabclass.as

Code:
package com.mysite.testing {

import com.mysite.testing.DisplayContent;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.text.TextFormatAlign;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.*;

public class TabClass extends Sprite{

private var _totalTabs:Number;

public function TabClass(pos:Number, totalTabs:Number):void {

_totalTabs = totalTabs;

var dataLoader:Sprite = new Sprite();

dataLoader.name = "dl"+pos;

if(pos==0){
dataLoader.graphics.lineStyle(1, 0xcccccc, 1, true);
dataLoader.graphics.beginFill(0xcccccc, 1);
}
else{
dataLoader.graphics.lineStyle(1, 0xa9a9a9, 1, true);
dataLoader.graphics.beginFill(0xa5a5a5, 1);
}
dataLoader.graphics.drawRect(0, 0, 114, 23);
dataLoader.graphics.endFill();

dataLoader.addEventListener(MouseEvent.CLICK, clickMe);
dataLoader.addEventListener(ResetButtonEvent.RESET_BUTTON, buttonReset);

var boxName:TextField = new TextField();
boxName.text = "Testing";
boxName.width = 110;
boxName.height = 25;
boxName.mouseEnabled = false;
boxName.wordWrap = true;

var boxNameFormat:TextFormat = new TextFormat("Trebuchet MS", 11, 0xffffff, true, null, null, null, null, TextFormatAlign.CENTER);
boxName.setTextFormat(boxNameFormat);

dataLoader.mouseEnabled = true;
dataLoader.buttonMode = true;

trace("TabClass working");
var displayContent:DisplayContent = new DisplayContent(10);
dataLoader.addChild(boxName);
addChild(dataLoader);

}

private function clickMe(evt:MouseEvent):void{
evt.target.dispatchEvent(new ResetButtonEvent());

evt.target.graphics.clear();
evt.target.graphics.lineStyle(2, 0xCCCCCC, 1, true);
evt.target.graphics.beginFill(0xCCCCCC, 1);
evt.target.graphics.drawRect(0, 0, 114, 23);
evt.target.graphics.endFill();
}

private function buttonReset(evt:ResetButtonEvent):void{
trace("halp");
}
}
}
ResetButtonEvent.as

Code:
package com.mysite.testing{

import flash.events.*;

public class ResetButtonEvent extends Event{

public static const RESET_BUTTON = "resetButton";

public function ResetButtonEvent():void{
super(RESET_BUTTON);

}
}
}

AS3 - Tab System
Hey all.. I'm trying to make a tab system and I'm having a problem with clicking on one tab, and then having that tab call a function that resets the appearance of any other tabs that are "on" to "off" Here is basically what I have here:

It all works, but I don't know how to have All instances of the Tabclass respond to the RESET_BUTTON event. I can't seem to figure out how to address the displayList or?????

Thanks in Advance!

C

Tabclass.as

Code:
package com.mysite.testing {

import com.mysite.testing.DisplayContent;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.text.TextFormatAlign;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.*;

public class TabClass extends Sprite{

private var _totalTabs:Number;

public function TabClass(pos:Number, totalTabs:Number):void {

_totalTabs = totalTabs;

var dataLoader:Sprite = new Sprite();

dataLoader.name = "dl"+pos;

if(pos==0){
dataLoader.graphics.lineStyle(1, 0xcccccc, 1, true);
dataLoader.graphics.beginFill(0xcccccc, 1);
}
else{
dataLoader.graphics.lineStyle(1, 0xa9a9a9, 1, true);
dataLoader.graphics.beginFill(0xa5a5a5, 1);
}
dataLoader.graphics.drawRect(0, 0, 114, 23);
dataLoader.graphics.endFill();

dataLoader.addEventListener(MouseEvent.CLICK, clickMe);
dataLoader.addEventListener(ResetButtonEvent.RESET_BUTTON, buttonReset);

var boxName:TextField = new TextField();
boxName.text = "Testing";
boxName.width = 110;
boxName.height = 25;
boxName.mouseEnabled = false;
boxName.wordWrap = true;

var boxNameFormat:TextFormat = new TextFormat("Trebuchet MS", 11, 0xffffff, true, null, null, null, null, TextFormatAlign.CENTER);
boxName.setTextFormat(boxNameFormat);

dataLoader.mouseEnabled = true;
dataLoader.buttonMode = true;

trace("TabClass working");
var displayContent:DisplayContent = new DisplayContent(10);
dataLoader.addChild(boxName);
addChild(dataLoader);

}

private function clickMe(evt:MouseEvent):void{
evt.target.dispatchEvent(new ResetButtonEvent());

evt.target.graphics.clear();
evt.target.graphics.lineStyle(2, 0xCCCCCC, 1, true);
evt.target.graphics.beginFill(0xCCCCCC, 1);
evt.target.graphics.drawRect(0, 0, 114, 23);
evt.target.graphics.endFill();
}

private function buttonReset(evt:ResetButtonEvent):void{
trace("halp");
}
}
}
ResetButtonEvent.as

Code:
package com.mysite.testing{

import flash.events.*;

public class ResetButtonEvent extends Event{

public static const RESET_BUTTON = "resetButton";

public function ResetButtonEvent():void{
super(RESET_BUTTON);

}
}
}

Help With A Tab System
Hey all.. I'm trying to make a tab system and I'm having a problem with clicking on one tab, and then having that tab call a function that resets the appearance of any other tabs that are "on" to "off" Here is basically what I have here:

It all works, but I don't know how to have All instances of the Tabclass respond to the RESET_BUTTON event. I can't seem to figure out how to address the displayList or?????

Thanks in Advance!

C

Tabclass.as
Code:

package com.mysite.testing {
   
   import com.mysite.testing.DisplayContent;
   import flash.display.MovieClip;
   import flash.display.Sprite;
   import flash.text.TextFormatAlign;
   import flash.text.TextField;
   import flash.text.TextFormat;
   import flash.events.*;
   
    public class TabClass extends Sprite{
      
      private var _totalTabs:Number;
      
        public function TabClass(pos:Number, totalTabs:Number):void {
         
         _totalTabs = totalTabs;
         
         var dataLoader:Sprite = new Sprite();
         
         dataLoader.name = "dl"+pos;
         
         if(pos==0){
            dataLoader.graphics.lineStyle(1, 0xcccccc, 1, true);
            dataLoader.graphics.beginFill(0xcccccc, 1);
         }
         else{
            dataLoader.graphics.lineStyle(1, 0xa9a9a9, 1, true);
            dataLoader.graphics.beginFill(0xa5a5a5, 1);
            }
         dataLoader.graphics.drawRect(0, 0, 114, 23);
         dataLoader.graphics.endFill();
         
         dataLoader.addEventListener(MouseEvent.CLICK, clickMe);
         dataLoader.addEventListener(ResetButtonEvent.RESET_BUTTON, buttonReset);
         
         var boxName:TextField = new TextField();
         boxName.text = "Testing";
         boxName.width = 110;
         boxName.height = 25;
         boxName.mouseEnabled = false;
         boxName.wordWrap = true;
         
         var boxNameFormat:TextFormat = new TextFormat("Trebuchet MS", 11, 0xffffff, true, null, null, null, null, TextFormatAlign.CENTER);
         boxName.setTextFormat(boxNameFormat);
         
         dataLoader.mouseEnabled = true;
         dataLoader.buttonMode = true;
         
            trace("TabClass working");
         var displayContent:DisplayContent = new DisplayContent(10);
         dataLoader.addChild(boxName);
         addChild(dataLoader);

        }
   
      private function clickMe(evt:MouseEvent):void{
         evt.target.dispatchEvent(new ResetButtonEvent());
                  
         evt.target.graphics.clear();
         evt.target.graphics.lineStyle(2, 0xCCCCCC, 1, true);
         evt.target.graphics.beginFill(0xCCCCCC, 1);
         evt.target.graphics.drawRect(0, 0, 114, 23);
         evt.target.graphics.endFill();
      }
      
      private function buttonReset(evt:ResetButtonEvent):void{
         trace("halp");
      }
    }
}


ResetButtonEvent.as
Code:

package com.mysite.testing{
   
   import flash.events.*;
      
   public class ResetButtonEvent extends Event{
      
      public static const RESET_BUTTON = "resetButton";
            
      public function ResetButtonEvent():void{
         super(RESET_BUTTON);

      }
   }
}




ResetButtonEvent.as
Code:

package com.mysite.testing{
   
   import flash.events.*;
      
   public class ResetButtonEvent extends Event{
      
      public static const RESET_BUTTON = "resetButton";
            
      public function ResetButtonEvent():void{
         super(RESET_BUTTON);

      }
   }
}

3d Navigational System
Can someone help with the scripting to make a 3d navigational menu.

Check out http://www.fifthrotation.com to see what I'm talking about. Click on the menu and the 3d navigational system is the 6th button.

I have some sort of idea of how to work something like this out, but I'm looking for suggestions. I'm not that good at math, and I can only assume there are tons of math equations involved.

Thanks,

a..

Navigation System - Help
How did they do that? Check out http://www.greekislandstoronto.com

How did they do the effect that is created whenever you go from one area to another in the site - via the navigation? The images scroll/move depending on what link you choose.

Is that a long clip that has goto and stop actions that correlate to the navigation links????

Any idea how it is done? Any tutorial links to how that is done? Can you supply a tutorial?

I would like to use that effect in my portfolio site.

Score System
Can anyone tell me how to create a score system? I really need one. Thanx

Please Help With My Navigation System
Hi I was wondering if someone could help me with my navigation system? I will try and explain my problem as clearly as possible. I have a navigation bar (which is a Movie Clip in the main timeline). This navigation bar controls the whole site and allows the user to enter certain sections of the site. Now when a user clicks on a section 1, he/she enters the section and is shown a text that fades in. Now is the tricky part, which I am having trouble with. When the user leave that section of the site to go to another section,

e.g. I am in section 1 and I want to go to section 4. So I click on button no.4 in the navigations bar, which then takes me to section 4.

Now when the user leaves a section I would like the text/image that faded in when entering a section to fade out when leaving. Does this seem clear enough. So when you enter a section you have a text or an image fading in, then when you leave a section I need the text or image to fade out. But it has to work for every section in the site,

e.g. I am in section 2 then go to 3
section 1 then go to 3
section 4 then go to 3
section 2 then go to 1
section 3 then go to 2
etc.....

I have thought about it, but I don't have much experience with flash. And having a goto action at the end of the section will not work cause it will only go to one section.

e.g. in the end of section 1 you have a gotoAndPlay ("section 2"); action
This is not the solution because if I want to go to section 4, the script will always send me to section 2.


Navigation system: Button 1, 2, 3, 4

----------------
| [1] [2] [3] [4] |
----------------


Main Timeline:

--[section 1]-----------------------------------------------
-------------[section 2]------------------------------------
------------------------[section 3]-------------------------
-----------------------------------[section 4]--------------


This is a simple diagram. If I am in section 1 I need to be able to jump to any section and have the text or image fade out when I leave section 1, then on entering the next section I need the text or image fade in. And I need this to work for any section I enter.

I am very grateful for any help given.

Flash Akira.

System Clock
How do I use action script to simply change a photo once every hour according to the system clock?

Help With Menu System Please
I have posted an image of what I want my navigation to look like here http://www.fuzzylogik.ws/nav_example.jpg

What i need to make happen:
1.When you click on any box, they all move clockwise to the next position until the item clicked is located in the "hotspot"
2.They don't need to tween between the locations, just move to the next spot until the selected item is in the "hotspot"...kinda like chasing christmas lights

My brain is aching from trying to figure this one out so any help would be greatly appreciated! If you know of a FLA posted in the movies section that does something like this please let me know...I had no luck finding any.

Thanks,
Chris Brixey
[FUZZY.LOGIK]

How To Get A System Time
Anybody please tell me how to get a system time in my flash animation.

A Menu System
http://www.nebulouscore.com/examples/NCNavmenu.html (.fla)
http://www.nebulouscore.com/examples/newlevel.as
http://www.nebulouscore.com/examples/CommandEngine.as
http://www.nebulouscore.com/examples/NavMenu.xml

Hardcore code. Enter at your own risk.

System Capabilities
I want to use the system.capabilities object to get the screenresolutionX and screenresolutionY.

Then I want to use these to scale my movie accordingly. Now how is that to be done?

Menu System
Hi,

I'm fairly new to flash, but was wondering if anybody out there with a slower machine could take a look at this for me:

http://www.geocities.com/thurstonis/...type.test.html

It's my first work with prototypes and I'm hoping that it was coded well enough not to bog down on slower computers.

Also, any tips on optimizing the code would be excellent.

Thanks!


Code:
onClipEvent (load) {
menuState = new Array("n", "sr", "fr", "sw", "fw");
currState = menuState[0];
// coordinates for "sr", [0] = x, [1] = y
sideRoofX = new Array(-112.3, -133, -131.1, -136.7, -133.1);
sideRoofY = new Array(-62.5, -79, -69.7, -71.8, -64.5);
frontWallX = new Array(-66.1, 1.4, -101.7, 2.7, -104.0);
frontWallY = new Array(-10.4, -26.8, -8.8, -18, -8.9);
sideWallX = new Array(-98.1, -111.1, -114.6, -112.6, -118.9);
sideWallY = new Array(-6.3, -11.3, 11.2, -12.4, -1.5);
frontRoofX = new Array(-75.4, 3, -117.3, 5.1, -122.5);
frontRoofY = new Array(-62.1, -78.7, -70.3, -71.9, -65);
myButton = function () {
for (i = 0; i < this.myX.length; i++) {
temp = new Object();
temp.x = this.myX[ i ];
temp.y = this.myY[ i ];
_parent.localToGlobal(temp);
this._parent.globalToLocal(temp);
this.myX[ i ] = temp.x;
this.myY[ i ] = temp.y;
}
this.gotoAndStop(menuState[myState]);
this._x = this.myX[_global.currFrame];
this._y = this.myY[_global.currFrame];
this.myState = _global.currFrame;
};
myButton.prototype = new MovieClip();
myButton.prototype.onEnterFrame = function() {
if (_global.hideButtons) {
this._visible = false;
}else{
this._visible = true;
}
if (this.myState != _global.currFrame) {
this.myState = _global.currFrame;
if (this.over) {
this.gotoAndStop(menuState[this.myState] + 1);
} else {
this.gotoAndStop(menuState[this.myState]);
}
this._x = this.myX[_global.currFrame];
this._y = this.myY[_global.currFrame];
}
};
myButton.prototype.onRollOver = function() {
this.over = true;
this.gotoAndStop(menuState[this.myState] + 1);
_parent.gotoAndPlay(menuState[_global.currFrame] + "-" + menuState[this.myName]);
};
myButton.prototype.onRollOut = function() {
this.over = false;
this.gotoAndStop(menuState[this.myState]);
//_parent.gotoAndPlay(menuState[_global.currFrame] + "-n");
};
myButton.prototype.onRelease = function() {
trace("I am " + this);
trace("My parent is " + this._parent);
trace("released");
trace("x=" + this._x);
trace("y=" + this._y);
trace("My X should be" + this.myX[_global.currFrame]);
trace("My Y should be" + this.myY[_global.currFrame]);
};
Object.registerClass("sideRoof", myButton);
Object.registerClass("frontWall", myButton);
Object.registerClass("sideWall", myButton);
Object.registerClass("frontRoof", myButton);
attachMovie("sideRoof", "srBUT", 100, {myName:1, myX:sideRoofX, myY:sideRoofY});
attachMovie("frontWall", "fwBUT", 101, {myName:4, myX:frontWallX, myY:frontWallY});
attachMovie("sideWall", "swBUT", 102, {myName:3, myX:sideWallX, myY:sideWallY});
attachMovie("frontRoof", "frBUT", 103, {myName:2, myX:frontRoofX, myY:frontRoofY});
}

Copyright © 2005-08 www.BigResource.com, All rights reserved