Error message 2037: Assist

I hate to be repetitive but as I said before I am making a game. Quite obviously, the game will have sound. So I coded this up to manage the sound.
actionScript Code snippet:
var playtrack:Sound = new Sound();
var musicChannel:SoundChannel = new SoundChannel();
var fade:SoundTransform = new SoundTransform();
var trackindex:int;
var playlist;
public function Main()
addEventListener(Event.aDDED_TO_STaGE, init);

private function init(e:Event):void
playlist = "Born to do This";
addEventListener(Event.ENTER_FRaME, soundCheck);
private function soundtrackPlayer()
musicChannel.removeEventListener(Event.SOUND_COMPLETE, soundtrackPlayer);
if (playlist is array)
var tempindex:int;
tempindex = Math.floor(Math.random() * playlist.length)
if (tempindex == trackindex)
while (tempindex == trackindex)
tempindex = Math.floor(Math.random() * playlist.length)
trackindex = tempindex;
playtrack = new Sound;
playtrack.load(new URLRequest(String(playlist[trackindex])+".mp3"));


playtrack.load(new URLRequest(playlist+".mp3"));
musicChannel =;
musicChannel.addEventListener(Event.SOUND_COMPLETE, soundtrackPlayer);

private function soundCheck(e:Event):void
if (playtrack.length - 1000 position)
fadeTimer.addEventListener(TimerEvent.TIMER, fader);

private function fader(e:TimerEvent):void
fade.volume -= 0.1;
It worked, but it still threw this error message:
Error: Error #2037: functions called in incorrect line, or previous call was unsuccessful.
at _load()
at load()
at Main soundtrackPlayer()
at Main init()
at flash.display::DisplayObjectContainer addChildAt()
at flash.display::Stage addChildAt()
at fl.rsl::RSLPreloader contentComplete()When I ran the code snippet from a frame:
ActionScript Code snippet:
MovieClip(root).playlist = "What I have Done";
It...didn't play. But it also didn't throw any other bugs. Setting "What I have Done" as playlist in the main file works. So I've no solution what is going on.
Posted On: Friday, October 19, 2012 Total Views: 75
View Complete with Replies

Related Messages:

menu_array error message message  (5 Views)
I'll preface this by saying that I am NOT a Flash person. I am not a web developer or designer..I'm just a friend who knew a *little* about websites and was willing to assist; after being shown a template that some friends just HaD to have I said I would provide it a shot (no promises). I have completed the site (which was a surprise to me ), with the exception of ONE menu button It is a Flash menu (with actionScript 2.0 and menu.xml - not that I really know what either of them do...) and of the 9 buttons I could create links with - 8 work and 1 does not. I have spent at least 5 hours attempting to resolve it. I have copied and pasted, tried it on my own, searched the web for assist..and STILL cannot resolve it. :-(
I do not know what I am doing wrong..all the other links work, but when I click the HOME button - this is what it says it is attempting to find: menu_array[0].url. (If it helps, it was a template tfound registered downloaded from )
I can post whatever info might be helpful to u for giving me some guidance. Just say what u want
View Replies !
Flash8 gotoandplay error message message  (6 Views)
Ok so I have almost finished a presentation that I have been working on for my company and I have one last error message.
at the beginning of the presentation is an intro with the logo before stopping stop(); and waiting for the user to continue. at this point (frame 80) u have the option of two buttons, continue or skip.
Continue sends u to gotoandPlay(81); where the presentation continues. (note the skip button stays in its position throughout the whole presentation in case u receive bored half way)
Skip sends u to gotoandPlay(4220); where there is an outro before stopping at the last frame with the option to repeat or EXIT.
This works
But when I click repeat (back to gotoandPlay(81) the skip button would not work a second time...
any ideas
View Replies !
as2 not throwing error message message when I import bogus class   (6 Views)

I am working on an old as2 project.
I noticed that my import calls are not getting updated so I decided to create a bogus import ... import junk; ... that should throw an error message, but it is not.
any thoughts
View Replies !
script logical error message message   (5 Views)

i added the following to a button in my flash fileactionScript Code snippet:
on (release) {
var effect2mc = _root.lowerarea_mc;
if (effect2mc._currentframe 46) {
var effect_MC =_root.lowerarea_mc.flip_mc.ProductBox_mc.default_mc;

this.onEnterFrame = function() {
} ;

DELETE this.onEnterFrame;
var effect1_MC =_root.lowerarea_mc.flip_mc.ProductBox_mc.default_mc;
if (effect1_MC._currentframe<21){
this.onEnterFrame = function() {
now the else part works just fine
in the if part
i want to control a nested movie clip by checking the states of both
so i added the condition that if the farme of parent movie is
then it should first play the parent movie and then the child move
but when used i the debbuger it showed that that flash skips the this.onenterframe part and goes directly to the DELETE command
i am really confused
Pls assist
View Replies !
actionscript bugs   (9 Views)

I download flash animations from websites and decompile them via Trillix 3.0 or Sothink SWF Decompiler. But some flash files (escepially the files includes actionscripts includes "if statements") do not work. I pasted an example code snippet below. I could not solve the difficulty. Is it possible to have a look
Thanks in advance
function ()
x03 = 197 511 * true;
return (eval(" x03"));
} End of the function
var x01 = 620 + x04 x05();
for ( x01 = eval(" x01") - 697; eval(" x01") == 120; x01 = eval(" x01") + 150)
x01 = eval(" x01") + 373;
if (false)
} end if
} end of for
if (eval(" x01") == 860)
x01 = eval(" x01") - 63;

if (eval(" x01") == 83)
x01 = eval(" x01") + 777;

} end if
x01 = eval(" x01") + 768;
if (eval(" x01") == 493)
x01 = eval(" x01") + 150;

} end if
if (eval(" x01") == 833)
x01 = eval(" x01") + 143;

} end if
x01 = eval(" x01") - 741;
x01 = eval(" x01") + 65;
var x0f = true;
if (eval(" x01") == 121)
x01 = eval(" x01") + 806;

} end if
if (eval(" x01") == 878)
x01 = eval(" x01") - 383;

} end if
if (eval(" x01") == 643)
x01 = eval(" x01") + 284;

} end if
if (eval(" x01") == 186)
x01 = eval(" x01") + 281;
if ( null)
x01 = eval(" x01") - 69;
} end else if

} end if
if (eval(" x01") == 467)
x01 = eval(" x01") - 69;

} end if
if (eval(" x01") == 398)
x01 = eval(" x01") + 578;

} end if
x01 = eval(" x01") - 931;
if (eval(" x01") == 495)
x01 = eval(" x01") - 29;

} end if
if (eval(" x01") == 466)
x01 = eval(" x01") - 383;
if (1)
x01 = eval(" x01") + 777;
} end else if

} end if
if (eval(" x01") == 797)
x01 = eval(" x01") - 797;

} end if

} end else ifError message OUTPUT MESSAGE :
**Error message** Symbol=sprite 32 layer=Action Layer, frame=41:Line 1: function name expected
function ()
**Error message** Symbol=sprite 32, layer=Action Layer, frame=41:Line 3: Unexpected ' ' encountered
x03 = 197 511 * true;
**Error message** Symbol=sprite 32, layer=Action Layer, frame=41:Line 5: Unexpected '}' encountered
} End of the function
Total ActionScript Bugs: 3 Reported Bugs: 3
View Replies !
Statement must appear within on handler error message message   (2 Views)

novice aS coder attempting to receive a easy flash form to submit data to a php script, then receive data back from the script.
the "send" button has this code snippet:
on(release) {
assign user-input value to lv property called years
lvOut.years = years.text;
send to a blank window...
lvOut.send(path + "test.php","_blank");
receive results returned to lvIn
form.sendandLoad("test.php", lvIn, "POST");
lvIn = new LoadVars(); create lv Object
lvIn.onLoad = function (success) {
PHP variable value to textbox
output.text = lvIn.returnVal;
...or notify of failure
output.text = "fail";
and throws 2 bugs:
**Error message**
Symbol=form_mc, layer=btn, frame=1, Line 10: Statement must appear within on handler

lvIn = new LoadVars(); create lv Object
**Error message** Symbol=form_mc, layer=btn, frame=1, Line 11: Statement must appear within on handler

lvIn.onLoad = function (success)
I wana the var "lvIn" to hold the data from the php script.
I'm sure this is simple, but, being a newbie w AS I'm in want of kind assistance.
View Replies !
mc buttons inside a clip error message message   (5 Views)

I'm tuning up a flash template using CS5 aS2. This has baffled me for a few days, so it is time to offer it up to those who know.
My buttons work fine in the main time line, but I want to place them in frame 1 of a mc_pages, i receive an error message about it saying "the statement must appear within on onClipEvent handler". and I just can't figure out how can i do that to save my life. If pc's were cheap their would be a pile of them outside on the
I'm thinking I want to split up this action and place some on frame 1 of the main time line and keep some for for my button on frame 1 of pages, but what part how
My button loads a new swf in the mc placeholder.
btn01.onRelease = function () {
let's first unload the current movie, to refresh the cache
autoPlay = "true";
autoLoop = "false";
vidWidth = 460; aspect ratio
vidHeight = 244;
vidX = 170; position
vidY = 78;
vidPath = *link* some.flv
thumbPath = *link* some.jpg";
watermark = "show"; place show or hide, if not set watermark will be shown
watermarkURL = "link"; place ur own watermark link
seekbar = "show" show or hide seekbar
showControls = "false"; this displays the control at the beginning right away
vidAspectRatio = "fit"; set "fit", "cut", "original" or "stretch" for aspect ratio
load file externally
Anything and every thing will extremely comprehended,
View Replies !
error message message url link replace and refresh new link   (10 Views)
I have a difficulty in the url link.
I connected the flash with php framework, click the menu button while the other has always been a double-link examples:
Menu: products -> honey vgra
-> Honey super
when I click the honey vgra normal page with the url address
http: tresnojoyo prod... id madu_super
but if I continue pressing the honey super error message page with the url address
http: tresnojoyo prod... id madu_super
which should
http: tresnojoyo prod...duk madu_super
Please assist in the url what action script must be changed.
View Replies !
Key press error message message   (7 Views)

I believe that the flash player has a conflict for pressing
for example, "LEFT", "UP", "SPaCE".
Theres any work around for it
I am working with that combination to execute a script.
But the script its not working because of the conflict (at least I believe is a
conflict). The pc plays a beep and the flash player stucks a little bit.
View Replies !
wierd error message message with "?" in the URL string sendandload error. Please assist.   (6 Views)

Dead forum member
I am attempting to send some varibales to an aspx page and I am getting this error message.
myvars.send ("http: login.aspxuserid="+var+"&password="+var2, "POST");
var1 = username.text
var2 = username.text
when I press enter button, It's going to the browser but like this.
http: login.aspxuserid=test&password=test
the "" at the end is causing difficulty.
Please assist me.
View Replies !
bizzare firefox frame error message message  (7 Views)
I am loading a flash program with an automatic redirect to a frame (frame 2, in this case). Each frame has a various menu system on it, linking to a URL.
However with firefox the first two elements of this frame does not display up. So frustrating.
IE:Firefox:The actual flash can be seen at:
http: Flash
Code snippet:
page is a FlashVar
if (>1){
any assist would be appreciated.
View Replies !
Trouble with loadvariables "error opening URL"  (4 Views)

This is my first time try to fetch info from database with flash.
So I tried to access my asp file with the following code snippet:
loadVariablesNum("data.asp" 0) or loadVariables("data.asp", this)
Both gave me the same error message "Error opening URL 'file: C: flashCode data.asp'"
all my files (fla, swf and data.asp) are located in the same folder (ie. C: flashCode).
Does anyone have any clue Do I have to enable some sort of permission on Operating system so that flash can open access file
View Replies !
Firefox displays flash bugs ever since i installed flash cs4  (11 Views)
I installed flash cs4 the other day and ever since firefox will popup annoying bugs. Its probably some debugger, but i want it disabled cause it comes up 5-6 times in a row when i browse the internet, (usually will happen on facebook or some youtube vids in blogs).
the error message starts like this:
TypeError #1009
I will paste the whole thing in this thread the next time it happens, but I am pretty sure the error message itself does not matter, I guess some debugger was installed in firefox when i installed flash cs4.btw I want to make a multiplayer risk game for facebook in flash. think it will be hard I am already well versed in php and mysql. but i do not know any flash. i want my flash app to communicate with the server with out reloading. is that easy with actionscript will i want to learn aJaX as well
View Replies !
[CS3] Display final score error message message - so confused   (11 Views)
My game is as good as finished but I have found a error.
There is a score system and a timer - if ur score is negative and timer is positive greater than the negative of the score there is no difficulty e.g. score = -10 time remaining = 50 then total = 40.
However, if score = -50, time remaining = 10 the total displays 40 instead of -40
So, in short - the final score does not display the - symbol. The score carries over to the next level and displays negative as it should - so why not in the total
Here's the code snippet:PHP Code:
View Replies !
Stage event listeners causing error message message   (6 Views)

I have just added a menu screen to my game and I receive the following error message:
actionScript Code snippet:
TypeError: Error #1009: Cannot access a property or method of a null Object reference.
at MyGame()
at Document onRequestStart()
at dispatchEventfunction()
at dispatchEvent()
at MenuScreen onClickStart()
I decided to execute the debugger and found the reason for this error it is my two stage event listeners that are needed for my keyboard control:
actionScript Code snippet:
stage.addEventListener( KeyboardEvent.KEY_DOWN, onKeyPress );
stage.addEventListener( KeyboardEvent.KEY_UP, onKeyRelease );
If I remove the "stage" word it works just fine but my keyboard control does not work. This code snippet is located in my class that controls the game.
any assist is appreciated
View Replies !
image URL loading error message message   (7 Views)

I am loading images from xml images are adding to xml dynamically in PHP
Difficulty :
if flash is unable to load one image
it stops all the images from displaying
what should I do , if one image got stuck , the Flash keep displaying other images and BYPaSS that element of Xml everytime
View Replies !
file upload error message message   (7 Views)

I am attempting to upload a file on server using File class. Its working fine on local machine. But when i a placing the php file on server It's giving Error message #2038: File I O Error message.Code snippet:
var uploadFile:File = new File("file: " + this.uploadFilearray[this.count]);
uploadFile.upload(new URLRequest(this.imageUpload_serverPath));
uploadFile.addEventListener(Event.COMPLETE, onFileUploaded);
uploadFile.addEventListener(IOErrorEvent.IO_Error message, onErrorrr);
uploadFile.addEventListener(DataEvent.UPLOaD_COMPLETE_DaTa, onFileUploadComplete);
PHP Code snippet
Code snippet:
I have placed cross domain.xml on server also.
Please assist.
View Replies !
1120 error message message want assist   (10 Views)

So I am really a noob and haven't really used flash since 2008 but I am working with somebody who insisted to use flash. Its a nightmare for me and this forum is my only hope.
So originally I was only getting one error message when I tested the file and that was that I was missing a right brace, once I inserted the brace and tested the file again I got a whopping 39 bugs. Every error is 1120 access of unidefined property
Here is the actionscript:
colombian.buttonMode = true;
microwave.buttonMode = true;
empire.buttonMode = true;
junta.buttonMode = true;
youth.buttonMode = true;
illumination.buttonMode = true;
m19.buttonMode = true;
animal.buttonMode = true;
commanche.buttonMode = true;
familia.buttonMode = true;
If XML File Load successfully, it will be voided this actions:
XMLLoader.addEventListener(Event.COMPLETE, success);
function success(e:Event):void {
xml=new XML(;; For adding a new song in XML File.
MusicLoading=new URLRequest(songlist[0].file);
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
The Name of the XML File.
XMLLoader.load(new URLRequest("playlist.xml"));
Add Event Listeners for control buttons
PauseBtn.addEventListener(MouseEvent.CLICK,pauseSo ng);
PlayBtn.addEventListener(MouseEvent.CLICK,playSong );
NextBtn.addEventListener(MouseEvent.CLICK, nextSong);
PrevBtn.addEventListener(MouseEvent.CLICK, prevSong);
itunes.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
function fl_ClickToGoToWebPage(event:MouseEvent):void
navigateToURL(new URLRequest(""),
"_blank"); }
Prev Song functions
function prevSong(e:Event):void {
if (currentIndex>0) {
} else {
currentIndex=songlist.length()-1; Prev Song(-1)
var prevSongFunc:URLRequest=new URLRequest(songlist[currentIndex].file);
var prevTitle:Sound=new Sound(prevSongFunc);
MusicName.text=songlist[currentIndex].name;; Writing Prev Song's name
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
Pause The Song (sc.stop)
function pauseSong(e:Event):void {
Play The Song
function playSong(e:Event):void {;
For the love of god, what am I doing wrong
View Replies !
Can't find error message message even after Debugging   (8 Views)

I have a difficulty when a button makes the movie go to a labeled section... I get this error message:
attempting to launch and connect to Player using URL D: Gaea animation Studios Web FLa home.swf
[SWF] D: Gaea animation Studios Web FLa home.swf - 100450 bytes after decompression
TypeError: Error #1009: Cannot access a property or method of a null Object reference.
at home_fla::MainTimeline frame30()[home_fla.MainTimeline::frame30:59]
at flash.display::Sprite constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at home_fla::MovieClip_MainMenu_4()
at flash.display::MovieClip gotoandStop()
at home_fla::MainTimeline studioClick()[home_fla.MainTimeline::frame1:166]
Debug session terminated.
And still can not find what is wrong... this is the code snippet for the frame 30... could some body assist me out and view what is going on and what im missing plss
************************************************** ************************************************** ********************
Home Button

mc_mainmenu.btn_home.addEventListener(MouseEvent.C LICK Studio_to_HomeClick);
function Studio_to_HomeClick(event:MouseEvent):void
************************************************** ************************************************** ********************
Studio Button

mc_mainmenu.btn_studio.addEventListener(MouseEvent .CLICK, Studio_to_StudioClick);
function Studio_to_StudioClick(event:MouseEvent):void
trace("U still are in the Studio Section");
************************************************** ************************************************** ********************
Contact Button

mc_mainmenu.btn_contact.addEventListener(MouseEven t.CLICK, Studio_to_ContactClick);
function Studio_to_ContactClick(event:MouseEvent):void
trace("Contact Click");
************************************************** ************************************************** ********************
Download Button

mc_mainmenu.btn_download.addEventListener(MouseEve nt.CLICK, Studio_to_DownloadClick);
function Studio_to_DownloadClick(event:MouseEvent):void
trace("Download Click");
View Replies !
any way to log aS3 bugs when executing in browser?   (5 Views)

I'm having a difficulty where a Flash project hangs when I execute it in my browser but not when I execute it locally. That made me wonder if there is some program or service that enables aS3 developers to view aS3 bugs encountered by their users - bugs that cause the Flash file to crash, for example. I'm talking about what u'd normally view in the console in Flash Professional; can this be written to a file or displayed to the developer in some way
View Replies !