Member Avatar

i need to get a out put of the array in my code that will display every time the counter counts and has to be linked to a random number. import flash.utils.Timer; var color: Array = ["red", "green", "blue", "yellow"]; var rand: Number; var counter = 0; var myTimer: Timer = new Timer(1000, 4); myTimer.addEventListener(TimerEvent.TIMER, startCount); myTimer.start(); function startCount(e: TimerEvent) { counter++; for (var i = 0; i < 1; i++) { var numbers = Math.floor(Math.random() * 4); rand = numbers; trace(rand); } counter++; for (var i = 0; i < 1; i++) { var numbers = Math.floor(Math.random() * 4); …

Member Avatar
0
150
Member Avatar

i liek this game

Member Avatar
-2
122
Member Avatar

I'm currently in the middle of making a VB.NET project. I want to have the VB.NET project control the actions of the Flash projector. (Stop, play, change text of text control in the Flash projector, etc.) This is a one way control however, nothing about the SWF projector will interact back with the VB.NET project. The image below shows an idea of what I want to have done. ![Blank_Flowchart_-_New_Page.png](/attachments/large/0/3d9688fac1f1a264f63addfe74c0cce1.png "align-center") I've searched around the internet for other examples of how to do something similar to this, but each other answer involves a paid proprietary method of including the Flash SWF …

Member Avatar
0
1,348
Member Avatar

how can i make an Online Highscore Leaderboard For A flash cc Game -android platform ? i make offline leaderboard using share object var SCORE:uint = 0; //positve numbers gameScore.text = String(SCORE); ... var soSavedScNa:SharedObject = SharedObject.getLocal("aaa"); // // //**Object var savedSN:Object = soSavedScNa.data.nameScore; // Set the varible 'savedSN' // // when i search i found "Mochi Media" and try to use it but MochiMedia shut down its services. please help me in my first step thanks

Member Avatar
0
208
Member Avatar

How to make cursor for user touch in as3 ?

Member Avatar
0
87
Member Avatar

I'm trying to reuse an old Flash file that my client wants on his website however I'm using Flash CC now, and the existing code does not funtion in ActionScript3. I can't see why this won't work. Any advise would be greatly appreciated function randRange(min:Number, max:Number):Number { var randomNum:Number = Math.round(Math.random()*(max-min))+min; return randomNum; } var myFrame; myFrame = randRange(2,7); gotoAndStop(myFrame);

0
185
Member Avatar

Hi all!! I am building a media player in flex that uses video streaming through rtmp:// I want to get its bandwidth usage but found out that we can't get bytes loaded for video streaming. Is there any way to get it through php or js? I mean php gets memory usage of flex application. Is it possible? Please help.

0
120
Member Avatar

Hi there, I have encountered a strange bug. I have buttons advancing one frame forward and back. It works in the SWF on its own, it works in both the .app and .exe projector files, but it does not work accessing the SWF via the HTML generated page. Does anyone have an inkling what's going on? The code on the two buttons is: import flash.events.MouseEvent; stage.displayState = StageDisplayState.FULL_SCREEN; function next1Click(event:MouseEvent): void { gotoAndStop(this.currentFrame + 1); } function back1Click(event:MouseEvent): void { gotoAndStop(this.currentFrame - 1); } //EVENT LISTENER AND VARIABLE DECLARATION balancingNext.addEventListener(MouseEvent.CLICK, next1Click); balancingBack.addEventListener(MouseEvent.CLICK, back1Click); Thanks in advance for any help!

Member Avatar
0
262
Member Avatar

Greetings...! I have this admob code in a class file: package { import flash.events.MouseEvent; import flash.display.MovieClip; import flash.system.System; import flash.system.Capabilities; import flash.display.Sprite; import flash.events.Event; import flash.desktop.NativeApplication; import flash.utils.setTimeout; import com.hdi.nativeExtensions.NativeAds; import com.hdi.nativeExtensions.NativeAdsEvent; public class Main extends MovieClip { public var na : NativeApplication; private var admobId:String = 'a1514b5ef85e336'; public function Main() { na = NativeApplication.nativeApplication; na.addEventListener('exiting',exit,false,0,true); na.addEventListener('deactivate',exit,false,0,true); if ( stage ){ stage.scaleMode = 'noScale'; stage.align = 'TL'; } if ( loaderInfo ){ loaderInfo.addEventListener( Event.INIT, init, false, 0, true ); } else { init(null); } } public function exit ( e:* = null ):void { NativeAds.deactivateAd(); setTimeout(finalExit,250); } private function finalExit():void …

0
110
Member Avatar

Hi, when I change an animation on the player, it flashes before it changes. The method I'm using to change the animation is crude, but its all I know, so I don't even know if there's a better way. I made a player class, and I have a function to change it, all it does is store the x, and y values of the previous animation to a buffer, then delete the first animation, replace it with the new one(which puts it on x, and y coordinates of 0,0), then replace the new coordinates. A simpler and probably better way …

0
99
Member Avatar

Hi, I'm having a problem with the stop() and play() functions The first frame function works fine during the first run of the program but as i hit space in the last frame ( go back to frame 0 ) the first frame function saying whether to stop or play isnt working and pressing the space button always does gotoandstop(0) . any ideas?tried removing evenListeners but still nothing this is the first frame function import flash.ui.Keyboard; import flash.events.KeyboardEvent; stage.addEventListener(KeyboardEvent.KEY_DOWN, hearKeyyy); function hearKeyyy(yourEvent:KeyboardEvent):void{ if (yourEvent.keyCode==32){ stop(); }; if (yourEvent.keyCode==13){ play(); }; }; this is the last frame function stop(); stage.addEventListener(KeyboardEvent.KEY_DOWN, hearKey); …

0
76
Member Avatar

Couldn't find an actionscript section so I hope this is the next best section for such discussion. I'm trying to create an isometric game in adobe builder with AS3 along with the As3IsoLib isometric library. Currently upon clicking a unit you want to move I've got four boxes to popup in four direction either side of the selected unit (where you can move to). I've added an event listener for all the boxes to call to, passing which box has called it. var BOX1:IsoBox = new IsoBox();var BOX2:IsoBox = new IsoBox(); var BOX3:IsoBox = new IsoBox();var BOX4:IsoBox = new IsoBox(); …

0
82
Member Avatar

Hi, I am creating a sort of zombie game. The concept is if the player gets too close within a distance, the zombie will chase the player. There will be a hit detection when the zombie object hits the player object. I used a trace statement for when it hits. The player/ zombie moves on the x-axis. This is what I have so far. My problem is I can move the player but when I get close to the zombie, the zombie doesn't chase the player. What works is when the player touches the zombie, the trace statement works. my …

Member Avatar
0
168
Member Avatar

Good afternoon, I'm trying to develepop an app which requiers to read a QRCode, any help would be appreciated.

0
97
Member Avatar

Hello everyone, I am trying to create a thermometer, i do have an idea of how to make it, not sure if it is correct, but here it goes: I have an image of a thermometer, and i would apply a mask(Rectangle), and it's width and X would vary. I'm not sure how to apply this in the form of code, any help?

Member Avatar
0
83
Member Avatar

Hey all. I'm doing a new project in AS3 to try and learn more (I've only every used AS2), and I'm having some problems... Whenever I run the program as it is, it tells me (Output Window) that my Keyboard events don't do anything? I have almost 101 lines of code, and probably 90% of it are under the KeyboardEvent scripts... Anyways, here's what I have so far. stop(); import flash.events.KeyboardEvent; var left:uint = 37; var up:uint = 38; var right:uint = 39; var down:uint = 40; var Choice:Number = 0; var SYS:Number = 0; stage.addEventListener(KeyboardEvent.KEY_DOWN,CONTROLz); function CONTROLz(e:KeyboardEvent) { if …

Member Avatar
0
144
Member Avatar

Hi all, I'm trying to make a multi-language website that allows the user to change language by clicking on a button (a flag representing the country/language). I have been able to achieve this using locale and a combo box so far but I'm struggling to implement it using buttons. This is my code so far: [CODE] ActionScript Code: import fl.data.DataProvider; import flash.events.Event; import fl.events.DataChangeEvent; //------------------ // SETUP LOCALE OBJECT: var languages:Object = new Object(); // Stores flags for loaded languages var localeDefault:String = "en"; // Default language var locale:String = "en"; // Current language selected in combobox // Event handler …

0
111
Member Avatar

this is my as3 code which is sending variables to php [code] var myData:URLVariables = new URLVariables(); myData.firstName = "Kirill"; myData.lastName = "Poletaev"; var myRequest:URLRequest = new URLRequest("test.php"); myRequest.data = myData; myRequest.method = URLRequestMethod.POST; var loader:URLLoader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.VARIABLES; try { loader.load(myRequest); } catch (error:Error) { trace('Error: unable to load the document.'); }[/code] and this is my php code [code] <?php $text=$_POST['firstName']." ".$_POST['lastName']; $to="anubhavjhalani09@gmail.com"; $subject="Message from php"; mail($to,$subject,$text,"Content-Type: text/plain; charset=utf-8"); echo $text; ?> [/code] my both fla and php files are in the same folder in the server.still when i execute php i m getting this error …

Member Avatar
1
663
Member Avatar

I bought a Flash Template. It externally loads images and integrates html and .js documents also. The example of the menu and its selections are built with this code: [CODE] <item name="GALLERY" deeplink="gallery" type="menu" content="" location=""> <item name="FILM ROMAN INTERSHIP" deeplink="aROMAN" type="page" content="gallery" location="aFilm Roman Internship.xml"/> [/CODE] Does anyone know what is meant by "deeplink" and how can I modify it?

0
100
Member Avatar

I have a Mysql database and I am trying to import multiple records with multiple columns into Flash AS3 using PHP. My problem is I am able to make it work with a single column and multiple records but for multiple columns I am not being able to format it correctly. What i wish to have is an array(of records) of associative arrays(of columns) i.e. I want to be able to partition the output from php based on '|' and store it in a flash array and then be able to access name,id for each of them (see below the …

0
68
Member Avatar

Hi is there a way to export mp3 using AS3? As in layering them one on top the other? (Just like you would in an Audacoty project using lame). Thanks in advance for any help given.

Member Avatar
0
157
Member Avatar

I'm looking at moving development of my games from ActionScript 3 to XCode - has anyone else made this move and are there any gotcha's I should watch out for?

0
92
Member Avatar

Okay so I am learning to write with with ActionScript for a flash project. First of all I hate this language and can't figure out how to solve my problem. I am trying to play the frames so that they appear 1 second apart but stop at a certain frame. Right now I pause it on the first frame right away with the command [CODE]gotoAndStop(1);[/CODE] But then after the user clicks a button I want it to play until frame 5 and stop, each frmae in between is used to show different things appearing on the screen. THe problem is …

Member Avatar
0
174
Member Avatar

I am new to AS3 and i need to make a game that can juggle several balls on a platform (controlled by a user). So far i've got one ball that can juggle, but i dont know how to import more balls. I want the user to be able to select a number from one to ten, then the program imports that many balls onto the screen and the user has got to try and keep them all up. HELP? My coding isn't very good, but if u want to see my code, i suppose i could email it to …

Member Avatar
0
93
Member Avatar

ok, i am relly messed up...im currently developing a flash game..and there in frame 1, i have many instances (movieClip), event listeners, etc. But the problem is, when i tell it to go to the next frame, it shows an error saying this cannot be found or other things... how do i make it like when it will go to next frame, it will remove all contents of current frame?

Member Avatar
0
164
Member Avatar

Hi, I am working on a way to draw a graph with AS3. I have just put my code into different classes. I have a function that draws the graph axis but it doesn't seem to work properly. You will see what I mean in a min. [CODE] public function draw_axis():void { var container:Sprite = new Sprite(); container.graphics.lineStyle(1, 0x9C9C9E); container.graphics.moveTo(paddingLeft-1, paddingBottom); // This is the problem container.graphics.lineTo(paddingLeft-1, graphHeight); container.graphics.lineTo(graphWidth-paddingRight, graphHeight); addChild(container); } [/CODE] From what I can work out, the [I]graphics.moveTo()[/I] function only 'Moves' to [I]paddingLeft-1[/I] and not [I]paddingBottom[/I]. Example 2: [CODE] container.graphics.moveTo(50, 50); [/CODE] This does the same thing. …

0
108
Member Avatar

Hi, I need to get the UNIX timestamp from when the day started in AS3. How can I do this??? Thanks in advance :)

Member Avatar
0
408
Member Avatar

OK, I rarely start threads here, I'm more of a solutions guy than a problems guy; but I've started this thread off the back of something posted elsewhere by my good friend and regular poster in this forum, rajarajan07. (quoted below!) [QUOTE=rajarajan07;1257498]Jason always gives the great explanation for the thing he known. Thats Great! Jason is the right person to write tutorials on Daniweb! Jason plz consider this. [/QUOTE] I think my reply to this warrants its own thread, for reasons which will become apparent shortly...Before that there are some inevitable and inordinately long-winded ramblings: (Sorry!) First up, I must …

Member Avatar
0
233
Member Avatar

Suppose, I have a movieClip named "movi". and through actionscript, i generated some more different movieClips. So now, "movi" will stay down under the different movieClips. how do i make "movi" stay always on top even after the moviClips has been added?

Member Avatar
0
389
Member Avatar

Hello All, I've been working in a flash site for a couple days and i've gotten a couple errors as of late. Here are the errors: TypeError: Error #1009: Cannot access a property or method of a null object reference. at DefaultAEG_fla::MainTimeline/frame122() TypeError: Error #1009: Cannot access a property or method of a null object reference. at DefaultAEG_fla::MainTimeline/frame48() at flash.display::MovieClip/gotoAndPlay() at DefaultAEG_fla::MainTimeline/gotoAbtUs() Now, I'm hoping a couple of you guys/gals have ran into this before... i've check over and over on my code but can't see what's up. Line 48 Code: [code]stop(); /* Button Controls */ /*Home Button*/ Home.addEventListener(MouseEvent.CLICK, gotoHome); …

Member Avatar
0
83

The End.