Starting with as files

hi, just the basics of placing code in an as file
i created a file, this is all the code in the file:
package something {      public class some_class {      } }
the file is called 'package_test.as'
now i create a new animation file, and in fort frame i place something like:
include "package_test.as"
import something.*
trace("done");
just the basics, create a class inside a packgage with a test clas, then try to recall it from another file. i get the next error:
1037: Packages cannot be nested
i mean, is pretty straight forward, just test the basics of placing code in a file and calling it from another file. it is not because the class is empty or has no constructor, i did this test because i had some code in some movies and i am trying to place them as part of a class, but i am failing in the basics so far. any pointers?

not sure about this; according to documentation, in a single as file can be defined more than one classes (unlike as2). also, i tried this:
1. i removed the package tag, so there was only the class defined there
after that it told me the public tag could be used only if defined inside a package, so i removed the public atribute for the class definition
2. i renamed the class so it would be the same as the file name, something like:
//package something {
class package_test {
this is the (whole) new content of the file
now i get this:
1131: Classes must not be nested.
there is only one class, named exactly as the file, so i guess this is not it, but tnx anyway

Similar Messages

  • Making a basic Video starting with sound files only

    I'm totally new to Premiere and find it quite dauting. Basic tutorials don't really seem to be helping as they presume you start with a working video.
    What I have is several 30-60 second .wav files which I need to be in sequence most of them also have associated GIF images to go with them.
    I'd like to create a video which just plays the wav files and the the associated GIFs in sequence?
    How do I go about doing this? Help much appreciated.

    Before you add any Assets to a Video Track, it will be black, as there is nothing to show. However, that "empty" Video Track can be problematic with many Export options.
    Instead, I would Import the Audio files, and drag each to the Timeline, where you want them. Note: a 1-channel (Mono) Clip will ONLY go on a 1-channel Audio Track, but if you do not have one, and need one, just drag that 1-channel Clip to the Master Audio Track. It will not go there, but PrPro will create the necessary 1-channel Audio Track, and put the Clip onto it. Same for 2-channel (Stereo).
    When you have your Audio Tracks in place, go to the New icon at the bottom of your Project Panel, and click on that. From the drop-down, choose Black Video. When created, just drag that to say Video Track 1. It will probably be only 05 sec. long (the default), but just click+drag on the Tail of that Black Video Clip, to drag its Duration to match the Duration of the entire Audio Track(s).
    Then, Import the graphic Images. Drag each to say Video Track 2, above that Black Video. Adjust each Image's Duration, as needed. If required, you can adjust the Fixed Effects>Motion>Scale, and Motion>Position, if needed. You can also Keyframe those Fixed Effects, if you wish to animate them over time, i.e. Pan, and/or Zoom.
    Done.
    Good luck,
    Hunt

  • Need help to start with some file and text manipulation

    Hello script mavens,
    I need help with starting a script that does the following:
    -within a base folder it takes an inventory (list?) of all the files (which happen to be image files).
    -creates a new folder inside the base folder and calls it imagesX where X increases by one every time the script is run
    -moves all the files into the images folder
    -within the base folder it creates a new text file and calls it imagesX.js
    -writes a "//-" into imagesX.js
    -then writes the list of filenames into the imagesX.js twice, separated by an empty line, and adds a semicolon to the end of each filename and saves imagesX.js
    -from a folder a level above the base folder it copies a file called index.html into the base folder and renames in indexX.html
    -in indexX.html it replaces a string "replaceThis" with "imagesX.js"
    The task is more complex but this would help me tremendously do the rest.
    If I am asking for too much on this forum please let me know

    This should get you started.
    The description of how you want to write the data isn't clear, but the rest should work (untested):
    property imageNum : 0 -- last used ImageNumber
    -- within a base folder it takes an inventory (list?) of all the files (which happen to be image files).
    -- get the folder:
    set baseFolder to (choose folder)
    -- now get the files within it:
    tell application "Finder"
    set fileList to every file of folder baseFolder as alias list
    end tell
    --creates a new folder inside the base folder and calls it imagesX where X increases by one every time the script is run
    tell application "Finder"
    set imageNum to imageNum + 1
    set newImageFolder to make new folder at baseFolder with properties {name:"images" & imageNum}
    -- moves all the files into the images folder
    move every file of folder baseFolder to newImageFolder
    --within the base folder it creates a new text file and calls it imagesX.js
    set textFile to (open for access file (baseFolder as text) & "images" & imageNum & ".js" with write permission)
    --writes a "//-" into imagesX.js
    write "//-" to textFile
    -- then writes the list of filenames into the imagesX.js twice, separated by an empty line, and adds a semicolon to the end of each filename and saves imagesX.js
    -- need more info here
    -- a blank line between each instance of the file name? or all file names, blank line, all file names again?
    -- an example, please
    close access textFile
    --from a folder a level above the base folder it copies a file called index.html into the base folder
    --and renames in indexX.html
    --in indexX.html it replaces a string "replaceThis" with "imagesX.js"
    -- the easiest way of doing this is to read the file and write a new copy with the changes - that's easier than changing it in situ:
    set indexHTML to (read file "index.html" of folder (container of baseFolder))
    set {oldTIDs, my text item delimiters} to {my text item delimiters, "replaceThis"}
    set indexHTML to text items of indexHTML
    set my text item delimiters to "imagesX.js"
    set indexHTML to indexHTML as text
    set my text item delimiters to oldTIDs
    set indexFile to (open for access file ("index" & imageNum & ".html") with write permission)
    write indexHTML to indexFile
    close access indexFile
    end tell

  • Working with .FLV files?

    What program would you recommend for converting .FLV files to:
    1. a format that can be edited in FCP?
    2. H.264 QT files without degrading the quality?

    .flv files are already highly compressed. If you take them, edit and then compress them again (this time to H.264) you will be double compressing the files which is a guaranteed way of degrading quality. The solution is not to start with .flv files. Get the original video files.
    All that being said if you are simply turning .flv files into H.264 without editing, then you might be in luck. The latest version of FLV uses H.264 as the codec (previous versions used On2 or Sorenson). You can take H.264 videos and just change the file extension to .flv and they will work. So doing the reverse should also work, if they were encoded using H.264. If they used the older codecs, then you have to double compress the files.

  • I am using Firefox 11 and I am unable to print web pages. I can print PDFs ok. I tried to open the prefs.js file to delete anything that starts with print and I get an error message.

    I cannot print web pages. I've tried the solutions suggested like deleting anything that starts with print in the prefs.js file but I get an error message: Script: c:\users\rick\appdata\roading\mozilla\firefox\profiles\iviwh5c1.default\prefs.js
    line: 1
    Char: 1
    Error: invalid character
    code: 800A03F6
    Source: Microsoft JScript compilation error

    When editing '''prefs.js''' you need to use a simple text editor program. WinXP Notepad messes up the line formatting of prefs.js, so I use Wordpad - but you need to save the edited file in a Text-Only format (Wordpad asks about that when you go to save the edited file). I never used Win7, so I don't know if that version of Notepad messes with the line formatting of prefs.js or not.
    Another thing - make sure '''''"Hide extensions for known file types"''''' is de-delected in Windows file / folder options > view -> advanced settings. Otherwise Windows may add a .txt file extension that you won't be able to see, and that will break that file in Firefox. '''prefs.js.txt''' won't be recognized by Firefox, when is expecting to find '''''prefs.js''''' .

  • I was messing around with .kext files in the MacintoshHD and now my MacBook Pro won't start up.

    I was messing around with .kext files in the MacintoshHD and moved the system.kext and two others to my desktop and deleted the originals and now the MacBook Pro won't start up. All I get at start up is the apple icon then a bunch of text shows up part of which says Mac OS version: not yet set. then the apple icon turns into the power icon and tells me to turn off the computer. I've tried reinstalling from the install DVD by holding down option when powering on and selecting the install DVD and it just goes to a white screen with the apple icon and stays like that. I didn't have the disk utility on my Mac before this happened because I deleted it to make room on my computer a while ago so I'm not sure if that's why it won't load the install DVD but anyone who knows the solution to this with out going to get it repaired would be greatly appreciated. Thank you!

    Never mind my dad just found the original install DVD and that worked. Before I was using an install disc that Apple sent me for another issue I was having, but thanks for replying so quickly and trying to help on this Thanksgiving day!!!

  • HT201250 i am using for first time the time machine and an external hard drive because I want to erase my macbook and start from zero files. do i keep my files in the portable hard disk when I connect it again with the macbook or the time machine will era

    i am using for first time the time machine and an external hard drive because I want to erase my macbook and start from zero files. Am i keeping my files in the portable hard disk when I will connect it again with the macbook or the time machine will erase all?
    I would like to know if after I erase all my data, empy hard drive inside the macbook, the time machine will erase all my files that I have saved in my "WD "My passport" external hard drive

    Welcome to Apple Support Communities
    Time Machine has to erase the external disk in order to make backups. Before setting Time Machine up, copy the files of your external disk to the hard disk of the Mac in order not to lose them, and then, set up Time Machine. The first backup will start automatically.
    If you want more information about Time Machine, read the Pondini's site > http://pondini.org

  • Loading Hex Files with multiple records with each line starting with : record marker, how do I load this hex file into a front panel table ? thanks in advance, Jeff.

    I have written a routine that loads a Hex file, checks for record marker,length,address etc then loads the data into a table on front panel. However, my routine only loads single record hex files. I need to be able to load multiple record files, I need to identify the ':' colon record marker start for each record in the hex file, I just can't see how to loop my routine so that all records with ':' prefix marker are loaded.

    Jeff,
    I'm not exactly sure of what you are trying to do. Is it possible you could post your code, or a screen shot of the diagram in question, so that I can get a better understanding, and possibly offer some assistance?
    I am familiar with hex files, but not with the : marker separating records. This may be able to be solved with simple text parsing, and as I am not familiar with how you are retrieving and/or displaying the files, I require more information.
    Thanks

  • After signing with e-signature acrobat creates an additional file starting with aa

    I open a file and place a signature on the document. After placing the signature, and locking the file on save, it overwrites the existing file fine, however it creates an additional file in the folder and the files start with aa.  example: aab03284  (No file extension is attached)

    I have also had this issue - and it just randomly started happening, along the same time the request to do EchoSign disappeared (not sure if they are related).  I'll save as over top the existing file, and it asks if I want to do that, I hit 'yes' and it then creates a temporary file instead of saving it over the existing.  I have to then go back in, 'save as' again, say that I want to do that again, and then it finally saves over it correctly.

  • Getting Started with FCE - Problems with my imported files

    Hi,
    I'm trying to get started with Final Cut Express, but I'm experiencing lots of problems when I import my project from iMovie.
    My project contains video, which I imported into iMovie at 960 x 540. It also contains some keynote animations, which I exported from Keynote as quicktime files.
    When I export my files to FCE, I instantly get problems.
    1) When I add the imported file to the sequence, I get an "Attention the clip does not match the sequence's setting or any of your sequence settings" error.
    2) Whether I choose to translate my settings or not, I try to play the video in the timeline, but there is a continuous beeping sound, no audio from my video and when it hits the keynote animations, it just says "unrendered" or "media offline".
    Please can you offer any advice on how I can get started with FCE more successfully.
    Thanks!

    Hi(Bonjour)!
    (please specify iMovie and FCE version)
    Well, your sequence settings in FCE should be DV-PAL 48 Khz.
    Create a new sequence.
    From iMovie and Keynote, export your movie with quicktime conversion andd select DV-PAL 48 kHz (*And Not* DV Stream...). This material should play without rendering because his format and codec match the sequence's codec.
    Import your files and everything should be OK.
    Michel Boissonneault
    The audio should be AIFF 48 kHz 16 bit linear PCM

  • Foxfire downloaded an up-date last night (10 20/2010) at 5:30 PM EDST and it crashed the compter on re-start with an error message... Missing or Corrupt File ... WINNT\system32\config\SYSTEM

    Foxfire downloaded an up-date last night (10/20/2010) at 5:30 PM EDST when I started Firefox, and it crashed the compter on re-start with an error message... Missing or Corrupt File ... WINNT\system32\config\SYSTEM. This machine is Windows 2000 Professional on Dell computer and Foxfire 3.6 or 4 not sure computer is stuck at the error message.

    Hi there,
    You're running an old version of Safari. Before troubleshooting, try updating it to the latest version: 6.0. You can do this by clicking the Apple logo in the top left, then clicking Software update.
    You can also update to the latest version of OS X, 10.8 Mountain Lion, from the Mac App Store for $19.99, which will automatically install Safari 6 as well, but this isn't essential, only reccomended.
    Thanks, let me know if the update helps,
    Nathan

  • Wrong File(parent, child) behaviour on Windows when child starts with one s

    I've sent following problem report:
    A DESCRIPTION OF THE PROBLEM :
    On Windows when relative path starts from one slash it should be resolved from current disk (not current directory). This behaviour should be preserved for Files constructed with constructor File(parent, child). So results of run "System.out.println(new File(dir, relPath).getAbsolutePath())" and "System.out.println(new File(relPath).getAbsolutePath())" should be identical when running program from directory "dir".
    STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
    Compile and run from directory C:\temp\relpath following code:
    import java.io.*;
    public class Main {
         public static void main(String[] args) throws Exception {
              System.out.println(new File("C:\\temp\\relpath", "\\temp\\relpath\\Main.java").getAbsolutePath());
              System.out.println(new File("\\temp\\relpath\\Main.java").getAbsolutePath());
    EXPECTED VERSUS ACTUAL BEHAVIOR :
    EXPECTED -
    C:\temp\relpath>java Main
    C:\temp\relpath\\Main.java
    C:\temp\relpath\Main.java
    ACTUAL -
    C:\temp\relpath>java Main
    C:\temp\relpath\temp\relpath\Main.java
    C:\temp\relpath\Main.java
    The answer was:
    I have been analyzing your problem and it is not a bug but the intended behavior of the API.
    The File(File,String) constructor includes this in the specification:
    "If the |child| pathname string is absolute then it is converted into a relative pathname in a system-dependent way."
    In the example provided here, the child path is absolute so it is converted into a relative path. This is the intended behavior.
    My comments:
    First, child pathname is not absolute. Even so, I don't understand why this guy contend that this behavior is correct.
    Please comment this!

    Please comment this!
    I've sent following problem report:
    A DESCRIPTION OF THE PROBLEM :
    On Windows when relative path starts from one slash
    it should be resolved from current disk (not current
    directory). This behaviour should be preserved for
    Files constructed with constructor File(parent,
    child). So results of run "System.out.println(new
    File(dir, relPath).getAbsolutePath())" and
    "System.out.println(new
    File(relPath).getAbsolutePath())" should be identical
    when running program from directory "dir".
    STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
    Compile and run from directory C:\temp\relpath
    following code:
    import java.io.*;
    public class Main {
    public static void main(String[] args) throws
    s Exception {
    System.out.println(new File("C:\\temp\\relpath",
    ", "\\temp\\relpath\\Main.java").getAbsolutePath());
    System.out.println(new
    ew
    File("\\temp\\relpath\\Main.java").getAbsolutePath());
    EXPECTED VERSUS ACTUAL BEHAVIOR :
    EXPECTED -
    C:\temp\relpath>java Main
    C:\temp\relpath\\Main.java
    C:\temp\relpath\Main.java
    ACTUAL -
    C:\temp\relpath>java Main
    C:\temp\relpath\temp\relpath\Main.java
    C:\temp\relpath\Main.java
    The answer was:
    I have been analyzing your problem and it is not a
    bug but the intended behavior of the API.
    The File(File,String) constructor includes this in
    the specification:
    "If the |child| pathname string is absolute then it
    is converted into a relative pathname in a
    system-dependent way."
    In the example provided here, the child path is
    absolute so it is converted into a relative path.
    This is the intended behavior.
    My comments:
    First, child pathname is not absolute. Even so, I
    don't understand why this guy contend that this
    behavior is correct.
    */

  • Need schema files for tutorial in getting started with soasuite11gR1

    Hi
    I just started working on Getting started with Oracle SOA suite11gR1 book.
    I dont have schema files required for tutorial.
    Can an provide me the schema files.
    creditchecck.xsd
    fulfillment.xsd
    internalorder.xsd
    OrderBookingDiscount.xsd
    po.xsd

    This link: http://download.oracle.com/technology/products/soa/soasuite/books/SOA11g_GettingStarted.zip contains the good files
    Edited by: 851325 on 11 avr. 2011 05:04

  • Home Folder can't accept files or folders starting with letters A through O

    I've had my g4 powerbook for like 6 years. It has OSX 10.39, 800Mhz, 1GB RAM.
    I only have 1 Home folder, my own, and I am the admin on the computer.
    The most screwed up thing has happened lately. I can't add any new files or folders directly under Home IF they start with the letter A through O. Whenever I try to do this, it says "The Operation Could Not Be Completed. Unexpected Error Occurred (Error Code -51)."
    For instance, while I was trying to figure out what was wrong, I moved the Movies and Music folders OUT of Home and now when I try to move them back again they won't go in. So now I can't use iTunes since every time I try to start it it says there must be a music folder under Home!
    The other thing I have tried is renaming things in Terminal using the mv command but it doesn't work and it gives this error message: "Bad file descriptor"
    What is wrong and how do I fix this because I am completely mystifiesd ... thanks for your help.

    Does the DVD-R have a very long name? If so, see:
    *Unable to copy or move files from volume that has a long name*
    http://support.apple.com/kb/TS2053
    If this seems to be the problem you'd probably have to try burning a new DVD with a shorter name, since you can't rename the present DVD.

  • Drag and drop onto AIR to start AIR with a file

    Is it possible to drag a file onto an AIR application icon to START the application using that file?
    I'm aware that once the AIR app is open files can be dragged into it and it will also open the application when a file is dragged onto it (if the file type  associations have been set) though without any of that file being used, but I'd like to be able to open it directly with the file I drag onto the app. Some sort of InitialStateVariable or such?

    This doesn't seem to work on Snow Leopard. Is there any think I should check?
    UPDATE:
    Found out, lazy me!
    NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);

Maybe you are looking for