Enums with the implementation of the specific method constant

Just faced the following problem. I have the persistence of a class with one of the fields of it's enum with the implementation of the constant specific method:
@Persistent
public class Message
{
   static public enum Type
   {
       DEFAULT
       { 
           @Override
           public String getDescription() { return "Some description"; }
       };
       public abstract String getDescription();
   }
   ...
   private Type type;
   ...
}
When I try to save the file, I get the exception:
java.lang.IllegalArgumentException: Class could not be loaded or is not persistent: messages.Message$Type$1
The problem seems to be in this compiler creates a separate class, namely Message$ Type$ 1.class for the DEFAULT instance and this class knows no BDB...

If I delete the specific constant method of the enum, everything works fine (as the... $1.class is not created by the compiler)... Except for the fact that I would have the constant-specific methods he...
Any ideas on that? Maybe it's a bad idea to create the specific constant methods if it means that each constant would own class file (and they would inflate storage routines)?

Hi Mikhail,

I've recreated the problem here and you're right, the constant-specific methods do not work. This isn't something that we thought, to be honest or tested.

Just, based on a first glance I see that for the class of the generated compiler, the Class.isEnum method returns false, which is why we do not recognize this as an enum and finally throw us the exception you see. But assuming that we can identify the class as an enum (which shouldn't be too hard) I don't know what other problems will meet us in trying to support this.

For now I think the best thing is to avoid using the constant-specific methods. I opened a ticket (#18357) so that we will be sure to look into this more closely and see if it can be taken care of in the future.

If we are able to support, so I hope that we do not have to store additional metadata for the constants that have methods. In other words, I hope that we will not have to add any additional storage space or processing overhead.

-mark

Tags: Database

Similar Questions

  • New virtual machine for the model with the specific name

    Hello

    I'm trying to add some model VM to VAPP using recomposeVApp (...). And it works well except that I can not change the name of the virtual machine while recomposing. It takes the name of the model. But how to add VMS to model with the specific name? I use the v1.0 API.

    This is my code:

    ReferenceType vmTemplateRef = new ReferenceType();
    vmTemplateRef.setName ("MyNewVM"); This name is ignored. The name of the model is taken!
    vmTemplateRef.setHref (vmRef.getHref ()); reference to the model

    CompositionItemParamType vmItem = new CompositionItemParamType();
    vmItem.setSource (vmTemplateRef);

    create the type params VAPP recompose.
    RecomposeVAppParamsType recomposeVAppParamsType = new RecomposeVAppParamsType();
    recomposeVAppParamsType.setName (vAppRef.getName ()); The name of vApp. It is ok.

    added the element of the virtual machine.
    The newItems < CompositionItemParamType > recomposeVAppParamsType = list
    . getItem().
    newItems.add (vmItem);

    Task task = vapp.recomposeVapp (recomposeVAppParamsType);

    Thank you

    Hello

    For after this code fragment:

    vmTemplateRef.setName ("MyNewVM"); This name is ignored. The name of the model is taken!

    The model name is ignored because vmTemplateRef is the only reference to the object that will be used for the operation of recomposition. If changing the name it will be always ignored.

    I think that changing the name of the virtual machine template for recompose cannot be done as follows:

    (1) operation recomposeVApp().

    (2) get the recomposed VAPP

    (3) download the children-> VM you want to change.

    (4) change the name of the virtual computer.

    I hope this helps!

  • Problem with the substring method

    I cannot using the substring method results in an "if" statement  To isolate the problem, I run the following code on the 9550 Simulator:

        String buff = "abcdef";
        String B = "";
        B = buff.substring(2, 3);
        Dialog.alert("B = " + B + ",  size = " + B.length());
        if (B == "c") Dialog.alert("Test passed");
        if (B != "c") Dialog.alert("Test failed");
        if (buff == "abcdef") Dialog.alert("xyz passed");
    

    When running I get the message "B = c, size = 1" message tracking "Test failed". and "xyz happened."  This last post seems to indicate that the "if" test is not having problem with channels.

    I tried to copy B on another channel and use it and adding spaces to the front and back and then cut, but none of those who have helped.  I even tried to change the test to B == buff.substring (2.3), but that no longer works.  When I change line 3 to B = 'c', I get the message "Test."

    Can someone tell me what is happening here?

    This seems to be the result wanted for me. The substring is only the letter c, because you start to position 2 (the third character because it is zero-based) and go down to 3 (which is impossible), but you check with the equality operator (==) and not the .equals of the String class that actually controls the characters method, then the test is a failure.

  • IntelliPoint 8.20.468.0 problem with the specific parameters of the program on Windows 8

    I have a Microsoft Wireless Laser Mouse 7000 on Windows 8 Pro with Intellipoint 8.20.468.0 and the specific parameters of the program to set up the rear push button to a combination of keys ("for example, ' t '), for various programs.  If you leave the home page so that this 'Back' button (by default), this setting DOES NOT WORK.  The specific setting of the program is IGNORED.  If you set the homepage to anything else (for example, "previous window") then the program specific setting works.  It wasn't a problem on Windows 7 with 8.2 Intellipoint.

    Any ideas.

    Anyone know how to file a bug report - I couldn't see how to file a.

    Neil H. Currie

    I have a Microsoft Wireless Laser Mouse 7000 on Windows 8 Pro with Intellipoint 8.20.468.0 and the specific parameters of the program to set up the rear push button to a combination of keys ("for example, ' t '), for various programs.

    Have you tried to download Microsoft Mouse and keyboard Center?   Which has replaced the former IntelliPoint and IntelliType support tool.   In fact, I think it would be listed in Windows Update as optional updates.

    HTH

    Robert Aldwinckle
    ---

  • Help with the UpdateView() method inside my function

    Hi all!

    Right, I started my journey to the bottom of the more 'Advanced' way of using Powercli scripting languages and in the process have resulted in a few questions that I try to answer. I have created an advanced function of earlier and was very "impressed" (sorry only word I could think ) with it as it has been very useful in my work on the day the day. This lead me on the creation of the more advanced functions and placing them in a "module" folder\file. However, even if the majority of them is reporting back exactly what I wanted. THE MAIN PROBLEM IS THE PERFORMANCE. We have a very large domain (3000 VMs) and the VM back news taking so long.

    So after having posted on gettting here and thankfully not only my answered by LucD but LucD send me pointers as to where I can go to the question. I read the links he sent me and same have bought book of Steve Jins. My knowledge is improvin, but seem to be stuck here and need help.

    I have attached my function below and would like someone to talk me through the following:

    1. I understand the cmdlet Get-view works now and especially in conjunction with my function below. I tested it and it works great and IS faster than just using the approach of the cmdlet. I understand that the .NET view is simply a larger range of objects that can be much faster retrieve? He has worked and is faster when I tested it. I am so satisfied with the aspect of get-view of things.

    2. now leading me on the method of UpdateViewData() - how can I (or can I?) incorporate into my function. I added in, but I don't know if I used it properly, or even if it's supposed to be used like this if someone can help that will be greatly appreciated.

    Any help would be as always be appreciated

    Thanks in advance

    Munster

    Function Get-VirtualmachinesInfo {}

    < #.

    # >

    [CmdletBinding()]

    (PARAM

    [Parameter (mandatory = $true,)]

    ValueFromPipeline = $true,

    ValueFromPipelineByPropertyName = $true,

    HelpMessage = "Please enter the VM name")]

    [ValidateNotNullOrEmpty()]

    [String []] $VMName

    )

    BEGIN {$OutputObj = @ () # output initialization object array

    }

    {IN PROCESS

    Try {}

    {Foreach ($VM to $VMName)

    If ($VM. GetType(). Name - eq 'string') {}

    Try {}

    $VM = get - VM $VM - ErrorAction Stop

    }

    {} Catch [Exception]

    Write-Warning "$VM is NOT a virtual machine.

    continue

    }

    }

    } ElseIf ($VM - isnot [VMware.VimAutomation.ViCore.Impl.V1.Inventory.VirtualMachineImpl])

    Write-Warning "you not pass a string or a VM object.

    continue

    }

    "$VMView get-View - ViewType Virtualmachine-filter = @{'name' = $vm.name}.

    -Name of the property, config, summary

    $VMView | %{$_. UpdateViewData ("VM. "Name", "VM.config", "VM. Summary")}

    $Props = [ordered]@{'Name'=$VMView.name;

    'Version' = $VMView.config.version;

    'UuID' = $VMView.config.Uuid;

    'CPU_Num' = $VMView.config.hardware.NumCPU;

    'CorSkt_Num' = $VMView.config.hardware.NumCoresPerSocket;

    "Nics_Num" = $VMView.summary.config.NumEthernetCards;

    "VHDs_Num" = $VMView.summary.config.NumVirtualDisks;

    }

    $Obj PSObject = new-Object-property $Props

    $OutputObj += $Obj

    }

    }

    {} Catch [Exception]

    THROW "could not get the VM details, please confirm that the virtual machine exists."

    }

    }

    {END}

    Write-Output $OutputObj # exit EXIT pipeline objects

    }

    }

    Fix.

  • I get only a single level of cancellation with the pop method / Cancel button

    Hello.  Why this code produces only a single level of cancellation?  I thought whenever the pop method is triggered on a table, the table shrinks and you can continue to pop as long as the table is not less than 0.

    Here is my code:

    import flash.display.MovieClip;

    import flash.display.Shape;

    import flash.events.MouseEvent;

    import flash.events.Event;

    // http://www.Kirupa.com/Forum/showthread.php?309502-AS3-spiral-effect ... it's one used previously in other files

    // http://hub.tutsplus.com/tutorials/create-a-basic-drawing-application-in-Flash--active-1627 ... it's the one used here

    var my_mc:MovieClip = new MC();

    var container: MovieClip = new MovieClip();

    stage.addEventListener (MouseEvent.MOUSE_DOWN, startDrawing);

    stage.addEventListener (MouseEvent.MOUSE_UP, stopDrawing);

    var shape: Shape = new Shape();

    var myArr:Array = new Array();

    var myArrRedo:Array = new Array();

    var myArrObj:Array = new Array();

    var undo_btn:MovieClip = new Btn_mc_undo();

    var redo_btn:MovieClip = new Btn_mc_redo();

    undo_btn.x = 10;

    undo_btn.y = 350;

    redo_btn.x = 110;

    redo_btn.y = undo_btn.y;

    addChild (undo_btn);

    addChild (container);

    stage.addChild (redo_btn);

    var nums:int;

    undo_btn.addEventListener (MouseEvent.MOUSE_DOWN, undoEvent);

    redo_btn.addEventListener (MouseEvent.MOUSE_DOWN, redoEvent);

    function undoEvent(e:MouseEvent):void {}

    container.removeChild (myArrObj.pop ());

    }

    function redoEvent(e:MouseEvent):void {}

    nothing yet

    }

    var num:int = 0;

    function startDrawing(e:MouseEvent):void {}

    Shape = new Shape();

    container.addChild (shape);

    Shape.Name = String (num);

    myArr.push (shape.name);

    myArrObj.push (shape);

    shape.graphics.lineStyle (3, 0xcccccc);

    shape.graphics.moveTo (mouseX, mouseY);

    stage.addEventListener (MouseEvent.MOUSE_MOVE, whileDrawing);

    NUM ++;

    }

    function stopDrawing(e:MouseEvent):void {}

    stage.removeEventListener (MouseEvent.MOUSE_MOVE, whileDrawing);

    }

    function whileDrawing(e:MouseEvent):void {}

    shape.graphics.lineTo (mouseX, mouseY);

    }

    a couple of these lines are surplus to troubleshooting (for example the num ++);

    I offered him work.  Maybe you have something else in the file which you have not realized.

    If you put a trace (e.target) according to your drawing, you'll see that it calls the function of drawing when you click the button (s).

    Here is a link to an example file using your code with a few adjustments for lack of content...

    http://www.nedwebs.com/Flash/AS3_Draw_Undo.fla

    Another remedy would be to create a separate drawing area of the buttons and target this area instead of the scene for your drawing listeners.

    It would also be a good idea to use a CLICK listener to the buttons and not a MOUSE_DOWN.

  • Problem with the getCharIndexAtPoint() method.

    Just try to set up a basic script to detect the text when the user clicks on it. The following code:

    trace (caesar_txt.getCharIndexAtPoint (300,300));

    GetCharacter();

    function getcharacter()

    {

    trace (caesar_txt.getCharIndexAtPoint (300,300));

    }

    Produced these results:

    42

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to fl.text::TLFTextField/getCharBoundaries()

    to fl.text::TLFTextField/getCharIndexAtPoint()

    at Untitled_fla::MainTimeline/getcharacter()

    at Untitled_fla::MainTimeline/frame1()

    If the first command the trace, the character index in this point (42) is returned, but as soon as the trace command is called in a function he faces a null object reference, apparently in the getCharBoundaries method. The field of text in question exist on the stage, it is not created in the code, but I doubt it would be a problem. Appreciate any help you could give me.

    I think you found a bug. I can reproduce it. The reason I think this is a bug is disable Word wrapping (select textfield, go to pass container and flow, defined behavior "Multiline no film"). The bug seems to only happen with active wordWrap.

    I produced the TLFTextField with code and also placed on stage to hand, the two error if the word wrapping is enabled.

    Disable word wrapping made your mistake disappear?

  • the vi isn't in a State compatible with the run method of vi

    I try to run a 'writing DAQ' vi in a school. He complained of his not able to run it with the above message. I use the API of teststand to get secondary vi.


  • Problem with the Paint method

    Hello guys,.

    I develop a map-like application,

    the screen contains key components of towing,

    -on the upper part is an ObjectChoiceField where the user can select a card

    - and below which is on the plan that the user has selected

    The problem is that I use the paint method to allow the user at the image of pain, what causes my ObjectChoiceField to disappear. Any help? Please be easy on me, I'm totally new

    Example Code:

    private static final int HORZ_SCROLL_FACTOR   = 10;
        private static final int VERT_SCROLL_FACTOR = 10;
        int left = 0;
        int top = 0;
        int maxLeft = 0;
        int maxTop = 0;
    
        final String choices[] = {"3", "4", "5", "6", "23"};
        private ObjectChoiceField choiceField;
    
        private BitmapField imageOutputField;
        Bitmap bitmap;
    
        public NetworkingMainScreen() {
    
            setTitle("AUC Maps");
            imageOutputField = new BitmapField();
            choiceField = new ObjectChoiceField("Pick a Map:", choices)
            {
                protected void fieldChangeNotify(int context)
                {
                    getURL();
                }
            };
    
            add(choiceField); // doesn't appear
            add(new SeparatorField()); // doesn't appear
    
            add(new LabelField("Map retrieved:")); //doesn't appear
            add(imageOutputField);
    
        }
    
        protected void paint(Graphics graphics) {
            if (bitmap != null) {
                graphics.drawBitmap(0, 110, imageOutputField.getBitmapWidth(), imageOutputField.getBitmapHeight(),
                        bitmap, left, top);
            }
        }
    

    You try to create a screen where you can move an image larger than the screen?

    Try this:

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-scrollable-image-field/TA-p/444955

    Have the user choose the card before arriving at the screen or use more menu items.

    The moving image field must focus to work properly. This scrolling while being able to focus on the ObjectChoiceField image will be delicate.

  • Could not start the work with the specification of the queue

    Hello
    I'm trying to chain two jobs, job1 and job2, with job2 to be executed only if complete job1 / succeeds. I followed the steps mentioned in DBMS_Scheduler documentation (http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse008.htm#CHDHJEFI) and another post on this forum (programmer - work event but I never can job2 to start...)

    Here is the code snippet, I have:

    Start

    dbms_scheduler.add_event_queue_subscriber ('agent001');
    -create job1
    () dbms_scheduler.create_job
    job_name = > 'Task1.
    job_type = > 'EXECUTABLE. "
    job_action = > "mspaint.exe"
    start_date = > systimestamp to the time zone ' Asia/Calcutta. "
    ACTIVATED = > FALSE
    );

    dbms_scheduler.set_attribute (name = > "Task1")
    attribute = > "raise_events"
    value = > dbms_scheduler.job_started + dbms_scheduler.job_failed + dbms_scheduler.job_broken + dbms_scheduler.job_completed + dbms_scheduler.job_stopped
    );

    dbms_scheduler. Enable ('job1');

    -create job2
    () dbms_scheduler.create_job
    job_name = > "job2,"
    job_type = > 'EXECUTABLE. "
    job_action = > "calc.exe"
    -start_date = > systimestamp to the time zone ' Asia/Calcutta. "
    queue_spec = > "sys.scheduler$ _event_queue, agent001.
    Event_condition = > ' tab.user_data.object_name = "Task1" and
    Tab.USER_DATA.event_type IN ("JOB_SUCCEEDED", "JOB_FAILED", "JOB_STARTED", "JOB_STOPPED")',
    ENABLED = > true
    );

    END;
    /

    Job1 (that starts Microsoft Paint) starts fine, EM shows Job2 as expected. But never starts Job2... I am running as SYS (as SYSDBA), so I don't think that the user rights should be a problem. Suspecting a problem with the queue of the event, I tried this:

    Subscriber SYS. AQ$ _AGENT;

    -create the Subscriber...
    DBMS_AQADM. CREATE_AQ_AGENT (agent_name = > 'agent001');
    Subscriber: = SYS. AQ$ _AGENT ('agent001', NULL, NULL);
    DBMS_AQADM. () ADD_SUBSCRIBER
    queue_name = > "sys.scheduler$ _event_queue"
    Subscriber = > subscribed.
    rule = > NULL,
    processing = > NULL);

    That did not help either. I'm obviously missing something here, could someone help plz!

    Thank you
    GOPA

    Hello

    Thre is a typo in your example that can be the cause of the problem.

    If you create job1 like that the real name is "JOB1" since Oracle canonicalise it (Please enter it unless it is in quotes).

    If your state of health for the work of the event should be

    ' tab.user_data.object_name = "Task1" and
    Tab.USER_DATA.event_type IN ("JOB_SUCCEEDED", "JOB_FAILED", "JOB_STARTED", "JOB_STOPPED")'

    Hope this helps,
    Ravi.

  • Not sure how to display all the applications that I'm supposed to have with the creative cloud - constant spin in the window? [was: creative cloud]

    Trying to download my creative cloud, but get a constant rotation in the window. Not sure how to display all the applications that I'm supposed to have with the creative cloud?

    Please visit: App does not open. Wheel of progress turn continuously

    I hope this helps.

    Concerning

    Megha Rawat

  • How to obtain the list of virtual machines in a cluster with the specific name

    Get-Cluster "Group 1" | Get - VM | where {$_.name - eq "owp *"} | Select name

    I've tried to filter the virtual machines with a specific name of a cluster by using a single command line but I am not going do anything...?

    I get results if I just Get-Cluster "Cluster 1' | Get - VM, but I want excluded other virtual machines to help to be enjoyed.

    Use - as instead of-eq

    Get-Cluster 'Cluster 1' | Get-VM | where {$_.name -like "owp*"} | select name
    
  • [FM11] Print the link to the Image and the markers of Index with the specific character Style

    Hello

    I'm new with scripts for Framemaker. I want to export FM docs to RTF, so I can import into InDesign. For placed images I want to insert a line of text that shows the link to the image (reference). In addition, I want to show the Index markers at the insertion location of brand with a different character Style. Can someone help me with this?

    Best regards, Sjoerd

    Sjoerd Hello,

    A note on your method to retrieve all related graphics: this will also deal with graphics that could be linked in master pages and reference. Just to be safe against unwanted side effects, you should limit your list of charts to those in the main flow of your document.

    On the tLoc: looking for really the cornerstone of the anchored frame that contains the chart. It's a little confusing that FM called the anchored frame and any graph of the same name. Even if you add a framework anchored in the text to an equation or a text box in your document, the anchored frame will appear in the list of the chart in the document. If you have a framework anchored containing an imported graphic file, you have a list of graphic objects inside the anchored frame, who himself appears in the list of graphical objects in the document.

    This function should do what you want to do:

    function ListGraphics (doc)

    {

    var had is doc. FirstGraphicInDoc;

    While (had. {ObjectValid()})

    If (aframe.constructor.name == "Eu") {}

    image = had. FirstGraphicInFrame;

    If (graphic.type is Constants.FO_Inset)

    doc. AddText (had. TextLoc, graphic. InsetFile);

    }

    had had =. NextGraphicInDoc;

    }

    }

    I suppose you also want to remove the anchored frames (imported image files) the text. This can be done in the same routine, but you first have to catch the next element in the linked list graphics in the doc before deleting the current. If you do not delete the first and end up with an object not valid. The method simpler and more secure to do is to create an array of items to delete. After the while loop, you delete these objects. Get the complete code looks like this:

    function ListGraphics (doc)

    {

    var toDelete = [];

    var had is doc. FirstGraphicInDoc;

    While (had. {ObjectValid()})

    If (aframe.constructor.name == "Eu") {}

    image = had. FirstGraphicInFrame;

    If (graphic.type == Constants.FO_Inset) {}

    doc. AddText (had. TextLoc, graphic. InsetFile);

    toDelete.push (had);

    }

    }

    had had =. NextGraphicInDoc;

    }

    for (i = 0; i< todelete.length;="" i++="" )="">

    toDelete [i]. Delete();

    }

    }

    This works on a small test file created. If you are in need of more support, do not hesitate to contact me: jang to jang dot nl

  • Need help with the URLRequest method

    Hello

    I built an MP3 player and must now run on my server. The idea behind the player is to allow users of songs to rate the player pulls the file system. The code below shows telling me the drive to read a specific file, but I need to play a bunch of files at random and don't allow users to listen to the file once. Given that users download MP3s with their own names, there is really no particular order in which the songs are, and the number of songs always fluctuate. How can I get the player to play the songs in the folder randomly and only once per user?

    Thanks in advance!

    Here is my code:

    import flash.events.MouseEvent;
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.media.SoundChannel;
    Import fl.events.SliderEvent;

    var myMusic:Sound = new Sound();
    var soundFile:URLRequest = new URLRequest ("lpwfte.mp3");
    channel: var SoundChannel = new SoundChannel();
    var sTransform:SoundTransform = new SoundTransform();
    var myTimer:Timer = new Timer (100);
    var songPosition:Number = 0;
    var myContext:SoundLoaderContext = new SoundLoaderContext (5000);

    myMusic.load (sound file, myContext);

    myTimer.addEventListener (TimerEvent.TIMER, updateTime);
    buttonPlay.addEventListener (MouseEvent.CLICK, playMusic);
    btnStop.addEventListener (MouseEvent.CLICK, StopMusic);
    sldVolume.addEventListener (SliderEvent.CHANGE, ChangeVolume);
    myMusic.addEventListener (Event.COMPLETE, getSongLength);
    btnPause.addEventListener (MouseEvent.CLICK, pauseMusic);

    function pauseMusic(evt:MouseEvent):void
    {
    songPosition = channel.position;
    Channel.Stop ();
    }

    function convertTime(millis:Number):String
    {
    var Minutes: Number = (millis % (1000 * 60 * 60)) / (1000 * 60);
    var seconds: Number = ((millis % (1000 * 60 * 60)) % (1000 * 60)) / 1000;
    If (< 10 minutes)
    {
    var displayMinutes:String = '0' + Math.floor (Minutes);
    } else
    {
    var displayMinutes:String = Math.floor (Minutes) m:System.NET.SocketAddress.ToString ();
    }
    If (second < 10)
    {
    var displaySeconds:String = '0' + Math.floor (Seconds);
    } else
    {
    var displaySeconds:String is Math.floor (Seconds) m:System.NET.SocketAddress.ToString ();.
    }
    Return displayMinutes + ":" + displaySeconds;
    return (Math.floor (Minutes) + ': ' + Math.floor (Seconds));
    }

    function updateTime(evt:TimerEvent):void
    {
    lblSongTime.text = convertTime (channel.position);
    }

    function getSongLength(evt:Event):void
    {
    lblSongTotalTime.text = convertTime (myMusic.length);
    lblSongName.text = myMusic.id3.songName;
    lblSongArtist.text = myMusic.id3.artist;
    lblSongYear.text = myMusic.id3.year;
    }

    function ChangeVolume(evt:SliderEvent):void
    {

    sTransform.volume = sldVolume.value;
    channel.soundTransform = sTransform;
    }

    function StopMusic(evt:MouseEvent):void
    {
    Channel.Stop ();
    songPosition = 0;
    }

    function playMusic(evt:MouseEvent):void
    {


    Channel = myMusic.play (songPosition);
    myTimer.start ();
    }

    The scope of what you're asking is probably beyond the intent of these forums, at least beyond the intent of most of the people who help here.  Though you might get lucky and find someone who is willing to share a design completed with you.  But here are some of the things that you need to learn/do to get where you want to be.

    First of all, you need to get a player that has a list (an array) of different music files it can play.

    Once you have this work, since you want that random play order, the way the easiest would be to shuffle table before playing anything.  You can accomplish this by using a shuffle like this feature...

    function shuffle(a:Array) {/ / pass the array to be shuffled as argument}
    var p:int;
    var t: *;
    var ivar:int;
    for (ivar =. Length-1; Ivar > = 0; Ivar-) {}
    p = Math.Floor ((Ivar+1) * Math.Random ());
    t = a [ivar];
    a [ivar] = a [p];
    a [p] = t;
    }
    }

    So, if you want that the user will not be able to play things once, then you need to control how file names are available, either by a clue no additional discount by the removal of the songs in the list because they are played.

    And if you want to really only to allow them to hear the songs that once, you must use other demanding such measures connect via a database where it costs money for must register as nobody will join two times...

    Once you have that working, then you must work to get the list of pieces to create dynamically by reading the content of the song on the server folder.  Because the Flash can't do it himself, you'll need a language aside server like PHP to act as the middle man, read the contents of the folder and relay that data of the Flash file in a Flash format for dealing with... Œuvres XML.

  • Problem downloading file with the specific file name

    I have built a graphical interface that allows the user to enter a (using IRite for editing) press release and have it upload to the server. It needs to be uploaded to the server using a specific name that the user selects from a drop down list. It is not working and I don't know why. Can someone take a look at my code and see if they can spot something? Thank you.

    assuming that, as in your original post, you use a component textarea with
    NAME = "commonality" for text entry, all you need is:

    If your drop-down list box file name contains only the part name and number
    extension (i.e. "mynews" instead of "mynews.cfm"), then add & ".cfm".
    After form.filename in the destination tag cffile above attribute.

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com/

Maybe you are looking for

  • Why did I not sign my application to find a friend on my iPod using can touch 6th generation

    Why can't I sign the app to find a friend using my iPod touch 6th generation? I feel that I have to worry always weather or not somebody add me as a friend here and try to follow me or something?

  • Dodgy email or not?

    I got an email from icloudapplecustomersupport.info asking me to verify my icloud account, or it could be interrupted. I am very suspicious because there a spelling error and the email address is not .info. com The branding is here on this site and b

  • Vista - cannot install the Office updates

    I got 12 updates for MS Office 2007 that will not be installed.  I know it referred to a security screwed up in the registry.  because all errors are connected to the msg on registry.  I had this same problem with XP Pro, but I can't find the Vista h

  • How to set the duration of viewing on images in Windows Media Player

    How can I disable the automatic in Windows Media Player viewing time when you use images?

  • GUI in advance

    Hi again I I got a guy o what components can use to make an interface for example Pentecost this buttons, tables and menus? It is envoriement of java? Thank you