AS3 Error 1046 - Objects not being found during compile - actionscript-3

So when I run my program I get Compiler Errors:
/Volumes/USB30FD/FlappySharkGame.as, Line 4, Column 2 1046: Type was
not found or was not a compile-time constant: shark.
/Volumes/USB30FD/FlappySharkGame.as, Line 12, Column 21 1046: Type was
not found or was not a compile-time constant: FlappyShark.
This is Line 4 of my code, a comment.
//allows us to use prewritten code
If I delete the comment so that there is nothing on Line 4, run the program - I still get the same above compiler error for Line 4:
Can anyone tell me why this is happening, even though there is nothing written on the particular line?
This is for an introductory course in programming and apps development. I am completely new to programming, so this all looks like a foreign language to me.
Please help. And Thank you.

so the fix was pretty easy...
There was nothing wrong with my code. I showed my professor - the code checked out, everything was properly named, there were no syntax or spelling errors, etc.
She went into my library on the ".fla file" in Adobe Animate CC and selected the latest movie file I had made/converted. She right clicked it, then clicked on its properties, and hit OK.
She saved it and ran the program and it worked perfectly.
She said, "Sometimes you have to do it again for it to work."

Related

Unresolved Function or Method push() FLEX ActionScript

After a recent reinstallation of my computer I have encoutered a very frustrating and strange issue with JetBrains IntelliJ.
I have this line of code
this.path_.data.push(r.left, r.top, r.right, r.top, r.right, r.bottom, r.left, r.bottom);
And similar ones around my project.
path_ = new GraphicsPath(GraphicsUtil.QUAD_COMMANDS, new Vector.<Number>());
data inside of path_ is a Vector.<Number> but for some reason I am unable to use the function native AS3 function push(... rest):uint; on it. It just shows me this error
I have tried to find a solution to this issue for the past 6 hours and haven't found anything so far... Hoping anyone here might be able to give some assistance with this issue.
Note: This has never happened to me in the past.
I have looked into the declaration of push() and it points to my library.swf for everything except the code that uses GraphicsPath.data... That file seem to point to ECMAScript.js2 which doesn't contain anything for Vector Objects at all.

Awesomium and it's framework. I keep getting a link error, but I copied the code verbatim. Why?

I honestly don't know what to put here. I followed the tutorials at the Awesomium wiki and when I go to run the app I get an error Error:
1 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup c:\Users\zack\documents\visual studio 2013\Projects\AuctionExcell\AuctionExcell\MSVCRTD.lib(crtexe.obj) AuctionExcell
I looked it up and people who got the same error had forgotten to put a main, but the main.cc has a main. It's a really complicated one with a bunch of parameters, but it's there. I tried putting just int main() { but it gave me the same error. I'm not sure what the problem is. I put the html in hoping it would render, but it didn't. I am still on the "Hello world!" part. It's frustrating, since I don't know what this means per se. Any help would be appreciated.

1046: Type was not found or was not a compile-time constant: tile_movieclip

I'm following the book "Flash Game Development By Example", and I'm currently on the Chapter Two, on the Minesweeper game.
The problem I'm having is after I start inputting the code to make the tile displaying and I got the following errors:
1046: Type was not found or was not a compile-time constant: tile_movieclip. and 1180: Call to a possibly undefined method tile_movieclip..
The lines where they've appeared are, respectively:
private var tile:tile_movieclip;
and
tile = new tile_movieclip();
I have no clue about why it isn't working. The book doesn't mentions anything about the error, and I've already tried copy/pasting the code from the book, but it haven't worked either. I'm currently using Adobe Flash CS4.
The current source code is here: http://pastebin.com/spUzPGBx. It might have other errors, since I was still debugging it when I found this error.
In order for that code to work, you need 1 of 2 possible things :
1 - A class named tile_movieclip
2 - A library symbol that is named tile_movieclip and has linkage set on it's properties panel, which will automatically create a class named tile_movieclip when compiled.
I am going to guess that the book you are using has a .fla file that goes along with that example.
UPDATE - I just downloaded the .pdf of that book and on page 22 it describes creating this symbol in your library and setting linkage.
So.... I think we can consider this mystery solved.
That means the flash thinks the class tile_movieclip does not exist. If it does indeed exist then it means flash doesn't know how to access it.
There are many possible reasons why this happens depending on how your project is structured. If you are trying to access an external library, a library item, some class in your project, etc.
Please specify in your question where you think the class tile_movieclip is located and I'll be able to provide a more specific answer.
As a side note, in AS3 (and probably all programming languages) it is a standard to name classes with an upper case letter, so it's easier to distinguish between vars and classes. In AS3 in particular sprite is a var, and Sprite is a class. AS3 is a case sensitive language.

updater function with air framework

this is for flash CS6 AS3 AIR
Seriously I've been searching for 3 days straight
found these among others.
http://gregsramblings.com/2008/08/16/adding-auto-update-features-to-your-air-application-in-3-easy-steps/
http://www.adobe.com/devnet/air/articles/air_update_framework.html
but they all output errors like Scene 1, Layer 'Layer 1', Frame 1, Line 2 1172: Definition air.update.events:UpdateEvent could not be found. not all have this specific error but they all have a definition error. Apart from that they are doing a lot of things in the tutorial that I simply don't need.
I already made a version detector and right now it's downloading the air file to the desktop but I need something more practical. is there something like updatenTo(http://address.com/myApp.air) - which just start the air updateframework to update from the .air file at the refered address.
or even a download command that tells me where the user downloaded the file to so I can execute the file and terminate the program. like file.addEventListener(Event.locationOfDownload,downloadFileContainFunction);
or link me to a tutorial that has working code.
Okay, so my problem here actually boiled down to finding "applicationupdater.swc" and how to import it.
It's found at "C:\Program Files (x86)\Adobe\Adobe Flash CS6\AIR3.2\frameworks\libs\air" on my machine
One can import it by going to "publish settings" and click the wrench key next to "script: ActionScript 3.0" and going to the library path clicking the little red f on white background.
That error is telling you that you haven't imported the class or embedded the library you are trying to use.

How to make Flashdevelop errors appear in Results Panel?

I am using Flashdevelop to build an Actionscript 3.0 game. It was originally a FlashIDE project but I decided to migrate the project to FlashDevelop. I also changed some asset and property names, as a result there were a lot of syntax error. The errors keep coming out in the Output Panel instead of Results Panel (is that normal) when compiled. I know that when I click errors in the Results Panel it will open and point the error in the Code Panel. I can't do that with errors in the Output Panel (I assume its normal). Is there something I can do to make the errors clickable ?
Even a simple error like this doesnt come out in the Results panel:
Loading configuration file H:\04 Noveline\03 GD\GD03\Folder (aaaa)\TEST\obj\MeccatomedinaConfig.xml
H:\FD(1)\TEST\src\Game.as(75): col: 3 Error: Access of undefined property sssss.
sssss
^
Build halted with errors (fcsh).
(fcsh)
afaik it's impossible to make output panel clickable. but you can press F10 to open program settings dialog and check if your results panel is disabled. and also disable output panel if it's really annoying)
The errors should appear in the results panel and the output panel. Make sure the results panel is open.
Remove parentheses from project path to workaround the issue.
(As Stucko & Markus von Broady wrote in comments.)
This issue is still around for FlashDevelop 5.1.1.1.
I have logged the issue here for ref:
https://github.com/fdorg/flashdevelop/issues/1676