ActionScript 2.0 :: Turn Based Battle System Won't Work?

Sep 6, 2009

Basically I am making a Turn Based battle system. Each Frame is an attack. So for the enemy I did this:

(in scene Frame) attack = Math.round (Math.random ()*2)+0;

so it would randomly attack

then I also put in this in an object INSIDE my enemy clip

onClipEvent(enterFrame){
onClipEvent(enterFrame){
if (_root.attack == 1 || _root.attack == 2){

[Code].....

you see what ive tried to do here havent you?

why isnt it working? it plays, the random value thing works(used dynamic text box to check this) so what am i missing? (using AS2)

View 17 Replies


Similar Posts:


Flash :: Turn Based Strategy Game Techniques?

Feb 12, 2010

I want to make a turn base strategy game. I was just curious if anyone had any sources or books that explains the concept and architect of designing a turn based strategy game or any turn based game.

View 2 Replies

ActionScript 2.0 :: Condition Based On System Time?

Oct 4, 2007

I am playing around with the timedate.getHours(); function and I was wondering how I might go about setting up a condition whereby between 3am and 3pm, movieclip1 loads and between 3pm and 3am, movieclip2 loads?

I'm sure it's not that difficult but I'm not sure how to structure the if/else statement or read the hour from the timedate function.

View 1 Replies

ActionScript 3.0 :: Constraint Based Layout System For Flash CS3

Jul 24, 2007

use Flex which has a great constraint based layout system architecture by default, but in Flash CS3 there is no built in way to do this. To create intelligently resizing layouts, you have to manually resize each element on a stage resize event. This can create obscene amounts of code really fast, especially if you start to work in simple arithmetic to avoid hard coding in positions, such as "stageWidth-obj.x-obj.width" etc.

Is there any code library to do this for you built in AS3? I basically want something like this:

ActionScript Code:
var layout = new Layout();
layout.header_mc = 'left|right|top';
layout.left_mc = 'left|top|bottom';

[Code].....

View 9 Replies

ActionScript 3.0 :: Change Order System To Cart Based

Dec 3, 2009

I currently have a system that takes the users order and then sends the data to a php file where the details are then emailed to the shop admin. I accomplish this by using...

ActionScript Code:
//Retreive and pass the information to a PHP page
var variables:URLVariables = new URLVariables();
variables.vItemCode=menu4dynamictext.text;
variables.vBaseColor=basecolorpickertext.text;
var request:URLRequest=new URLRequest("sendmail.php");
[Code] .....

However I need to change this system so that rather than each order being sent automatically, the details are stored in an array so that a cart system can be produced somehow! It doesn't need to be overly secure, the system simply needs to email colour details etc to the admin.

View 4 Replies

ActionScript 2.0 :: [F8] Flash Based Rating And Comments System?

Apr 24, 2007

I'd like to create a rating and comments system to the video site I'm working on. Basically the user will rate the video (stars or thumbs up) from 1-5, have the new rating process and improve or lower the video rating automatically. For the comments the user will be able to write and send the comment and then either have it posted automatically with the option for the site moderator to erase any offensive comment or have it sent to a database for approval first and then post it by the site moderator. I assume I need a php form and action script code?

View 3 Replies

ActionScript 3.0 :: Create A Set Of Buttons Based On Loaded Images From Xml That OnClick Turn Red Or Grow In Size?

Jul 11, 2008

I want to create a set of buttons based on loaded images from xml that onClick turn red or grow in size, whatever, Clicking another turns that button red and the old one back to default. Alsoo it will attach a animated movieclip onclick to the button and when pressing another button, it swifts to that button.

Code:

var tracktype:Array = new Array;
var imgArray:Array = new Array;
var links:int;

[code]....

But Now the problem is that when another button is clicked I have to add the listeners back on the button, but I cant get the button because they all have the same name. Same with addChild the animated movieclip. Can't remove it. The buttons have a variable name, and can be unlimited.

View 8 Replies

ActionScript 3.0 :: Match System - Based On Frame Labels In Each MovieClip

Feb 2, 2012

I am starting to work out an early test of the match system. I know this is very basic, but I can't get the matching to work. Only using two cards and want the match based upon frame labels in each mc.

card1.addEventListener(MouseEvent.CLICK, card1buttonpress);
card2.addEventListener(MouseEvent.CLICK, card2buttonpress);
function card1buttonpress(e:MouseEvent):void {
card1.gotoAndStop("flip");
if (card1.currentLabel == "flip" && card2.currentLabel == "flip"){
[Code] .....

View 5 Replies

Javascript :: Modify Link Target Within PDF Based On Operating System

Jun 28, 2011

We have an "application" consisting of a large number of PDF files that link to each other.

Some of the PDF files have links that must be a web URL when running on a PC (or a Mac) but need to open a specific application when running on an iPad.

When not on the iPad, the links look like "http://10.85.1.102".

When on the iPad, they look like "netcam4://2" - which opens the NetCam4 application with camera 2 selected.

NOTE: this is already working but we have to create two versions of the PDF and it would be much better to have only one.

Is there a way using JavaScript (or ActionScript or whatever) for the PDF to determine in which OS it is being displayed and modify the link appropriately?

We don't care if this decision is made when loading the PDF or when the link is clicked.

By the way, so far we have found that GoodReader on the iPad is the only PDF viewer that will properly follow links - including those to the NetCam4 app.

View 1 Replies

Actionscript 3 :: Flash Based Countdown Timer In HH:MM:SS Using User's System Clock

Feb 16, 2011

Tasked with creating a countdown timer which I've done before but never using the user's system clock. Does anyone know if its possoble to access the system time from within flash?

View 1 Replies

ActionScript 2.0 :: Change Site Style Based On Users System Time?

Aug 31, 2006

how one might change a site element based on the users computer time? What we are trying to do is change the color of the sky and shade of the buildings in a cityscape scene on a cartoonish style site. If it is 9:00 PM on the site visitor's end, they will see a nighttime colored scene. If it's 7:00 AM, it would be sunrise-ish.

View 3 Replies

ActionScript 2.0 :: RPG Battle Music Loop?

Mar 28, 2009

well i was wonder how this could be done in flash or if its even possible with sound from the library..have the intro part of the song play first then loop the actual music for the duration of the scene.

View 2 Replies

ActionScript 3.0 :: Creating Rounds In A Battle?

Mar 9, 2012

what would be the best way of creating rounds for a battle system? Say like with each attack a round goes by. rounds are not calculated at randomor player 1 hits player two = 1 round gone, now it's round two and so on until the player(s) hit points are all gone I'm using while loops for the record

View 3 Replies

Actionscript 3.0 :: Movieclips To Turn On Or Off Won't Work?

Jul 17, 2009

I would like to use variables and arrays for the following scenario regarding a project I'm doing, but I'm not sure how to go about it. I've attached the fla file too as it's more self-explanatory.

Basically when you click on the little squares/pixels, they expand. If you click one of the movieclip-buttons, it pops up all the relevant pixels to make a desired pre-set shape. However if you start clicking the pixels after that and click on another button, the roles of the clicked pixels reverse and the negative happens. What I thought about doing was creating a variable on the pixel_mc movieclip (that way all instances would follow suit). When it has been clicked a variable is set to 1, from that I can decided whether or not to turn pixels that are on, to off, or off, to on. This would be decided with an IF statement, all which I can not do.

I would like to use functions and arrays to control most of this as there are 234 instances of one movieclip to control. Again I'm so not sure how to go about this.

View 4 Replies

Flash :: Best Development Tool For CBT (computer Based Training) / LMS (learning Management System)?

Dec 10, 2009

The CBT involves user interaction, like quizes, quiz progress, licensing etc. Should I go with flex, or should I go with flash?

View 1 Replies

ActionScript 3.0 :: Using System Capabilities To Work Out If In A Browser

Aug 13, 2009

I want to run a switch to detect if Im using my application insode a browser or just run in a player during testing. I'm wondering why I cannot findwhat Capabilities._internal gives me yet....

View 1 Replies

ActionScript 2.0 :: LoadMovie() Only Work On A Local System?

Oct 17, 2004

why a loadMovie("movie.swf", "_root.targetMC") would work on a local system, but when put onto a server (with EXACTLY the same file dir setup) would just lock up trying to transfer data? And I am talking about files that just contain one line of text, and nothing more. WTF?

View 2 Replies

ActionScript 2.0 :: An Inventory System That DOESN'T Work

Mar 27, 2005

I'm having trouble getting a certain function in my inventory to work properly.

View 5 Replies

ActionScript 2.0 :: Inventory System That DOESN'T Work?

Mar 27, 2005

I'm having trouble getting a certain function in my inventory to work properly... here's what I have...

View 6 Replies

ActionScript 2.0 :: System.security.allowDomain(domain) Exactly Work?

May 30, 2008

how does it work?

Code:
var domain = "http://www.mydomain.com";
System.security.allowDomain(domain)

View 2 Replies

Media Server :: Convert A Windows App To Work On A Linux System?

Jan 17, 2010

For the past while, my developer has been working with me on a small project to put together a live interactive whiteboard app, powered by Flash Media Interactive Server. Well, everything is finished & ready to go, but there seems to be a big problem:
 
The app was developed & tested on a windows machine, while my server and all my website files (to integrate with) is on a Linux system.
 
It's been a month since this problem arrose, and there had not been any further progress with this project for the time. My developer doesn't seem to know much about how the 'conversion process' works, if there is one.
 
Do you know if this is possible (to convert a windows-programmed app to work on a linux system)? If so, do you know roughly how it should be handled?

View 2 Replies

Media Server :: Rtmp Streaming Doesn't Work On Mac OS System

Sep 1, 2011

i try to play video on Mac OS system using the standard embed code:
 
<object height="409" width="600"><param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" /><param name="flashvars" value="src=rtmp%3A%2F%2Fmy-server%2Fvod%2Fflv%3Amy-videoposter=http%3A%2F%2Fosmf.org%2Fimages%2Fposter_cathy_fmp.jpg" /><param

[Code].....
 
on Safari and Firefox but it doesn't work!
 
Is it a FSM problem or Flash Player problem?

View 1 Replies

Professional :: Test The Buttons To See If They Work On System (localhost) And Not On A Random Website

Apr 16, 2010

I have just created a flash navigation menu in which I imported to dreamweaver to link with the rest of my website. But if I want to test the buttons to see if they work on my system (localhost) and not on a random website, what url do I put? Or do I have to wait until I put my pages on the server and simply paste in the address?

[Code]...

View 3 Replies

Game Engine :: Flash Multiplayer Turn By Turn?

Oct 7, 2011

I'll start off by saying I'm a newbie, just putting that out there. How do you make a turn by turn multiplayer flash game? I don't know if an engine is made in AS3, PHP, Javascript, or whatever,I made my game already, it's just that it isn'tmultiplayer yet. Basically, there are lines, and each player crosses out a number of lines, and the last player to cross out a line is the loser. I want it where one user crosses out some lines, then presses End Turn, then the other does their turn and then presses End Turn to allow the other player to move his cursor. But how can I get both players to see the same frame and only have one player have the ability to move the cursor during a turn? Is there some easily adaptable multiplayer engine for flash for newbies out there

View 2 Replies

ActionScript 2.0 :: Getting Timer Based On SetInterval To Work?

Jul 20, 2007

I'm building out the basic code for a timer that does 2 things:Counts down "bonus points" -- 10th of the total milliseconds in the timerCount down seconds and tenths of secondsThe bonus points will tick down along with the time -- this is part of a larger quiz interactive project that I'm putting together.I can't quite figure out the following (my math is bad, I think):Why can't the setInterval fire off in 1 millisecond increments? Is it too fast for the Flash Player to handle?What's wrong with my math for the milliseconds on the time? I'd like to ONLY show 10ths of a second instead of thousandths.

View 7 Replies

ActionScript 3.0 :: System.useCodePage - Getting Error 1120: Access Of Undefined Property 'System?

Aug 7, 2009

I got a textfile who i am reading on a serverside script and passing it as a script to my client side as3 code. The problem is that i am using characters like ä,ö,ü,ß and this isn't well displayed. I tried System.useCodePage but the compiler complains about : 1120: Access of undefined property 'System'. It doesnt matter if I tried this on the first line of the 'Action' in the first scene or in the first line of the first .as file i am loading. (btw i am only working with .as file and not in the timeline). When i am importing flash.System.* the compiler complains he dont know useCodePage.

View 3 Replies

Make The Browser Back Button Work For A Flash-based Website?

Dec 1, 2009

Is it possible to make the flash content go back to some previous frame when the user clicks on the back button in the browser? Similarly, can the the refresh button be used to refresh to the same frame and not go back to the starting frame?

View 4 Replies

ActionScript 3.0 :: Particle System And Masking - Particle System Movieclips To Display An Image?

Dec 29, 2010

Is it possible to make this a mask? The system contains one movieclip of a circle called ball, also a class called ball and a class called particle. I want the particle system movieclips to display an image...I'm sure this is possible...just have not been able to find a way. A little backround, I'm a completely selftaught n00b when it comes to AS3, but I'm grasping it fairly well... the tutorial is on this website, called A Simple Particle System Using Actionscript 3.

View 0 Replies

Flash :: Web Based Visual Programming Interface Based On Python For Data Visualization

Nov 4, 2011

I just discovered impure.com and was very impressed by what can be achieved in terms of visualizing data using their workspace. Although the platform is free to use, but not open source yet. This causes a few problems because the API section works with .com sites for eg. for ebay, so I cannot visualize ebay listings for regional sites such as ebay.in because the link to ebay.com is hardcoded.I searched around, but didn't find other projects that offer a similar way to work with site APIs and other data sources with the kind of user interface and detail that impure.com does in a realtime way within a browser window.This brings me to the questions:

-What technologies would be involved in creating a similar kind of project

-What are the open source tools that can help develop a fullscreen UI to render the workspace. Are there any alternatives to flash for this, and how do they compare

The goal would be to use standard python data structures, python scripts to do some processing on these data structures, scripts to gather data from csv, json and API sources such as google yahoo, wikipedia and flickr, and scripts to render graphs, tag clouds, network visualizations etc. Then bring them all together into a visual interface that supports drag drop and simple type checking.How would the python backend integrate with the UI.

View 1 Replies

ActionScript 3.0 :: Tile Based Game - Creating Multiple Sprites Based On Frames

Nov 17, 2009

I'm relatively new to AS3. There's one thing that I don't quite understand about Sprites. I'm making a tile based game, and all the tile graphics for a level are inside one movie clip in each frame. Would I be able to go about creating multiple sprites based on the frames in said movieclip's timeline I would I have to go through and make a separate library graphic for each.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved