ActionScript 3.0 :: What Means "package Is Unexpected" ?
Jun 14, 2009What means "package is unexpected" in AS 3?
View 2 RepliesWhat means "package is unexpected" in AS 3?
View 2 RepliesI'm new to AS3, I am trying to convert my as2 to as3 for my movie and I am getting this error:Line 1: 1083: syntax error: package is unexpected.[code]
View 1 RepliesSo I'm new to AS3, I am trying to convert my as2 to as3 for my movie and I am getting this error: Line 1: 1083: syntax error: package is unexpected
[Code].....
I'm trying to use one of Adobe's examples to put a video player in my Flash application using ActionScript 3 in Flash CS5. It's the one at the bottom of the page here:
[URL]
I'm putting the ActionScript into the frame I want to play the video in. When I try to test it, I keep getting the following error message:
"1083: Syntax error: package is unexpected"
So I try taking the "package { }" code out and running it again. Then this error pops up:
"The public attribute can only be used inside a package"
I tried removing all the code inside the package and I still get the first error.
I'm trying to use one of Adobe's examples to put a video player in my Flash application using ActionScript 3 in Flash CS5. It's the one at the bottom of the page here:I'm putting the ActionScript into the frame I want to play the video in. When I try to test it, I keep getting the following error message:"1083: Syntax error: package is unexpected"So I try taking the "package { }" code out and running it again. Then this error pops up:"The public attribute can only be used inside a package"I tried removing all the code inside the package and I still get the first error
View 3 RepliesI am having troubles passing an x and y argument into a package function that creates a projectile on stage at the tank.gun's x and y.I have attached a zip of the code I am working on.[code]
View 6 RepliesI'm running into this weird thing with ASDoc. It will only document one package function per package.For example.I have these two functions:
gs.util.printf
gs.util.ftrace
In these files:
gs/util/printf.as
gs/util/ftrace.as
The only function that get's documented in ASDocs is "printf". But I know it can do more than one. As an example, in the livedocs [URL] There are more than one functions documented.
I'm creating my first as3 with flashdevelop I don't understand what the instructions mean:
package
{
import flash.display.Sprite;
import flash.events.Event;
[Code].....
What if (stage) init(); means ? What is Event.ADDED_TO_STAGE ? Why remove listener in init ?
I get the following error[ImageError - Reason: FLASH_HAS_RANDOM_NUM, Field Path = operations[0].operand.ad.image.data]
The only random call I have is to get a random 360 angle for a set of particles, and the code is at the end of a movieclip within other movieclips.
UPDATE:I am using Flash CS3 and the banner settings are: Flash 8 and AS2,The code for the random bit is this._rotation = Math.random() * 360;
Something is broken in my Flash Professional CS5, and it's creating a real pain. When I have finished editing a page of TLF text and want to return to the stage, I find the little left arrow Missing In Action.
I'd send you picture of it, but it can no longer be found. Here is an image that I snagged from Adobe TV to give you a rough idea what I'm saying. The difference is that when I was editing a text symbol, ( before it broke ) then its name would be where Scene 1 appears, and the arrow would be strongly visible ( dark blue? ) rather than grayed out like this one is.
When this first happened it took a while to find any way at all of escaping the edit, but I finally found a really clunky way to get out. I have to save then exit the entire .fla file edit session, then come back in and start over.
I'm running Flash Professional CS5 11.0.2.489, apparently 32 bit code under Windows 7 on a 64-bit i7 processor.
Not surprisingly, this creates a big problem for me, since I have a huge amount of work that must be done quickly. I spent the money necessary to purchase what I thought was the best tool on the market, now I need some help to get it working again.
Well, there is a huge debate going on with the "best way to show users language selection", but no answer.All seem to suck. 2 and 3 suffering from "Country != Language", 1 and 4 suffering from "Cognitively, selecting a word out of a list of words sucks."While this question may seem subjective, it is possible to answer this question in a non-subjective way.Such as if Flex or some Flex component exists as a "Language Chooser" such as that found on a mobile device.
View 2 Replies[code]...
Yeah, I can't workout how to make them swapVis basically. Any more efficient means/methods would be welcomed.I feel like my code is getting too straight up and down and not looking out to make it shorter etc.
I've been searching around forever trying to find a way to make traversing nested display lists more of a 1-line possibility.In AS2 you could grab a clip just by _container.clip1.nestedclip2.nestedclip3 and it was blatently simple.In AS3, is there any way to do that?So far my only methods are keeping a class level reference to important parts of the UI or doing a painful series of getChildByName chains until I drill down to it:[code]The casting makes the getChildByName method possible.
View 15 RepliesI overheard some watercooler talk the other day and the subject was using the mic as a means to control the interactivity of a flash site.Example: Every sound that the user's mic "hears" results in an event much like clicking on a button to reveal a dropdown menu.
Or: The more you scream, the more popups appear on the site.
Background story: many users (including me) browse the web from notebooks that are not constructed for sound performance. That means (besides other things) that the sound volume for most videos is too low, especially if the video itself is recorded at low volume.
Therefore...
I was wondering if there is any way of increasing the volume of such a video (especially Youtube, but could be extended to other types), because I'm interested in doing it and even publishing it as Firefox/Chrome/other browser plug-in.
I have an actionscript file,it has a package name,it locate C:demo directory,like follows:
package demo{
import flash.display.*;
public class ABC extends Sprite{[code]............
Then I compile above code like following command,but it raise following error:
C:>mxmlc demoABC.as
Loading configuration file C:sdkframeworksflex-config.xml
C:demoABC.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'demo'.Where is wrong above command?
This is with Flexbuilder 3.2, Eclipse 3.3.2.I am moving my development environment to a new machine. Actionscript classes that compiled in the old environment now get a compile error:
A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package.I do declare the package in these classes - I think failure to declare the package is the usual reason for this error.To add to the mystery, many classes in this project compile without errors.
Just new in forum and just new in as3 programming. All i want to do is to make some physics simulations (i'm physics teacher...). So i made my first sim with the following code, just to simulate a simple motion with constant velocity. It works ok, except the part i need to reset the display by the means to start the motion all over again (reset button). Then the motion starts but the traces of the previous motion remains on stage. I tried the null command (sp=null) but the sim could not start again because the sp nedded to be non-null...
[CODE]...
I been searching on google about ">>", but i couldn`t find any explanation... So what doubleshift means or">>"?
View 2 RepliesI have classes witch resides in this package :com.network.interface_as. When I try to load one class from that package in another class in the same package like this:
[Code]...
I wrote this in my Action Script
var xml:XML=<tt xml:lang="en" xmlns="http://www.w3.org/2006/04/ttaf1" xmlns:tts="http://www.w3.org/2006/04/ttaf1#styling"/>;
but when I traced it out, it showed this
[code].....
i found out that iused delete.this.onRollOver, insteadof delete this.onRollOver.i found out that the panel is as good asawesome, but how do i make it that when i roll over one of the thmbnails a lager image shows up?here's the code
ActionScript Code:
//create a roll over function for our panel
panel.onRollOver = panelOver;[code]....
I have had Flash CS5 since it came out, I have updated the program regularly.When I open Flash it gives me the Unexpected File Format Error. Even though I am not opening any files.
View 1 RepliesI receive a error when loading a .fla file from a flash template downloaded from net.nexpected file format - yet adobe flash 5.5 recognizes the file and tries to load. I'm new to adobe flash.
View 1 RepliesI have a problem with a few lines of conditional coding:
[Code]...
I keep getting the syntax Error 1083: else is unexpected.
I'm suddenly getting an "Unexpected file format" error on virtually every Flash CS4 file that I try to open. These are files that I created and I'm trying to open tham on the same computer on which they were created. The only thing that I can think of that has changed is that I installed some new fonts, so I deleted those, but that hasn't helped.I've tried retrieving files that I had backed up to a server, and those give me the same error. The only files that I AM able to open are 1) a test file that I created in CS4, saved, closed and reopened, and 2) files that had been created in CS3.
View 1 RepliesI fell on an unexpected comportment with AS3 class definitions this morning. To tell it quickly, I cannot create an instance of a class inside the same class methods.
Here is an exemple :
package {
import flash.display.MovieClip;
import flash.events.Event;
public class Test extends MovieClip {
[code]....
I would like to understand the sub-process that prevents to do that.
The symbols appear properly in the library. To edit the circle, I double click it on the stage.It appears to open for editing - the status bar above the stage says SCENE 1 -- SYMBOL 1 - but the square symbol on the stage DOES NOT gray out to indicate I am editing the circle I make changes to the circle and click out of editing mode, and yes, the changes have been made to the symbol in the library. So the editing process appears to have worked.
I overlook the square not graying out and begin writing my ActionScript, a simple script that changes the color of the circle or square in response to mouse overs. When I test the movie, the circle works perfectly but the square is unresponsive. It seems like Flash does not realize the square is on the stage.his exercise comes from the Missing Manual Flash CS5 book.When I download the completed exercise from their website and double click THEIR circle for editing, the remaining symbol DOES turn gray on my stage to indicate it is not being edited.My code appears to be identical to theirs. I have started over from scratch over a dozen times now, but I seem to keep making the same mistake.
Today I was working on a project in Flash, I restarted my computer because when I was pasting sth. It was pasting "Hello!". After the restart, I opened Flash, It said that the "Essentials xml" couldn't be opened. So it said to go to Window>Essentials reset. I did and I was able to edit again. But before doing that, I tried to open that project, and it Said that it couldn't be found. I opened it manually but still the same. Then I closed Flash and opened it again. And when I opened the project I got : "Unexpected file format".
View 1 RepliesI have this problem opening a .fla file of mine.Error: "Unexpected file format". solving it as I don't want to lose all my work with that file
View 1 Replies