Help with "simple" JFileChooser problem...

Hi all,
how do I set the font in a JFileChooser???
I have tried everything, but it always uses the Look & Feels default font setting. Can I change the default Look&Feels font setting?
Greatfully for any suggestions!
Cheers
Anders ;-D

Hello!
You can use the UIManager, e.g. UIManager.put("FileChooser.font", new Font("Arial",
Font.BOLD, 14);
Well, that didn't seem to help with my case either. So I tried something else: I overrided all of the defaults by using UIManager.put(key, value) this way I got all of the Fonts in the JFileChooser to change.
Correct me if I'm wrong... ;)
- Cathra -
Sample Code that performs the requested:
// Prepare the resources
FontUIResource font12Arial = new FontUIResource( "Arial", Font.PLAIN, 12 );
// Put values into UIDefaults (before initializing the JFileChooser)
UIManager.put( "ToolTip.font", font12Arial );
UIManager.put( "OptionPane.messageFont", font12Arial );
// shown for example
UIManager.put("FileChooser.openButtonText", "OpenUp");
UIManager.put("Button.font", font12Arial);
UIManager.put("Label.font", font12Arial);
UIManager.put("Table.font", font12Arial);
UIManager.put("TextField.font", font12Arial);
UIManager.put("ScrollPane.font", font12Arial);
UIManager.put("ComboBox.font", font12Arial);
UIManager.put("CheckBox.font", font12Arial);
UIManager.put("TitledBorder.font", font12Arial);
UIManager.put("RadioButton.font", font12Arial);
UIManager.put("ToolTip.font", font12Arial);
UIManager.put("TextPane.font", font12Arial);
UIManager.put("TextArea.font", font12Arial);
UIManager.put("Tree.font", font12Arial);
UIManager.put("List.font", font12Arial);
UIManager.put("MenuBar.font", font12Arial);
UIManager.put("Menu.font", font12Arial);
UIManager.put("MenuItem.font", font12Arial);
UIManager.put("TableHeader.font", font12Arial);
UIManager.put("TabbedPane.font", font12Arial);
// somewhere in the code:
JFileChooser c = new JFileChooser();
c.showOpenDialog(aParentFrame);

Similar Messages

  • Need help with simple mask problem

    hi there this is mark from superbooty a band that has played in the bay area for over 10 years...
    i was wondering if someone could help me with a Motion2 problem i'm having regarding masks.
    i'm working on this simple animated scene of a car going by a beach - the photo is from the passenger side and shows the outside mirror.
    i'm moving the background (different from the original that came with the car) and i want to move an image of tokyo inside the mirror housing too.
    i figured out how to do the mask but when i try to animate the image of tokyo the mask layer moves with it. when i lock the mask i can't move the image - ???
    there's got to be a way to lock the mask but be able to move what it is masking..
    here are the links to three images that show what the problem is - the first is
    the shot of the scene unmasked, shot 2 is the scene with the mask enabled, and the third is the shot when i try to animate the tokyo background:
    http://superbooty.com/mirrorbeach1.jpg
    http://superbooty.com/mirrorbeach2.jpg
    http://superbooty.com/mirrorbeach3.jpg
    any help would be most appreciated - thanks!

    Adam's solution is the one I'd use - put the mirror contents in a layer, mask the layer, then manipulate the mirror content image. Did this solve it for you - if so, please click on the or buttons over posts as appropriate...
    Patrick

  • I need help with a browser problem

    I am was given a new iMac G3 (from 2001) which was really never used.I have not yet had any serious problems with it, but really could use some help with a browser problem.
    I have 4 different web browsers that needs the macro media flash player update. The browsers I use are internet explorer, iCab, Netscape, and the original Mozilla Firefox.
    It would be of great appreciation for the readers of this post to answer my question.
    I am also having the problem with installing the plug - ins for the browsers. Thank You For Taking the Time To read This!

    Hi, rynodino -
    As Tom has suggested, plugins need to be installed in the Plug-Ins folder for the browser.
    Typically each browser will have its own Plug-Ins folder, usually located in the same folder containing the browser itself. In order for each of several browsers to access the same plugins, the plugins must be replicated and placed in each of the Plug-Ins folders for each of the browsers. The easy way to do that is to hold down the Option key while dragging a plugin to the new location - a copy (not an alias) of the plugin will be generated at the location it is dragged to.
    Most plugins will display a Netscape icon regardless of where they are located - this is normal.
    It is not unusual for the installer for a plugin to default its install to the Plug-Ins folder for Internet Explorer. So be it. Just replicate the new plugin to the other Plug-Ins folders as needed.
    Note that some plugin installs will involve more than one item. For those, be sure to replicate all items for it. Using labels can help identify what is new, what has been most recently added, in a Plug-Ins folder.

  • Can someone help with a networking problem?

    Here's a situation I need some help with:
    I live in a semi-detached house. My neighbour has broadband, I don't. The phone company (BT) has said it would cost too much to install another line to enable me to have broadband, and would involve digging up the road and the garden, which they're not prepared to do.
    However, someone at work has suggested that I approach my neighbour and ask if I could 'share' their broadband connection and in return pay a contribution to their monthly costs.
    For this, I believe, I would need to buy a router, plus something to make my Mac 'wireless'.
    Now, I consider myself Mac-savvy, but when it coms to wireless stuff I confess I know very little! So if someone could explain in simple terms what I would need to buy and approx costs I be very grateful!
    I have a G5, and I believe my neighbour is a PC user.
    Also, can someone explain how the whole 'share' thing works? Does my neighbour have to have their computer on all the time? Do I need to sign up with an ISP? Will having two computers accessing one line slow it down significantly?
    Many thanks,
    Andy

    Hi Andy, before going too far down the 'sharing' route I would rattle some cages chez BT. If your neighbour has broadband then you and they are within a hair's breadth (line length speaking) of the same distance to the exchange. If they have enabled BB next door, why can't they enable BB for you without the hassle? I live on a mobile home site in the back of beyond in Devon and when I upgraded from dial-up to BB, and then to 1 meg there was no problem. There was a two week hiatus while BT did their stuff 'on the line' but it all went without a hitch. Er...I take it you do have an exclusive landline?
    However, if the situation re the line is as per, then the simplest way (to obviate any wifi interference issues) would be for you or neighbour to route an ethernet cable through walls/window frames from your Mac to a router on their side of the wall. (Approx £30?) This would be connected to their phone line. Their PC would also plug into the router. (Which they may already have if they're on BB, though they may have a nasty USB BB modem &nbsp:&nbsp: No good for what you want.
    If you/they don't want the 'hardwire' option then first you have to wifi enable your Mac if it is not already. Not sure of the costs but check on the Apple website for 'Airport Extreme Card'. Don't go the wifi USB dongle route, apparently they are not VG, though I've no personal experience. You would then have to get a wifi router modem (from £40 I think, it's a long time since I've looked, my Belkin has been virtually faultless) which would sit on their side of the wall plugged into the BT socket. Their PC would either plug into that or connect wirelessly with it, as is their wont. That's basically it, but there could still be interference issues, eg, two households with microwaves, cordless phones; intervening walls, bookcases, filing cabinets etc., etc.,
    If done via either of the above, then no, your neighbour doesn't have to have their PC on all the time, if ever.
    You don't have to sign up with an ISP, it would have to be a 'gentleman's agreement' that you bung him £x pm for your share. He is already paying his ISP.
    In practice, sharing would only slow down large downloads.If you were each downloading a large file at the same time then you would be sharing the bandwidth, so your respective files would download at half the speed than they would otherwise. If you are each surfing and if you both 'clicked' at the same time then, yes, he might think, "Wish I hadn't said yes to Andy, this page is taking ages". I don't really think anyone would notice though unless he was surfing at the same time as you were downloading something big, or vice versa.
    I hope the above is some help but I would have a word with the neighbour first and sound them out, after rattling BT that is...
    Come back here if you want more help.
    Good luck!
    Adrian

  • Please help with simple Drag N Drop

    I’m desperate and need some help with this simple drag
    and drop. Here is the scenario…this animation is for a
    kindergarten course. I have 6 different colored teddy bears on the
    floor and the bears are to be placed on the middle shelf in the
    room, in no particular order. I have the code in place to drag the
    bears, and they return to their original location if dropped in the
    wrong area. Everything works, except I can’t make the bears
    stick to the target area. The target area has to be the same for
    all 6 bears. Can someone help me out with this?
    I have a feeling that the problem has something to do with my
    instance names, but I have tried everything I can think of and
    cannot get it to work. Is there some way I can post, send, or
    attach my .fla file for someone to look at? I’m desperate.
    PLEASE HELP!

    var startX3:Number;
    var startY3:Number;
    var counter3:Number=0;
    vf_A.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
    vf_A.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
    vf_E.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
    vf_E.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
    vf_I.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
    vf_I.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
    vf_O.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
    vf_O.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
    vf_U.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
    vf_U.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
    function pickUp3(event:MouseEvent):void {
    event.target.startDrag(true);
    reply2_txt.text="";
    event.target.parent.addChild(event.target);
    startX2=event.target.x;
    startY2=event.target.y;
    function dropIt3(event:MouseEvent):void {
    event.target.stopDrag();
    var myTargetName:String="target"+event.target.name;
    var myTarget:DisplayObject=getChildByName(myTargetName);
    if (event.target.dropTarget != null &&
    event.target.dropTarget.name == "instance112") {
    reply2_txt.text="Good Job!";
    event.target.removeEventListener(MouseEvent.MOUSE_DOWN,
    pickUp3);
    event.target.removeEventListener(MouseEvent.MOUSE_UP,
    dropIt3);
    event.target.buttonMode=false;
    event.target.x=myTarget.x;
    event.target.y=myTarget.y;
    var mySound:Sound = new vowels_NAR_goodjob();
    mySound.play();
    counter3++;
    } else {
    reply2_txt.text="Try Again!";
    event.target.x=startX2;
    event.target.y=startY2;
    var mySound2:Sound = new vowel_NAR_nopetryagain();
    mySound2.play();
    if (counter2==5) {
    reply2_txt.text="Great Job! You did it!";
    gotoAndPlay(3300);
    vf_A.buttonMode=true;
    vf_E.buttonMode=true;
    vf_I.buttonMode=true;
    vf_O.buttonMode=true;
    vf_U.buttonMode=true;

  • Help with simple applet - dragging box

    Hi I need help with a simple applet concept.
    I have a picture drawn in the background, but I need to draw a square and resize it when I drag.
    So with the picture in the background I click, drag the mouse, and it draws a rectangle from the starting point to where the mouse is while the mouse is clicked.
    The only problem is I can't figure out how to do this without redrawing the whole picture. If I don't repaint, it just keeps stretching around rectangles and leaving them there.
    I don't really need exact code, just an idea on how to do this without repainting the background every time the mouse is moved (because the picture in the background is complicated to draw and takes like a second).
    Thanks
    [nvm, found out about xormode]
    Edited by: BugMenOTdhzj on Nov 30, 2009 4:47 PM

    BugMenOTdhzj wrote:
    ..the picture in the background is complicated to draw and takes like a second).Paint the 'picture in the background' to a BufferedImage, then when it comes to paint()/paintComponent(), draw the BI to the Graphics object (clipped, if necessary (1)), then draw the rectangle to the Graphics object. This would be further optimised at time of rendering, by drawing both the 'picture in the background' BI and rectangle to a second BI, and finally writing that 2nd BI to the Graphics object.
    1) There are potentially other improvements that can be made, particularly with clipping, but I suspect if you try as I suggested, the rendering will be very quick and responsive. I have 40 FPS sound trace animations that do a great deal more on each call to paintComponent(), before bursting the final BI to screen.

  • Hello, im new to mac and I need some help with a java problem.

    Hello, im new to mac. I just need someone who can help with a problem ive come across when playing online games that run java. The game is arcanists. its on the funorb website. really fun game and i love it, but i cant play it without my screen keep scrolling or my character not responding at all. please get back at me ASAP. thx apple friends!

    FF has an extention that can be used to increase the conection speed. Its called Tweak Network 1.1 I see a difference on my iMac G5. Its not huge but it may be a big difference on yours.
    http://www.bitstorm.org/extensions/tweak/

  • Help with this occurring problem group differs on Library should be 0 group is 80

    Please can someone help me with the following problems when using disk utility.
    Keep getting the same repeating errors after repairing.
    Group differs on "Library:; should be 0; group is 80
    Permissions differ on "Library"; should be drwxr-xr-x; they are drwxrwxr-t.
    Group differs on :Library/Preferences:; should be 0; group is 80.
    Permissions differ on "Library/Preferences"; should be drwxr-xr-x; they are drwxrwxr-x.

    You can safely ignore it:
    http://support.apple.com/kb/ts1448

  • Urgent help with simple BPEL process

    Hello there,
    I need help with BPEL project.
    I'm new in JDeveloper&BPEL and i'd like to create process that we'll after sending employee ID return personal details of that employee.
    I did create application, BPEL project and connection to the database properly but somehow i can't deal input and output variable.
    Can someone please describe me step by step what i need to do, how to set up variable etc
    Thx,
    DI

    Me again. This time i hope i'll get some help :(
    Solution to my problem is change to the data-sources.xml and oc4j-ra.xml.
    Since i have database on same machine with BPEL PM Server that uses Olite DB when i tried to make changes i found in tutorials, here on forum and rest of internet
    BPEL PM Server just freeze, didn't start at all.
    Here are data-sources.xml, oc4j-ra.xml and DBAdapter wsdl file. Plz can someone make changes to those files i'll appreciate that.
    HOME\bpel\system\appserver\oc4j\j2ee\home\application-deployments\default\DbAdapter
    oc4j-ra.xml
    <?xml version="1.0"?>
    <oc4j-connector-factories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.oracle.com/technology/oracleas/schema/oc4j-connector-factories-10_0.xsd" schema-major-version="10" schema-minor-version="0" >
         <imported-shared-libraries>
              <import-shared-library name="oracle.bpel.common"/>
              <import-shared-library name="oc4j.internal"/>
              <import-shared-library name="oracle.xml"/>
              <import-shared-library name="oracle.sqlj"/>
              <import-shared-library name="oracle.toplink"/>
              <import-shared-library name="oracle.jdbc"/>
         </imported-shared-libraries>
         <connector-factory location="eis/DB/DBConn_XE" connector-name="Database Adapter">
              <config-property name="xADataSourceName" value="jdbc/DBConn_XEDataSource"/>
              <config-property name="dataSourceName" value="loc/DBConn_XEDataSource"/>
              <config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
              <config-property name="usesNativeSequencing" value="true"/>
              <config-property name="sequencePreallocationSize" value="50"/>
              <config-property name="defaultNChar" value="false"/>
              <config-property name="usesBatchWriting" value="true"/>
              <connection-pooling use="none">
              </connection-pooling>
              <security-config use="none">
              </security-config>
         </connector-factory>
         <connector-factory location="eis/DB/BPELSamples" connector-name="Database Adapter">
              <config-property name="xADataSourceName" value="jdbc/BPELSamplesDataSource"/>
              <config-property name="dataSourceName" value=""/>
              <config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
              <config-property name="usesNativeSequencing" value="true"/>
              <config-property name="sequencePreallocationSize" value="50"/>
              <config-property name="defaultNChar" value="false"/>
              <config-property name="usesBatchWriting" value="false"/>
              <connection-pooling use="none">
              </connection-pooling>
              <security-config use="none">
              </security-config>
         </connector-factory>
    </oc4j-connector-factories>
    HOME \bpel\system\appserver\oc4j\j2ee\home\config
    data-sources.xml
    <?xml version="1.0" standalone='yes'?>
    <!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources-9_04.dtd">
    <data-sources>
    <!-- Connection pool for oracle database -->
    <!--
    <connection-pool name="BPELPM_CONNECTION_POOL">
    <connection-factory factory-class="oracle.jdbc.OracleDriver"
    url="jdbc:oracle:thin:[username]/[password]@[hostname]:[port]:[sid]" />
    </connection-pool>
    -->
    <!-- Connection pool for oracle lite -->
    <connection-pool name="BPELPM_CONNECTION_POOL">
    <connection-factory factory-class="oracle.lite.poljdbc.POLJDBCDriver"
    user="system"
    password="manager"
    url="jdbc:[email protected]:1531:orabpel" />
    </connection-pool>
    <managed-data-source name="BPELServerDataSource"
    connection-pool-name="BPELPM_CONNECTION_POOL"
    jndi-name="jdbc/BPELServerDataSource" tx-level="global"/>
    <managed-data-source name="BPELServerDataSourceWorkflow"
    connection-pool-name="BPELPM_CONNECTION_POOL"
    jndi-name="jdbc/BPELServerDataSourceWorkflow" tx-level="local"/>
    <managed-data-source name="BPELSamplesDataSource"
    connection-pool-name="BPELPM_CONNECTION_POOL"
    jndi-name="jdbc/BPELSamplesDataSource" />
    </data-sources>
    DBAdapter wsdl file
    GetData_WS.wsdl
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    name="GetData_WS"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetData_WS/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/GetData_WS/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/GetDataWS"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/db/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/" location="DBAdapterOutboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/GetDataWS"
    schemaLocation="GetDataWS_table.xsd"/>
    </schema>
    </types>
    <message name="EmpDetailsViewCollection_msg">
    <part name="EmpDetailsViewCollection" element="top:EmpDetailsViewCollection"/>
    </message>
    <message name="GetData_WSSelect_EMP_ID_inparameters">
    <part name="GetData_WSSelect_EMP_ID_inparameters" element="top:GetData_WSSelect_EMP_IDInputParameters"/>
    </message>
    <portType name="GetData_WS_ptt">
    <operation name="GetData_WSSelect_EMP_ID">
    <input message="tns:GetData_WSSelect_EMP_ID_inparameters"/>
    <output message="tns:EmpDetailsViewCollection_msg"/>
    </operation>
    </portType>
    <binding name="GetData_WS_binding" type="tns:GetData_WS_ptt">
    <jca:binding />
    <operation name="GetData_WSSelect_EMP_ID">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBReadInteractionSpec"
    DescriptorName="GetDataWS.EmpDetailsView"
    QueryName="GetData_WSSelect"
    ReturnSingleResultSet="false"
    MappingsMetaDataURL="GetDataWS_toplink_mappings.xml" />
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    </operation>
    </binding>
    <!-- Your runtime connection is declared in
    J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
    These 'mcf' properties here are from your design time connection and
    save you from having to edit that file and restart the application server
    if eis/DB/DBConn_XE is missing.
    These 'mcf' properties are safe to remove.
    -->
    <service name="GetData_WS">
    <port name="GetData_WS_pt" binding="tns:GetData_WS_binding">
    <jca:address location="eis/DB/DBConn_XE"
    UIConnectionName="DBConn_XE"
         ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
         mcf.DriverClassName="oracle.jdbc.OracleDriver"
    mcf.PlatformClassName="oracle.toplink.platform.database.oracle.OraclePlatform"
    mcf.ConnectionString="jdbc:oracle:thin:@localhost:1521:xe"
    mcf.UserName="hr"
    mcf.Password="62C32F70E98297522AD97E15439FAC0E"
    />
    </port>
    </service>
    <plt:partnerLinkType name="GetData_WS_plt" >
    <plt:role name="GetData_WS_role" >
    <plt:portType name="tns:GetData_WS_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    Thx,
    DI

  • Please I really need help with this video problem.

    Hi!
    Please I need help with this app I am trying to make for an Android cellphone and I've been struggling with this for a couple of months.
    I have a main flash file (video player.fla) that will load external swf files. This is the main screen.When I click the Sets Anteriores button I want to open another swf file called sets.swf.The app is freezing when I click Sets Anteriores button
    Here is the code for this fla file.
    import flash.events.MouseEvent;
    preloaderBar.visible = false;
    var loader:Loader = new Loader();
    btHome.enabled = false;
    var filme : String = "";
    carregaFilme("home.swf");
    function carregaFilme(filme : String ) :void
      var reqMovie:URLRequest = new URLRequest(filme);
      loader.load(reqMovie);
      loader.contentLoaderInfo.addEventListener(Event.OPEN,comeco);
      loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progresso);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completo);
      palco.addChild(loader); 
    function comeco(event:Event):void
              preloaderBar.visible = true;
              preloaderBar.barra.scaleX = 0;
    function progresso(e:ProgressEvent):void
              var perc:Number = e.bytesLoaded / e.bytesTotal;
              preloaderBar.percent.text = Math.ceil(perc*100).toString();
              preloaderBar.barra.scaleX =  perc;
    function completo(e:Event):void
              preloaderBar.percent.text = '';
              preloaderBar.visible = false;
    btHome.addEventListener(MouseEvent.MOUSE_DOWN,onHomeDown);
    btHome.addEventListener(MouseEvent.MOUSE_UP,onHomeUp);
    btSets.addEventListener(MouseEvent.MOUSE_DOWN,onSetsDown);
    btSets.addEventListener(MouseEvent.MOUSE_UP,onSetsUp);
    btVivo.addEventListener(MouseEvent.MOUSE_DOWN,onVivoDown);
    btVivo.addEventListener(MouseEvent.MOUSE_UP,onVivoUp);
    btHome.addEventListener(MouseEvent.CLICK,onHomeClick);
    btSets.addEventListener(MouseEvent.CLICK,onSetsClick);
    function onSetsClick(Event : MouseEvent) : void
              if (filme != "sets.swf")
                          filme = "sets.swf";
                          carregaFilme("sets.swf");
    function onHomeClick(Event : MouseEvent) : void
              if (filme != "home.swf")
                          filme = "home.swf";
                          carregaFilme("home.swf");
    function onHomeDown(Event : MouseEvent) : void
              btHome.y += 1;
    function onHomeUp(Event : MouseEvent) : void
              btHome.y -= 1;
    function onSetsDown(Event : MouseEvent) : void
              btSets.y += 1;
    function onSetsUp(Event : MouseEvent) : void
              btSets.y -= 1;
    function onVivoDown(Event : MouseEvent) : void
              btVivo.y += 1;
    function onVivoUp(Event : MouseEvent) : void
              btVivo.y -= 1;
    Now this is the sets.fla file:
    Here is the code for sets.fla
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    var video:Video;
    var nc:NetConnection;
    var ns:NetStream;
    var t : Timer = new Timer(1000,0);
    var meta:Object = new Object();
    this.addEventListener(Event.ADDED_TO_STAGE,init);
    function init(e:Event):void{
    video= new Video(320, 240);
    addChild(video);
    video.x = 80;
    video.y = 100;
    nc= new NetConnection();
    nc.connect(null);
    ns = new NetStream(nc);
    ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
    ns.bufferTime = 1;
    ns.client = meta;
    video.attachNetStream(ns);
    ns.play("http://www.djchambinho.com/videos/segundaquinta.flv");
    ns.pause();
    t.addEventListener(TimerEvent.TIMER,timeHandler);
    t.start();
    function onStatusEvent(stat:Object):void
              trace(stat.info.code);
    meta.onMetaData = function(meta:Object)
              trace(meta.duration);
    function timeHandler(event : TimerEvent) : void
      if (ns.bytesLoaded>0&&ns.bytesLoaded == ns.bytesTotal )
                ns.resume();
                t.removeEventListener(TimerEvent.TIMER,timeHandler);
                t.stop();
    The problem is when I test it on my computer it works but when I upload it to my phone it freezes when I click Sets Anteriores button.
    Please help me with this problem I dont know what else to do.
    thank you

    My first guess is you're simply generating an error. You'll always want to load this on your device in quick debugging over USB so you can see any errors you're generating.
    Outside that, if you plan on accessing anything inside the SWF you should be loading the SWF into the correct context. Relevant sample code:
    var context:LoaderContext = new LoaderContext();
    context.securityDomain = SecurityDomain.currentDomain;
    context.applicationDomain = ApplicationDomain.currentDomain;
    var urlReq:URLRequest = new URLRequest("http://www.[your_domain_here].com/library.swf");
    var ldr:Loader = new Loader();
    ldr.load(urlReq, context);
    More information:
    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7de0.html
    If you're doing this on iOS you'll need to stripped SWFs if you plan on using any coding (ABC) inside the files. You mentioned iOS so I won't get into that here, but just incase, here's info on stripping external SWFs:
    http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/

  • Help with simple script

    I was wondering if someone could help me with a simple bit of action script 3. I need to make a movie clip (single_mc) disappear when the user clicks on the mouse (stop_btn). Here’s what I have so far.
    function setProperty(event:MouseEvent):void
    single_mc.alpha=0;
    stop_btn.addEventListener(MouseEvent.CLICK, setProperty);
    Also I was wonder if you could recommend an Action script 3 book for me. I would like one that is not a training book, but has situations and then the script written out. For example: I click a button and a movie symbol disappears from the stage. I am a graphic artist, that from time to time, needs simple interaction in flash, but cant justify the time to learn the script.
    Thanks for your time

    use the snippets panel to help with you with sample code for basic tasks.
    function setProperty(event:MouseEvent):void
    single_mc.visible=false;
    stop_btn.addEventListener(MouseEvent.CLICK, setProperty);

  • Help with a small problem....

    Hello friends,
    I have 2 minor problems using msaccess....
    1).I was designing a login appln i am having a hard time with case sensitivity...
    say suppose username:Scott,password:Tiger
    it authentication username:ccott,password:tiger
    and so on without checking case sensitivity....
    my sevlet code wud look something like this....
    String username=request.getParameter("username").trim();
    String password=request.getParameter("password").trim();
    rs=stmt.executeQuery(select [some value] from login where uid='"+username+" And pwd='"+password+"'");
    if(rs. next()){
    else{
    out.println("Invalid");
    2).I have a memo field in my table which holds a large set of text data....
    This might include double quotations (") whever this charecter is encountered the servlet or the jsp is replacing this charecter by (?).
    Though i got a hint of why it is happening i'm unable to fix that......
    An advice wud really help me out....
    Thanks In Advance !! !! !!
    REGARDS,
    RAHUL

    I don't do MSAccess, but I found this thread that made some sense:
    http://www.experts-exchange.com/Databases/MS_Access/Q_21645848.html
    Maybe it will help with your case sensitivity problem. It basically says to perform a secondary comparison based on Hex or Decimal values of the returned usernames/passwords. Not optimal, but that's what you get for using Access and not a production quality DB (IMHO). It's not like there aren't free ones out there.
    As far as your "quote" problem. Are you saying that trying something like this doesn't work?:
    String text = request.getParameter("text");
    String id = request.getParameter("id");
    if (text != null) {
      PreparedStatement st = con.prepareStatement("UPDATE table SET text = ? WHERE id = ?");
      st.setString(1, text);
      st.setString(2, id);
      st.executeUpdate();
    }Of course you need to catch exceptions, etc. But the general idea should work. You see Access doesn't need to provide PreparedStatements, the driver (I assume JDBC-ODBC bridge) should.

  • Please help with Nokia N95 problem.

    If anyone can help with this I’d be much appreciated, I have a N95 on contract with T-Mobile. When I try to play videos from myspace, or you tube etc… I get a message telling me the following.
    “Hello, Either you either have JavaScript turned off or an old version of macromedia's flash player click here to get the latest flash player”.
    I then get the option of clicking on a link within the previous sentence statement that directs me to acrobat downloads home page where I get the following message.
    “We are unable to locate a web player that matches your platform and browser. Please visit our table of recommended web players”
    This is deeply frustrating as in nearly every other way I feel the phone is perfect. If Any one can hep me fix this problem I’d be much appreciated.

    daperk,
    You should post this to board "Smartphones, Nseries and Eseries Devices".

  • Please help with column float problem in IE8

    Hi there,
    Sorry to be so pushy - but I am desperate for help!!
    Having serious problems with my site in some PC's showing Internet Explorer 8. My right column floated right is moving down the page underneath the left column..
    It shows fine on IE8 on my PC - however on my clients PC (vista with IE8) it is showing up as mentioned above. Is there a fix for this.
    Here is my link http://www.dooks.com/pgs/welcome.html
    The css is all there! If you need anything please let me know as I need to get this sorted - I have had serious issues with this site that I have never had before with other sites and am starting to think there is a bug in my software. I redid the index page and this one page (linked above) to see what my problems are - so help with query v appreciated.
    Many thanks,
    Karen

    Lawrence_Cramer wrote:
    A point to keep in mind is that IE8 is still in Beta.
    Not anymore.
    http://www.microsoft.com/Presspass/press/2009/mar09/03-18IE8AvailablePR.mspx
    "REDMOND, Wash. — March 18, 2009 — Today Microsoft Corp. announced the availability of Windows Internet Explorer 8, the new Web browser that offers..."
    Mark A. Boyd
    Keep-On-Learnin' :-)

  • Need help with this book problem...Pig game...can ANYONE help!??

    I need help with the following book problem...could someone write this code for me?? Thanks!!
    First design and implement a class called PairOfDice, composed of two six-sided Die objects. Using the PairOfDice class, design and implement a class to play a game called Pig. In this game, the user competes against the computer. On each turn, the current player rolls a pair of dice and accumulates points. The goal is to reach 100 points before your opponent does. If, on any turn, the player rolls a 1, all points accumulated for that round are forfeited and control of the dice moves to the other player. If the player rolls two 1s in one turn, the player loses all points accumulated thus far in the game and loses control of the dice. The player may voluntarily turn over the dice after each roll. Therefore the player must decide to either roll again (be a pig) and risk losing points, or relinquish control of the dice, possibly allowing the other player to win. Implement the computer player such that it always relinquishes the dice after accumulating 20 or more points in any given round.
    I realize this is a long code, so it would be greatly appreciated to anyone who writes this one for me, or can at least give me any parts of it. I honestly have no clue how to do this because our professor is a dumbass and just expects us to know how to do this...he doesn't teach us this stuff...don't ask. Anyways, thanks for taking the time to read this and I hope someone helps out!! Thank you in advance to anyone who does!!!

    Nasty comments? It's not a matter of not liking you, it's a matter of responding to the
    "I'ts everyone else's fault but mine" attitude of your post.
    If you are genuine, the program is very easy to write, so, your Professor is correct when he said you should
    be able to do it. I'm still very much in the beginner category at java, and it took me only 20 mins to write
    (+5 mins to design it on paper). 2 classes in one file < 100 lines. Most of the regulars here would do it in half the time / half the lines.
    All of the clues are in the description, break them down into their various if / else conditions. Write it down on paper.
    Have a go. Try to achieve something. Post what you've tried, no-one will laugh at you, and you will be
    pleasanty surprised at the level of help you will get when you've "obviously" made some effort.
    Again, have a go. If you don't like problem-solving, then you don't like programming. So, you gotta ask
    yourself - "what am I doin' here?"

Maybe you are looking for

  • Can you have multiple clickboxes on one page

    Sorry... a few complicated things are coming up. I am doing a large project with LOTS of interactivity, which involves simulating a customer filling in a form and then clicking a button to move on. So one one page I have both a Text Entry box, and so

  • Unable to use bean model in a Callable Object

    Hello,   I'm trying to use a bean model in a callable object but at runtime I'm allways getting null pointer exception.   If I test it in a WebDynpro application everything goes right (I only have to add a sharing reference to my EJB Application). Bu

  • Dev 2000/Dev 6.0 for Linux

    When will we se it? I mean surely Developer 2000 or Developer 6.0 must come in a Linux version? We already have a good and stable X interface, and it does exist for Solaris among others, right? What does Oracle have to say about this? /jan null

  • How to call a sql server stored procedure from oracle

    Hi all, Please anybody tell me how to call a sql server stored procedure from oracle. I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has

  • Reg:file adaper

    Dear team, Oracle SOA version:11.1.1.5 We are reading a csv file with 100 records with "Publish messages in Batch " value =10 and archiving the file. So reading a file is generating 10 instances. In each bpel instance we are inserting data (10 record