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
Member Avatar
+0 forum 1

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
Member Avatar
+0 forum 13

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);

Member Avatar
+0 forum 0

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
Member Avatar
+0 forum 1

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(); …

Member Avatar
+0 forum 0

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
Member Avatar
+0 forum 1

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
Member Avatar
+0 forum 1

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
Member Avatar
+0 forum 6

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
Member Avatar
+0 forum 5

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
Member Avatar
+0 forum 2

I want to know the most simple code of actionscript 3.0 on how to shake the screen. and i need this QUICK! thank you,

Member Avatar
Member Avatar
+0 forum 1

Hello, i think the title describes exactly what my problem is. Please if anyone knows something post.

Member Avatar
Member Avatar
+0 forum 3

I have a .flv file (and also the original .mov from which the .flv was created) that i have imported into a new .fla - I also have created a button and assigned actionscript to the button that links to a new web page. The button works correctly. My issue is that I need the button to show up at 6mins42seconds into the video, and I don't know how to write the script to make it do so. I could do this easily if the video showed up frame-by-frame in my timeline, but since it's an external .flv and is …

Member Avatar
Member Avatar
+0 forum 3

Ok i seem to be have alot of problems with this script, first of all there must be an easier way to do something if a function doesnt trigger than having a variable but if this is the only way then it is not working for me. i first tried witha string and now a number and the checkif variable does not get detected properly (the else statement runs either way) also it looks messy and inefficient to me with the if else statement is there a better way to do that part? if not can u help me to …

Member Avatar
Member Avatar
+0 forum 4

Okay, so basically i have a movieclip on the screen and a function which loads a picture into it when it enters the frame. But i also have a function which makes it rise and grow when it is rolled over and it worked fine until i added the loader because now it seems to have converted the whole clip to a loader or something because it tells me : TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Loader@32be3101 to flash.display.Sprite. at Thisflashfile_fla::galleryInnerEndMc_26/… this is the code: [code] gb1_mc.addEventListener(MouseEvent.MOU… mainLift); //Event listeners for the movieclip gb1_mc.addEventListener(MouseEvent.MOU… mainDrop); //for when it …

Member Avatar
Member Avatar
+0 forum 4

Hi, I am trying to retrieve the contents of my XML file and use the variables later on in the script; I have the following actionscript code [CODE=actionscript3]// Get XML Vars var xml:XML; var urlLoader = new URLLoader(); var songdataurl:String = '0'; urlLoader.addEventListener(Event.COMPLETE,onXMLLoaded); urlLoader.load(new URLRequest("data.xml")); function onXMLLoaded(e:Event):void{ xml = new XML(e.target.data); GetSongData(); } function GetSongData():void{ songdataurl = xml..song[0]; } trace(songdataurl); //Use songdataurl in script [/CODE] and the following is the contents of data.xml [CODE=xml]<?xml version="1.0" encoding="UTF-8"?> <songs> <song title="A Song" artist="Joe Blogs" album="An Album">/getsong/?ID=12345&Hash=12345678&IP=0.0.0.0</song> </songs>[/CODE] I'm trying to get the contents of the [ICODE]<song></song>[/ICODE] tag and use it later on …

Member Avatar
Member Avatar
+0 forum 5

The End.