Need Help with script: CS4 Flash Buttons

I created a 3 button bar using Flash CS4. It will link to three different HTML pages in a website. This is one of the three scripts I have on the first frame of the main timeline, the code is for one of the buttons, the other two are really the same with differing button numbers. This code does now open the page up in a NEW BROWSER window, but I would like the page to open in the existing window and not in a new one. The 3 buttons also have down states identified by a frame label of “hold”, I would like the script to set the hold frame or down state to be displayed when the proper page is loaded in the browser .  Will someone please suggest to me what I need to add to this script to achieve this, your time and effort will be appreciated.
stop();
button1_btn.addEventListener(MouseEvent.CLICK, illus);
function illus(e:MouseEvent):void {
    var targetURL:URLRequest=new URLRequest("illustrator.html");
    navigateToURL(targetURL);

Thank you Todd... How about the code to display the Down stage when displayed,
got any thoughts on this.
Thanks'
Bill

Similar Messages

  • Need help with reviewer CS4

    I am usung the Captivate reviewer to distribute draft modules.
    The problem I am havving is the .LOCK file - when someone goes to review the module, they have to specify the location of a temp file. (the .lock file). When they have finished that module, then they have to either specify a new location for the next module, ot manually delete the lock file.
    Is there a way to disable the comments logging feature, or have the lock file automatically deleted?
    Thanks
    Terry

    Thank you.
    Regards,
    Michael J. Sheehan  allelois
    Date: Mon, 17 Aug 2009 18:48:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need help with Flash CS4 buttons/can't get buttons to control anything
    Hi there
    I'm not sure how you wound up where you did. But you wound up in the Adobe Captivate forums. Please stand by as I move your thread to the Flash forums.
    Cheers... Rick
    >

  • I need help with my shockwave flash it is crashed i need help fixing

    I need help with shockwave flash it is crash i need help fixing it

    http://forums.adobe.com/thread/1195540

  • Hi i need help with my mp3 flash player

    Hi i need help with my mp3 player, i wan't to add pause button..can you help me?
    i created button i added btn_pause and it won't work.
    function soundStatus(){
              var amountLoaded = _root.sound_mc.sound_obj.getBytesLoaded() / _root.sound_mc.sound_obj.getBytesTotal();
              _root.loader.loadBar._width = amountLoaded * 260;
              duration = _root.sound_mc.sound_obj.duration;
              position = _root.sound_mc.sound_obj.position;
              _root.playHead._x = position / duration * 272 + 5;
    btn_play.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              this._parent.sound_mc.songStarter(songfile[song_nr]);
    btn_pause.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              this._parent.sound_mc.sound_obj.pause();
    btn_stop.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              this._parent.sound_mc.sound_obj.stop();
    btn_fw.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              (song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
              _root.sound_mc.songStarter(songfile[song_nr]);
    btn_rev.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              (song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
              _root.sound_mc.songStarter(songfile[song_nr]);
    <moved by mod from as3 - kglad>


    function soundStatus(){
              var amountLoaded = _root.sound_mc.sound_obj.getBytesLoaded() / _root.sound_mc.sound_obj.getBytesTotal();
              _root.loader.loadBar._width = amountLoaded * 260;
              duration = _root.sound_mc.sound_obj.duration;
              position = _root.sound_mc.sound_obj.position;
              _root.playHead._x = position / duration * 272 + 5;
    btn_play.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              this._parent.sound_mc.songStarter(songfile[song_nr]);
    btn_pause.onRelease = function() {
              clearInterval(timeInterval);  // you should re-set this interval when the unpause button is clicked
             // _root.timeDisplay_txt.text = "00:00/00:00";
              this._parent.sound_mc.sound_obj.stop()
    btn_unpause.onRelease=function(){
    this._parent.sound_mc.sound_obj.start(position/1000);
    btn_stop.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              this._parent.sound_mc.sound_obj.stop();
    btn_fw.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              (song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
              _root.sound_mc.songStarter(songfile[song_nr]);
    btn_rev.onRelease = function() {
              clearInterval(timeInterval);
              _root.timeDisplay_txt.text = "00:00/00:00";
              (song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
              _root.sound_mc.songStarter(songfile[song_nr]);

  • MAC OS 10.6.8 Using Safari 5.1 Needing Help With Updating Adobe Flash

    Hello-
    Recently Adobe Flash installed an icon in my System Preferences and when I click the icon there are several tabs.  One allows updates to check automatically.  It says it will install the latest version of Flash without having to remove the previous version, but I have never been told that a newer version is available unless I clcik "check now."  although "Check for updates automatically" is checked, I do not know where it tells me a newer version is available.  Also, there has been 5 "newer versions" available since this icon was installed in System Prefeences, I have only found out about the newer versions when I clicked "Check Now."  If I read that with this new way to install the latest Mac version of Flash does not require me to uninstall the previous version of Flash how do I install the most recent version of Flash?  Does it come in an email?
    Since it is not telling me that there is a more recent version of Flash unless I click "Check Now" should I still do it the way I used to install the latest version of flash?  (The way before this icon was added to System Preferences)?
    I would appreciate help with updating Flash to the most recent version.  I used to uninstall the older version, restart the browser and download the most recent version and install it.  It always worked find but this was before there was an Adobe icon in my system Preferences.

    Hello,
    The way you used to do this (uninstall, restart the browser, etc.) is still definitely valid and probably the "safest" way to get a new version installed.  Uninstalling shouldn't be required, but it definitely doesn't hurt.  If you feel comfortable doing it the old way, please feel free to continue using that process.
    As for notifications, this is a bit trickier, but in general you should be notified within 30 days (or so) after a new player is released.  This usually occurs when the browser loads swf content.  Clicking the button will, like you mention, immediately check.  Another alternative to finding out when a new player is released is to subscribe to our Flash Player Releases feed.
    Is there a way to be automatically notified when a new Flash Runtime release is made?
    Thanks,
    Chris

  • Need Help with scripting for Automator/AppleScript.

    Hi everybody,
    I am building a small app for my mac, What I need is a script that can rename a file that I drop on it.
    and example being:
    example.jpg
    (when I drop it on the app, I want the app to change the filename of the document to "Image.jpg"
    I have tried this with Automator, but it requires that I specify the file to be changed, what I need is something that will change the name of any file I drag onto it.
    I am using it for application specific files.
    Kind regards,
    Pete.
    iBook G4; 60GB Hard Drive, 512MB RAM, Airport Extreme    

    Open the Script Editor in the
    /Applications/AppleScript/ folder and enter the
    following:
    on open(the_file)
    tell application "Finder"
    set name of the_file to "Image"
    end tell
    end open
    Save this script as an application.
    (11347)
    this script compiled correctly; however when run it returned the following error "Can't set name of (the_file) to "Image.jpg"
    I am also given the option of editing the script or just quitting.
    thanks for your help

  • Need help with scripting Jumps

    Hi - hope someone can help me. I'm in over my head. I have a long (4 hrs.) commercial video track separated by dozens of markers (placed earlier in FCP). All my menu buttons work fine, but I want to include a button which serves as an "In-Store" demo loop featuring about 30-45 minutes of highlights (meaning favorite clips) looped endlessly for in-store sales. I can't seem to get the right combination going. New user of DVDSP but not of Mac. I managed to get it to jump to a marker, but so far, every attempt results in the program not recognizing the end of a segment. Struggling with the manual and need an expert to simplify things.

    Hi Hal -
    Just perfect. Thanks very much, Hal. I'd entirely skipped the "Stories" sections of my tutorials and manual automatically assuming (from prior experiences with Flash, SuperCard, etc.,) that scripting would be the solution. (Plus I'm rushing to complete the thing.) The best part is that it this extremely easy to do. If I need to shorten a clip I can just add a separate marker in DVDSP with no apparent down side. Stories are a sweet feature, and I'm sure I'll be using them over and over with each new production.
    So, you've just scored the "Expert" ranking in my book and I'm wondering you'd like to make it a daily double... Here's the next and hopefully last sticking point in my little project: I set up multiple angles in several clips in FCP, which don't seem to display in DVDSP. They might, I just can't tell from the sim. And yes, I'm aware that importing separate tracks and re-compositing them in DVDSP is a way to make angles happen, but I already did all this once, with great care, and I'm wondering how to get the Final Cut angles to change in the simulator in DVDSP. Any experience in these areas?
    Thanks again for the "stories" advice. Right on the money.

  • I need help with installing the flash player!

    I am trying to install the flash player and as the download progresses it asks me to close internet explorer to continue.  I close internet explorer and press the continue button and it repeats the request to close internet explorer.  I have completely closed out of everything except the installing process and it still won't continue the download, it wants me to close out of internet explorer and I have already done that!  Can anyone help me with this???  I am so frustrated.  I am not an advanced computer user, but I have followed all the instructions for this procedure and end up with the same result... close internet explorer.  I would appreciate assistance so much!

    You need to close all iexplore.exe instances; use the Task Manager's Processes tab.

  • Need Help With Script Skipping Word Before Variable

    I borrowed and modified a skip I found here: http://forums.adobe.com/message/4808804 with code borrowed from elsewhere.
    I noticed that it seems to run fine, but it skips any word that appears right before a variable. The point of the script is to find any text using an italic override or bold override, and replace the override with the appropriate character format from the catalog.
    Can someone tell me why the code below skips words before a variable? I am sure it is a simple thing, but I am teaching myself Extendscript, and only recently started the attempt/
    Thanks,
    Marc
    var doc = app.ActiveDoc;
    removeOverrides (doc)
    function removeOverrides (pDoc)
        var vDocStart = pDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
        var vBoldFmt=pDoc.GetNamedCharFmt ('bold')
        var vItalicFmt=pDoc.GetNamedCharFmt ('italic')
        initFA_errno ();
        var vTextLoc = new TextLoc(vDocStart,0);
        var vFindParams=findOverrideParams (pDoc);
        while (FA_errno==Constants.FE_Success)
            var vTextRange=pDoc.Find(vTextLoc,vFindParams);
            if (vTextRange.beg.obj.ObjectValid())
                var vTextItems=pDoc.GetTextForRange (vTextRange, Constants.FTI_CharPropsChange)
                if (vTextItems.length==!0 )
                    $.writeln(vTextItems.String)
                    if (vTextItems[0].idata==Constants.FTF_WEIGHT)
                       pDoc.SetTextProps (vTextRange, vBoldFmt.GetProps())
                    if (vTextItems[0].idata==Constants.FTF_ANGLE)
                       pDoc.SetTextProps (vTextRange, vItalicFmt.GetProps())
                    }// else (Log (vLogFileName, '\nERROR: No items were found in the text format array but format override was found: '+pDoc.Name))
            vTextLoc = vTextRange.end
            vDocStart=vDocStart.NextPgfInFlow;
    function findOverrideParams (pDoc)
        var vFindParams = AllocatePropVals(1);
        vFindParams[0].propIdent.num = Constants.FS_FindObject;
        vFindParams[0].propVal.valType = Constants.FT_Integer;
        vFindParams[0].propVal.ival = Constants.FV_FindCharacterFormatOverride;
       return vFindParams;
      function initFA_errno()
             app.GetNamedMenu("!MakerMainMenu"); //If this fails, you've got bigger problems
             return;

    It looks like home assignment. Home assignment are not very welcome here. I can help you only a little. It's very simple application, but if you dont know basics in OO, you are in trouble.
    Create these three files, even empty with all points you need to accomplish in them as comments.
    Think about gui you need. If you do not know how to make menus and other fancy gui you can do only with one main panel with a few buttons and JOptionPanes appearing for every input.
    Buttons for each task:
    1. get available rooms; press and see JOptionPane telling what rooms are empty (information message)
    2. book: JOptionPane asking how many guests, you input, it checks for availability, if available rooms are not enough (or beds) another OP tells that it's impossible, if enough - offer to input room number, you input, check if the room is booked, then offer to input name, then offer quit.
    3. unbook.
    4.get report
    Once you design how it looks, every step becomes very simple. All methods you need to implement are simple array manipulations. Make report last, because it's just collection of printouts from methods you've already done.
    In book, you need to look for definitions of constructor, passing arguments to methods, returning results from methods, creating object with "new" operator, simple event handling, JOptionPane documentation and examples, which are in every decent textbook.
    Do not panic, it's really simple but rather tiresome application, if you do it by yourself you learn almost everything necessary to start programming in java.

  • Need help with php and flash

    Hi,
    hopefully anyone can help me out here I am working on a site
    that has part flash and html in it. I am using php to dynamically
    pull in the flash files from an includes folder. In doing so I have
    uploaded everything to our preview server where I tested the site.
    It works in firefox but not in the ie browsers, I thought this had
    to do with active control, so I downloaded the extension but
    nothing happened, still it works in firefox and not ie either 6 or
    7. t
    click
    here to view the site I am working on. If you have suggestions
    please let me know. I have attached the code as well for one of the
    flash animations.
    Thanks

    Looking at the source of your page, I note that you missed a
    couple lines in the AC_FL_RunActiveContent embed. These 2 lines go
    in the head of the page.
    <script language="javascript"> AC_FL_RunContent = 0;
    </script>
    <script src="AC_RunActiveContent.js"
    language="javascript"></script>

  • Need help with script

    There is request to dump every day’s data from one table into text file. I need to write shell script and sql script for that
    There are two tables (INSPECTION_RESULTS and NJAS) under NJSHDOWN schema. The table NJAS is child table of INSPECTION_RESULTS. The key is RES_SYS_NO. The script should get the MIN and MAX RES_SYS_NO from INSPECTION_RESULTS table for yesterday’s date. Then use these RES_SYS_NOs to fetch data from NJAS table. I then need to create comma delimited file for following columns. Also, to add the logic in shell script to check for oracle error (ORA-). If there is error, it should send email to DBAs group(first test it with your email address).
    Following columns are needed from NJAS table.
    NJA_RES_SYS_NO
    NJA_TEST_REC_NO
    NJA_LIC_ST_ID
    NJA_ETS_ID
    NJA_SW_VER
    NJA_TECH_ID
    NJA_VIN
    NJA_LIC_NO
    NJA_LIC_JUR
    NJA_LIC_SRC
    NJA_MODEL_YR
    NJA_MAKE
    NJA_MODEL
    NJA_VHCL_TYPE
    NJA_BODY_STYLE
    NJA_CERT_CLASS
    NJA_GVWR
    Okay- here is the script that I have so far but now, I am stuck. I cannot figure out how to get my script to finish output to comma delimited file and to check for oracle errors. Can anyone help me out here? Thanks!
    Initial script:
    SELECT NJA_RES_SYS_NO, NJA_RES_SYS_NO, NJA_TEST_REC_NO,
    NJA_LIC_ST_ID,
    NJA_ETS_ID,
    NJA_SW_VER,
    NJA_TECH_ID,
    NJA_VIN,
    NJA_LIC_NO,
    NJA_LIC_JUR,
    NJA_LIC_SRC,
    NJA_MODEL_YR,
    NJA_MAKE,
    NJA_MODEL,
    NJA_VHCL_TYPE,
    NJA_BODY_STYLE,
    NJA_CERT_CLASS,
    NJA_GVWR,
    NJA_ASM_ETW,
    NJA_ETW_SRC,
    NJA_NO_OF_CYL,
    NJA_ENG_SIZE,
    NJA_TRANS_TYPE,
    NJA_DUAL_EXH,
    NJA_FUEL_CD,
    NJA_VID_SYS_NO,
    NJA_VRT_REC_NO,
    NJA_ARMSTDS_REC_NO,
    NJA_RSN_F_N_TESTABLE,
    NJA_DYNO_TESTABLE,
    NJA_CURR_ODO_RDNG,
    NJA_PREV_ODO_RDNG,
    NJA_PREV_TEST_DT,
    NJA_TEST_TYPE,
    NJA_TEST_START_DT,
    NJA_TEST_END_TIME,
    NJA_EMISS_TEST_TYPE,
    NJA_TEST_SEQ_NO,
    NJA_LOW_MILE_EXEMP,
    NJA_TIRE_DRY,
    NJA_REL_HUMID,
    NJA_AMB_TEMP,
    NJA_BAR_PRESS,
    NJA_HCF,
    NJA_GAS_CAP_ADAP_AVL,
    NJA_GAS_CAP_REPL,
    NJA_OVERALL_GAS_CAP_RES
    FROM NJAS
    WHERE NJA_RES_SYS_NO IN (SELECT MIN(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS WHERE NJA_RES_SYS_NO IN
    (SELECT MAX(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS WHERE SYSDATE=SYSDATE-1)
    Thanks!
    Scott

    Thanks here is thus far what I have, focusing on the sql script part which is the trickiest:
    -- writedate.sql script for njas
    SELECT NJA_RES_SYS_NO||','||NJA_TEST_REC_NO||','||NJA_LIC_ST_ID||','||NJA_ETS_ID||','||NJA_SW_VER||','||NJA_TECH_ID||','||NJA_VIN||','||NJA_LIC_NO||','
    ||NJA_LIC_JUR||','||NJA_LIC_SRC||','||NJA_MODEL_YR||','||NJA_MAKE||','||NJA_MODEL||','||NJA_VHCL_TYPE||','||NJA_BODY_STYLE||','||NJA_CERT_CLASS||','||
    NJA_GVWR||','||NJA_ASM_ETW||','||NJA_ETW_SRC||','||NJA_NO_OF_CYL||','||NJA_ENG_SIZE||','||NJA_TRANS_TYPE||','||NJA_DUAL_EXH||','||NJA_FUEL_CD||','
    || NJA_VID_SYS_NO||','|| NJA_VRT_REC_NO||','|| NJA_ARMSTDS_REC_NO||','|| NJA_RSN_F_N_TESTABLE||','|| NJA_DYNO_TESTABLE||','||
    NJA_CURR_ODO_RDNG||','|| NJA_PREV_ODO_RDNG||','|| NJA_PREV_TEST_DT||','|| NJA_TEST_TYPE||','||
    NJA_TEST_START_DT||','|| NJA_TEST_END_TIME||','|| NJA_EMISS_TEST_TYPE||','|| NJA_TEST_SEQ_NO||','
    ||NJA_LOW_MILE_EXEMP||','||NJA_TIRE_DRY||','|| NJA_REL_HUMID||','|| NJA_AMB_TEMP||','||NJA_BAR_PRESS||','|| NJA_HCF||','||
    NJA_GAS_CAP_ADAP_AVL||','|| NJA_GAS_CAP_REPL||','|| NJA_OVERALL_GAS_CAP_RES
    FROM NJAS
    WHERE NJA_RES_SYS_NO IN (SELECT MIN(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS WHERE NJA_RES_SYS_NO IN
    (SELECT MAX(NJA_RES_SYS_NO) FROM INSPECTION_RESULTS, (SELECT SYSDATE-1 FROM DUAL))
    =====================
    Output thus far:
    ======================
    NJA_RES_SYS_NO||','||NJA_TEST_REC_NO||','||NJA_LIC_ST_ID||','||NJA_ETS_ID||','||
    4,,04-MAR-03,R,27-MAR-03,27-MAR-03,O,,N,,,,,,,,Z
    10871630,5274,CIF000025,CL002901,4.13,INL004025,1B7GL22X7WS569744,VK765K,NJ,B,19
    98,DODGE,DAKOTA,T,3,TIER0,5200,3750,M,06,3.9,A,N,GASO,1446865,14663,3019,,Y,4654
    5,,21-MAR-03,I,21-MAR-03,21-MAR-03,O,,N,,,,,,N,N,P
    How do I strip the comments from the output file? Also not sure if my subquery is performing the output correctly. Thanks.
    Scott

  • Need help with java browser "Back" button

    All:
    I'm trying to make the "Back" button in my Java web browser work. Any help would be greatly appreciated. Here is my code:
    import javax.swing.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.io.*;
    import javax.swing.text.html.*;
    import javax.swing.text.*;
    public class Browser implements HyperlinkListener, ActionListener
    String source = "http://www.google.com";
    final String GO = "Go";
    final String Back = "Back";
    JEditorPane ep = new JEditorPane(); //a JEditorPane allows display of HTML & RTF
    JToolBar tb = new JToolBar(); //a JToolBar sits above the JEditorPane & contains
    JTextField tf = new JTextField(40); // the JTextField & go button
    JLabel address = new JLabel(" Address: ");
    JButton back = new JButton(Back);
    JButton go = new JButton(GO);
    BorderLayout bl = new BorderLayout();
    JPanel panel = new JPanel(bl);
    JFrame frame = new JFrame("Billy Wolfe's Browser");
    protected Vector history;
    public Browser()
    openURL(source); //this method (defined below) opens a page with address source
    ep.setEditable(false); //this makes the HTML viewable only in teh JEditorPane, ep
    ep.addHyperlinkListener(this); //this adds a listener for clicking on links
    JScrollPane scroll = new JScrollPane(ep); //this puts the ep inside a scroll pane
    panel.add(scroll,BorderLayout.CENTER); //adds the scroll pane to center of panel
    tf.setActionCommand(GO); //gives the ActionListener on tf a name for its ActionEvent
    tf.setActionCommand(Back);
    tf.addActionListener(this); //adds an ActionListener to the JTextField (so user can
    go.addActionListener(this); //use "Enter Key")
    tb.add(back); //this adds the back button to the JToolBar
    tb.add(address); //this adds the Label "Address:" to the JToolBar
    tb.add(tf); //this adds the JTextField to the JToolBar
    tb.add(go); //this adds the go button to the JToolBar
    panel.add(tb,BorderLayout.NORTH); //adds the JToolBar to the top (North) of panel
    frame.setContentPane(panel);
    frame.setSize(1000,900);
    frame.setVisible(true);
    }// end Browser()
    public void openURL(String urlString)
    String start = urlString.substring(0,4);
    if(!start.equals("http")) //adds "http://" to the URL if needed
    urlString = "http://"+urlString;
    }//end if
    try
    URL url = new URL(urlString);
    ep.setPage(url); //this sets the ep page to the URL page
    tf.setText(urlString); //this sets the JTextField, tf, to the URL
    catch (Exception e)
    { System.out.println("Can't open "+source+" "+e);
    }//end try-catch
    }//end openURL
    public void hyperlinkUpdate(HyperlinkEvent he) //this allows linking
    HyperlinkEvent.EventType type = he.getEventType();
    if(type == HyperlinkEvent.EventType.ACTIVATED)
    openURL(he.getURL().toExternalForm());
    history.add(he.getURL().toExternalForm());
    }//end hyperlinkUpdate()
    public void actionPerformed(ActionEvent ae) //for the GO and BACK buttons
    String command = ae.getActionCommand();
    if(command.equals(GO))
    openURL(tf.getText());
    history.add(tf.getText());
    //JOptionPane.showMessageDialog(null, "This is a test");
    if(command.equals(Back))
    try
    String lastURL = (String)history.lastElement();
    history.removeElement(lastURL);
    lastURL = (String)history.lastElement();
    // JOptionPane.showMessageDialog(null, lastURL);
    ep.setPage(lastURL);
    if (history.size() == 1)
    back.setEnabled(false);
    catch (Exception e)
    System.out.println("ERROR: Trouble fetching URL");}
    }//end actionPerformed()
    }// end Browser class

    Here it is. I need to be able to click the Back button and view the previous URL.
    import javax.swing.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.io.*;
    import javax.swing.text.html.*;
    import javax.swing.text.*;
    public class Browser implements HyperlinkListener, ActionListener
    String source = "http://www.google.com";
    final String GO = "Go";
    final String Back = "Back";
    JEditorPane ep = new JEditorPane(); //a JEditorPane allows display of HTML & RTF
    JToolBar tb = new JToolBar(); //a JToolBar sits above the JEditorPane & contains
    JTextField tf = new JTextField(40); // the JTextField & go button
    JLabel address = new JLabel(" Address: ");
    JButton back = new JButton(Back);
    JButton go = new JButton(GO);
    BorderLayout bl = new BorderLayout();
    JPanel panel = new JPanel(bl);
    JFrame frame = new JFrame("Billy Wolfe's Browser");
    protected Vector history;
    public Browser()
    openURL(source); //this method (defined below) opens a page with address source
    ep.setEditable(false); //this makes the HTML viewable only in teh JEditorPane, ep
    ep.addHyperlinkListener(this); //this adds a listener for clicking on links
    JScrollPane scroll = new JScrollPane(ep); //this puts the ep inside a scroll pane
    panel.add(scroll,BorderLayout.CENTER); //adds the scroll pane to center of panel
    tf.setActionCommand(GO); //gives the ActionListener on tf a name for its ActionEvent
    tf.setActionCommand(Back);
    tf.addActionListener(this); //adds an ActionListener to the JTextField (so user can
    go.addActionListener(this); //use "Enter Key")
    tb.add(back); //this adds the back button to the JToolBar
    tb.add(address); //this adds the Label "Address:" to the JToolBar
    tb.add(tf); //this adds the JTextField to the JToolBar
    tb.add(go); //this adds the go button to the JToolBar
    panel.add(tb,BorderLayout.NORTH); //adds the JToolBar to the top (North) of panel
    frame.setContentPane(panel);
    frame.setSize(1000,900);
    frame.setVisible(true);
    }// end Browser()
    public void openURL(String urlString)
    String start = urlString.substring(0,4);
    if(!start.equals("http")) //adds "http://" to the URL if needed
    urlString = "http://"+urlString;
    }//end if
    try
    URL url = new URL(urlString);
    ep.setPage(url); //this sets the ep page to the URL page
    tf.setText(urlString); //this sets the JTextField, tf, to the URL
    catch (Exception e)
    { System.out.println("Can't open "+source+" "+e);
    }//end try-catch
    }//end openURL
    public void hyperlinkUpdate(HyperlinkEvent he) //this allows linking
    HyperlinkEvent.EventType type = he.getEventType();
    if(type == HyperlinkEvent.EventType.ACTIVATED)
    openURL(he.getURL().toExternalForm());
    history.add(he.getURL().toExternalForm());
    }//end hyperlinkUpdate()
    public void actionPerformed(ActionEvent ae) //for the GO and BACK buttons
    String command = ae.getActionCommand();
    if(command.equals(GO))
    openURL(tf.getText());
    history.add(tf.getText());
    //JOptionPane.showMessageDialog(null, "This is a test");
    if(command.equals(Back))
    try
    String lastURL = (String)history.lastElement();
    history.removeElement(lastURL);
    lastURL = (String)history.lastElement();
    // JOptionPane.showMessageDialog(null, lastURL);
    ep.setPage(lastURL);
    if (history.size() == 1)
    back.setEnabled(false);
    catch (Exception e)
    System.out.println("ERROR: Trouble fetching URL");}
    }//end actionPerformed()
    }// end Browser class

  • Need help with andriod system -flash player.

    Am using an andriod tablet ZTE with vrsion 4.0 plus as per manufacturer info pamphlet. I have tried to install/ download flash player for this tablet and no luck at all. Can Adobe AIR  work well enough to view content on training video presentations even when it says that I need a flash player. I am new to this computer and android stuff and have no luck with help from my teenage kids either. Any info , assistance and guides is super greatly appreciated . Any direct answers can be sent to [email protected] or leave message here and I will check again in the mornings . Thanks for any feedback. Cheers and best regards rickyrem51.

    There is no Flash Player for Android anymore, and there won't be another. Android (Google) recommends using a "serverside" browser if you need to view Flash content with an Android device. The recommend "Dolphin" or "Puffin". BOTH are free in the GooglePlay Store.

  • Need help with making website flash banner/header

    Can you loop in flash catalyst? I am new to catalyst and flash pro, so I am sorry if this is simple...
    I have designed 3 art boards in Photoshop and imported them into flash catalyst. I would like to have the art boards show for about 4 to 5 sec and then transition to the next slide or art board, I need this to happen automatically. Also there are buttons on each slide to redirect to any single art board. Example button 1, 2, 3.
    I have already made the links, but I do not know how to set up the art boards to start looping on load of web page. I have seen this done on many websites, am I using the right program? I have both which one should I use? Can anyone recommend an easy tutorial that will show me step by step how to make my art boards transition? Can anyone help?
    Thank you. Teresa

    You might nose around in the Flash Catalyst forums:
    http://forums.adobe.com/thread/587302
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Need Help With Bootcamp On Flash Drive!!!!!!!!!!!(^_^)

    Hello today users, I'm getting a MacBook Pro 15'' with Retina Display.But One thing that I have to downlode to play my few pc games such as batman and
    mmorg games not to many though.I think the 15'' will do jsut fine with her and plus had added clear display.The person's on the web says I need to downlode
    this software bootcamp for that,Now this is gonna be my first time switcing over to Mac os so I need some clear help about it.I wonder know can i like buy a
    flash drive and put bootcamp on it caused I dont not really want it on my computer i want just able to boot of the usb flash drive and when done take it out.I can't
    find any videos on youtube so does anyone knows how to do it or has a video will they like to show me please!!!! Thankyou.

    So now one saying yes and saying know ok break this down to me on said I cant not put windows bootcamp on flash drive and the othe rone saying yes you can but my deal is that the person who said I could that means I could put bootcamp on my flash drive for my Macbook Pro retina display so i jsut can hook it in and hook it back out with windows on it ok I dont not want windows to stay on my macbook pro retina display so i jsut put it on flash drive so when I want to playmy fansty game i could jsut hook it  up and when hock it out no windows on my mac thats how i wanted so i asking the person who said yes can i do that?

Maybe you are looking for

  • How to create a value sets for concurrent program?

    Hi Friends, I am creating a concurrent program with a parameter period... In the value set for the parameter period, I am using the following query : ---where application_id = 101 and set_of_books_id = :$PROFILES$.gl_set_of_bks_id and closing_status

  • OS X 10.8.3 Hibernate unwanted session closing

    I have a quite fresh install of 10.8.3 (not an upgrade - I reinstalled from scratch), and I have noticed that each time I wake up my MBP (13" early 2011) from hibernation, all applications have been closed (if applicable), or I can see warning popups

  • What is "Yiu" and how can I get rid of it?

    What the heck is "Yiu" (always pops up when I mistype "you") and is there any way to permanently remove it from the iPhone dictionary? It's really silly that it's there; I'd say 999,999 times out of 1,000,000 someone is trying to type "you". C'mon.

  • How can i call from ipod?

    I have 3rd generation iPod. Now I am thinking to buy a new iPod Touch. How can I make a call using Facetime - it's only iPod?

  • Order management queries

    Hi all, Can we restrict inventory organization to responsibilities ? what profile option need to be set? Can we have one operating unit with two different item master organizations? Can we restrict(hide from other inv orgs in same O U) Purchase Order