A better way to cut threading between paragraphs

I would like to see a better, easier way to 'sever' the linked threads of text between flowed text frames.
for example: I have one story that is 'threaded' through four frames. I want to have each of the four frames be the same text, but not threaded. For example, if I cut the thread between frame one and frame two, the text that was in frame two will flow into frame three.
What I would like to see is this: with show frames and show threads visible, I would like to be able to take the scissors tool and "cut" the thread. I think that such a command could be enhanced with a key combination, like "with alt-key" would flow the next frame, and without would leave all frames unchanged, just not threaded.
Thanks

We create meta data - cubes, measures and meta dimensions from AWM model view, and then Bi Beans presentations using those measures.

Similar Messages

  • Best way to get internet between two buildings???

    Hello all! I have some questions about a possible setup I am thinking of running.
    I have building that has internet coming into it. 15yds away, I have another building (which is brick) that has no internet options. I was thinking about buying two Airport Extreme's, making one the base and using the other one in the other building the access point for WDS. Then buy a couple of the Airport Expresses to push the signal throughout that building.
    Thoughts on this? Is there a better way to get internet between two buildings (without running cables) and then push it through out that building?
    I am open to any an all suggestions.
    Thanks,
    Grant

    Welcome to the discussions!
    Ethernet is always the best choice for signal strength and reliability. If you do not want to run ethernet cable to the second building, your options are down to ethernet powerline adapters and wireless.
    The ethernet powerline adapters work by transmitting the ethernet signal over the AC power line. The difficulty here may be that the other building is on a different electrical circuit, so it may or may not work depending on how the electrical wiring is configured. An electrician could run tests to see if this would work.
    The least reliable option is wireless. To have the best chance of working well, the "sending" and "receiving" routers need to be able to "see" each other through a window or other opening. Be sure to test with a laptop in the second location to see if you will have a strong enough signal to work with before you go this route.

  • Is there a better way to stop a Method than Thread.stop()?

    First my basic problem. In one of my programs I am using constraint solver. I call the constraint solver with a set of constraints and it returns a Map with a satisfying assignment. In most cases this works in acceptable time ( less than 1 second). But in some cases it may take hours. Currently I am running the function in a Thread and using Thread.stop(). This look like that:
         public Map<String, Object> getConcreteModel(
                   Collection<Constraint> constraints) {
              WorkingThread t=new WorkingThread(constraints);
              t.setName("WorkingThread");
              t.start();
              try {
                   t.join(Configuration.MAX_TIME);
              } catch (InterruptedException e) {
              if(t.isAlive()){
                   t.stop();
              return t.getSolution();
         }where t.getSolution(); returns null if the Thread was interrupted.
    Unfortunately this sometimes crashes the JVM with:
    # A fatal error has been detected by the Java Runtime Environment:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006dbeb527, pid=5788, tid=4188
    # JRE version: 6.0_18-b07
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )
    # Problematic frame:
    # V  [jvm.dll+0x3fb527]
    # An error report file with more information is saved as:
    # F:\Eigene Dateien\Masterarbeit\workspace\JPF-Listener-Test\hs_err_pid5788.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    #Does anyone knows a better way to do it?
    Thank you in advance.
    Note 1: the Constraint solver is a Third Party tool and changing it is unfeasible. (I have tried it already)
    Note 2: Using Thread.stop(Throwable t) only chances the error message.

    In case somebody have the same problem here my code which solves the problem. Note it requires to parameters and the result to be serializable.
    The Class which starts to Process:
    public class Solver{
         public Map<String, Object> getConcreteModel(
                   Collection<Constraint> constraints) {
                   try
                        Process p=Runtime.getRuntime().exec(...); //do not forget the classpath
                        new TimeOut(Configuration.MAX_TIME, p).start();
                        ObjectOutputStream out=new ObjectOutputStream(p.getOutputStream());
                        new ErrReader(p.getErrorStream()).start();//not that std.err fills up the pipe
                        out.writeObject(constraints);
                        out.flush();
                        ObjectInputStream in=new ObjectInputStream(p.getInputStream());
                        return (Map<String, Object>) in.readObject();
                   catch(IOException e)
                        return null;
                   } catch (ClassNotFoundException e) {
                        //should not happen
                        return null;
         // For running in a own process
         static private class TimeOut extends Thread
              private int time;
              private Process p;
              public TimeOut(int time, Process p)
                   this.time=time;
                   this.p=p;
              @Override
              public void run() {
                   synchronized (this) {
                        try {
                             this.wait(time);
                        } catch (InterruptedException e) {
                   p.destroy();
         static class ErrReader extends Thread
             InputStream is;
             ErrReader(InputStream is)
                 this.is = is;
                 this.setDaemon(true);
             public void run()
                 try
                     InputStreamReader isr = new InputStreamReader(is);
                     BufferedReader br = new BufferedReader(isr);
                     String line=null;
                     while ( (line = br.readLine()) != null)
                         System.err.println(line);   
                     } catch (IOException ioe)
                         ioe.printStackTrace(); 
    }And the class which executet the Program
    public class SolverProcess {
          * @param args ignored
         public static void main(String[] args){
              try {
                   ObjectInputStream in =new ObjectInputStream(System.in);
                   SolverProcess p=new SolverProcess();
                   p.constraints=(Collection<Constraint>) in.readObject();
                   p.compute();
                   ObjectOutputStream out=new ObjectOutputStream(System.out);
                   out.writeObject(p.solution);
                   out.flush();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              //System.err.println("solved");
              System.exit(0);
         private Map<String, Object> solution=null;
         private Collection<Constraint> constraints;
           private void compute()
    }

  • What is better way for creating a thread? Why?

    A thread can be create in two way, extending Thread class or implimenting Runnable.
    What is better way for creating a thread? Why?

    Implementing Runnable
    See FAQ #1 here [http://forum.java.sun.com/ann.jspa?annID=9]

  • A better way to Double Click

    I have been wondering if there is a better way to detect single clicks Vs double clikcs than the model currently implemented. I am sure all of you have run into the problem of even though an event listener detects a double click eventually, it detects the single click first, so often you have to compromise the quality of your software to account for that. I have considered writing my own custom handler using threads and such, but it seems to me there must be a better way out there that I just have not been able to find. I need a way to detect double clicks, and fool the machine into believing no single click has occured. Must I re-invent the wheel?
    AC

    I agree that GUIs should have some uniformity to
    them..especially as we enter an age where computers
    are ubiquitous. But there are some situations where
    customized behavior is preferrable. If you have ever
    worked with movie special effects software, some art
    software, music software, especially, you know that to
    make a GUI intuitive, sometimes liberties must be
    taken with the 'standard' gui design.The application determines the standard not the OS nor the GUI.
    And to say 'Your code is not standard, therefore the
    fact that java cannont accurately distinguish between
    single and double clicks is your problem' smacks of
    nonsense to me.
    We all know that Java is a great
    language.Java is not just a language it is a platform and a philosophy.
    It is quicker and easier to program in,
    than c++, but it is not at full maturity. Every c++
    development environment I have ever used had the
    ability built in to distinguish between a true single
    click and a double click.As does Swing..
    I love Java, but most
    programmers could fill a page with the enhancements
    that it needs. Not all enhancements are practical.
    Like many I balked when I first started with Java at
    the fact that it did not have true multiple
    inheritence. I now realize that
    I never really needed it anyway. But some things, eg
    templates, I definitely could still use. That being,
    said, thanks for the dialog. Templates are a complicated horror, unless you really need your software to be truly adaptable you will never use them. Even MS, Sun and IBM disposed of that need a long time ago.

  • What is the best way to share calendars between Macs?

    I have two macintosh computers in my house and I use one as the master for our family calendar in ical. I want both calendars in sync, with the second mac as the "copy"-no new data is added here.
    My current method of "sharing" was to publish the files up to our web-server (not apple's) and then subscribe from computer #2 pointing to that web-server.
    Calendar-Publish-choose private server-and fill in the blanks-click-OK.
    When my mac updated to 10.5.4, this method broke. I can no longer publish the files using ical, but I now have to FTP the files up to the web-server. This is a couple of extra steps that is becoming a headache.
    File-Export (about 8 calendar files); open a terminal window; FTP the files up. Go to the other mac and Calendar-refresh all.
    Is there a better way to share ical files between two macs in the same house without FTP-ing? Or is Apple going to fix this problem?

    I set up ical synching through a google calendar and it works well. The benefit here is that you can see your calendar from a web browser when away from the house.
    Info in this thread: http://discussions.apple.com/thread.jspa?messageID=7772872&#7772872
    iCal should have a "share" option like itunes libraries for lans though. Odd that it doesn't.

  • The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?

    I have recently switched from a PC to a MacBook Pro.
    I have a large number of documents and photographs on a multiterrabite external drive, backed up on a second multiterrabite external drive.
    Both external drives are formatted for MacIntosh. This has been verified by agents at an Apple store and also at Best Buy in two different cities.
    This is the problem:
    The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?
    Also, the MacBook Pro will not allow me to rename multiple documents or photographs. I can click-and-rename a single one, but this is impossibly time consuming. I can batch-rename in iPhoto, but when I transfer the photographs to the external drive, the rename does not transfer.
    I’m reduced to using my wife’s Toshiba to cut-and-past, rename, and transfer documents. It works perfectly. Is there any way to do this on the MacBook Pro?
    Thanks!
    Roderick Guerry
    [email protected]

    Roderick Guerry wrote:
    The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?
    No, this is a philosophical difference between Apple and Microsoft. Apple believes that it's dangerous to cut a file in case the user never pastes it; in that case the file is lost. Microsoft seems to not have this problem (if I remember Windows correctly) because they don't delete the originating file if it's cut but never pasted.
    Even though Macs have a lot of keyboard shortcuts, philosophically Macs have traditionally been mouse-first. This applies to file copy operations. In your case, what a Mac user would do is open the source window, open the destination window (on your second drive), and then Command-drag the selected files from the source to destination window. This is because a normal drag would leave the originals behind, while adding the Command modifier key tells OS X that this is a Move, not a Copy, so don't leave the originals behind.
    (In addition there are different rules for drag-copying within the same volume or between different volumes. If you drag between two folders on the same volume, the files are moved. If you drag between different volumes, the files are copied unless you hold down Command to delete the copies on the source volume.)
    Roderick Guerry wrote:
    Also, the MacBook Pro will not allow me to rename multiple documents or photographs. I can click-and-rename a single one, but this is impossibly time consuming. I can batch-rename in iPhoto, but when I transfer the photographs to the external drive, the rename does not transfer.
    Two problems in this case. First, batch file renaming is not built into OS X unless you build something with Automator. However, there are many utilities that can do batch file renaming which you can find at macupdate.com or on the App Store. Since I work with media I often batch rename using one of the media managers I have lying around like Media Pro or Adobe Bridge (comes with Photoshop).
    iPhoto is a database front end designed to shield the file system from the consumer and let them concentrate on creativity and sharing. As such it is often a poor choice for managing files directly. When you "transferred the photographs" chances are you moved the originals, not the ones iPhoto edited which are stored in a hidden folder.
    Roderick Guerry wrote:
    I’m reduced to using my wife’s Toshiba to cut-and-past, rename, and transfer documents. It works perfectly. Is there any way to do this on the MacBook Pro?
    There will not be a way to do it exactly like Windows. As described above, there are ways to do it "the Mac way." If it is possible to remove judgment on which way is "better" you might find the Mac way to be acceptable, but of course sometimes we simply prefer what we're used to.

  • Should I have spaces between paragraphs or paragraph indents?

       I am creating a pdf interactive document/ebook, and am wondering whether to use a space between paragraphs or use indents. Is there a standard?

    dopfel wrote:
    Scott Falkner wrote:
    It is entirely up to you. Use one or the other, but not both. If you are using paragraph Styles it is easy to make a global change and see which reads better. Generally, I prefer spaces to indents. The space should be either one line of lead (i.e. equal to the paragraph’s leading value) or half a line of lead if one full line looks to large.
    My reply is in reference to the above quote regarding how to make a
    global change so that all of the paragraphs in the document have spaces between them w/o having to select each and every paragraph and applying the 'paragraphspacing' style.
    How do I go about this ?
    Format a paragraph as you want all similar paragraphs  to look. Now go to the Paragraph Styles panel and create a new Style. Right-click on the new style to edit the style and give it an intuitive name. Now you can format any text the same way by first selecting the text, then clicking on the style in the Paragraph Styles panel. If you later want to change all of the paragraphs using that style, just right-click on the style and change any attributes to globally change all paragraphs in the document using that style.
    secondary:  not certain the below applies to my question regarding spaces between paragraphs and changing them globally.
    i have also found and wondered about using the setting for the 'align to grid' where default is none and options are
    'all lines'  or 'first line only'.  Does this apply in any way to a regular layout of a 'novel'  ?
    i do not know what this refers to.
    The space should be either one line of lead (i.e. equal to the paragraph’s leading value) or half a line of lead if one full line looks to large.
    thanks again.
    Leading is the term for the space from the baseline of one line of text to the baseline of the next line within a paragraph. The default is “Auto”, which is 120% of the point size. For 12 point text, Auto equals 14.4 point leading. First: Don’t use Auto leading. Change the leading of your style to a number. About 120% is as good a place to start as any, but it depends on the typeface. You may decide to use 11 point text on 14 point leading.
    Because you will have columnd of text next to each other on the page, or pages of text neext to each other on a two-page spread, you want to make sure your text lines up neatly in columns or pages (although for pages it is less critical). The easiest way to do this is to use paragraph spacing equal to your leading, i.e. 14 points. This way, no matter how many paragraphs (and thus, blank lines between paragraphs) you have, the text will always have a heigh that is multiples of 14 points, so bottom baselines will always line up.
    You may decide that looks like too much space, and want to use a lower value. The next best value is half the leading, or 7 points. That way, about half of the time your columns or pages will line up and the bottom baselines will sync.
    Once again, it is ultimately up to you how you want the text to look and how you want your pages or column to look next to each other. If 14 (or whatever your leading is) looks too small or 7 (or whatever half the leading is) looks too big, then go with what looks best. Always try to keep an eye on the big picture, though. Don’t just look at one line of text, look at the entire paragraph. Don’t just look at one paragraph, look at the column. Don’t just look at one column, look at the page. Don’t just look at one page, look at the spread. And always keep the reader in mind. You are designing the document for the reader, not for yourself.

  • A better way to poll

    When my Start button is clicked it changes a member variable from false to true.
    Here is a simplified version of my code:
    public class gdvdhomevideo
       private boolean blnBegin;
       public static void main(String[] args)
          while(blnBegin == false){}
          //perform operations
       public void actionPerformed(ActionEvent e)
          String command = e.getActionCommand();
          if(command.equals("Start"))
             blnBegin = true;
    }So when the user clicks start it exits the while loop and the program starts performing other functions. The problem is that this approach is 100% CPU intensive and I know that there must be a better way?

    1) Code executed in the main() is NOT running on the event thread. Don't do any GUI code from the main thread... You know, stuff like showing windows, attaching event listeners etc.. You need to wrap all that stuff in a Runnable and pass that Runnable to SwingUtilities.invokeLater().
    2) Assuming the stuff you're doing in the main() is actually thread safe and doesn't touch the GUI, you can simply startup a new Thread and put your code in there. (see below)
    3) You class name is named badly. Please check out sun's java coding conventions. It is very nice to have coding conventions. Use them! ;-)
    4) if you want to setup your program as a loop rather than simply relying on user actions to fire events, then I'd suggest you use a timer that notifies on the event thread every X where X is a non-zero polling interval. I think there's a class is called SwingTimer that does this sort of thing for you.
    What you're attempting to do is non-trivial.. so.. ummm.. have fun..
    public class gdvdhomevideo
       private boolean blnBegin;
       public static void main(String[] args) throws Exception
            SwingUtilities.invokeLater( new Runnable() {
                  public void run() {
                       //setup stuff in here.
       public void actionPerformed(ActionEvent e)
          String command = e.getActionCommand();
          if(command.equals("Start"))
             new Thread(new Runnable() {
                public void run() {
                     //perform operations but don't touch the GUI.
              }.start();
    }

  • A better way to do this ?

    where does the sql stuff excute in the following stored procedure, directly in the database or it goes through the oracle VM first ?
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "CustomExport" AS
    import javax.sql.Connection;
    import oracle.jdbc.OracleDriver;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class CustomExport
    public void do() throws SQLException{
    OracleDriver oracle = new OracleDriver();
    DriverManager.registerDriver(oracle);
    Connection conn = oracle.defaultConnection();
    PreparedStatement st = conn.prepareStatement("select from table where col=?");
    st.setString(1,"value");
    ResultSet rs = st.execute();
    and is there a better way to read and parse an xml document with PL/SQL.what i've read about is the ability to parse an XML file to load its data directly into a database table.What i was looking for was just a way to parse XML without having to load any data into tables so i did it with java.
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "CustomParser" AS
    import javax.xml.prasers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    public class CustomParser
    private static CustomParseHandler handler = new CustomParseHandler();
    public static void parseXMLFile(String fileName) throws FileNotFoundException,IOException,SAXException
    SAXParserFactory saxFactory = SAXParserFactory.newInstance();
    SAXParser parser=saxFactory.newSAXParser();
    parser.parse(new FileInputStream(fileName)),handler);
    private class CustomParseHandler extends DefaultHandler{
    StringBuffer buff;
    public CustomParseHandler()
    this.buff = new StringBuffer();
    public void startElement (String uri, String localName,
    String qName, Attributes attributes)
    throws SAXException
    buff.append("<").append(qName).append(">");
    public void endElement (String uri, String localName, String qName)
    throws SAXException
    buff.append("</").append(qName).append(">").append(newLine);
    public void characters (char ch[], int start, int length)
    throws SAXException
    String fieldName = new String(ch,start,length);
    if(fieldName==null || "".equals(fieldName.trim()))
    return;
    public void clearBuffer(){
    buff.delete(0, buff.length());
    public String getXMLString(){
    return buff.toString();
    }

    PLSQL does not go through Java to access the database. The actual access to the database is via the same mechanism for both, so in some sense, both perform about the same. However, PLSQL datatypes have the same representation as database datatypes so there is no conversion. Java datatypes have different representations than database datatypes so there is a conversion cost associated with moving data between Java and the database.
    If your processing is simple and you are moving a lot of data, PLSQL is likely the better choice. If your processing is more complex and you are moving less data, Java is likely the better choice. There are other things such as portability you should consider, but the amount of data and complexity of the code are the first considerations.
    Douglas

  • A better way to deal with lost hyperlinks when converting Robohelp to Printed doc?

    I have inherited a 750-page manual that is
    "single-sourced" in RoboHelp X5. When I generate printed
    documentation, all of my hyperlinks and converted to plain text.
    Everytime we release a new version of the manual with any changes,
    we have to re-generate, and then manually go into the MS-Word
    converted document and re-create some 350 hyperlinks and page
    number references. Somebody please tell me that there is a better
    way to do this, or a better tool to manage single-source
    documentation.

    Another post has been raised relating to this problem. See
    http://tinyurl.com/yvpaut
    I am replying here is this is where most of the relevant
    information is.
    You found that using the Style Mapping template solved the
    images problem but the document stopped generating at 450 pages.
    That was sort of what I hoped for. Rather than go to the step I
    will suggest in a moment, I suggested you try something else but
    you never came back to the forum to indicate you had tried it, so
    the assumption is you did and it worked. Patently it did not so
    let's try what I would have suggested next.
    On my website there is a topic on Print Issues and one of the
    them covers Malformed Topics. Try looking for <p
    style="mso-bookmark: as suggested in my earlier reply in this
    thread. You can try RH's Multi file find and replace but FAR from
    http://www.helpware.net/FAR
    may get better results. I think with this error you usually get a
    message. Do you have the Output pane opened and have you read right
    through it for clues? View | Output on the menu. Whether or not the
    Output pane mentions this error, I would search for it anyway.
    Other Points:
    A] It could still be a resource problem. The document is very
    large so, as Harvey mentioned, resources come into it. I know the
    PCs that won't play nicely have good resources but whilst I am no
    expert in this area, don't foget XP is using more of them leaving
    less available to you. It could be an issue but I am inclined
    towards it being something else.
    B] I also suggested a hunt for a rogue topic.
    "What I would try is copying your layout so that you have
    three versions of it. Then delete two thirds from each one. If all
    three work fine, it sort of confirms that size is a problem. If one
    fails, your on the track of the rogue topic."
    Did you try that? Like I said, if all three work fine, then
    we are back with the resource problem but we will have ruled out
    other issues. It should take less than fifteen minutes to set that
    up. Longer to run it but you can be doing something else at that
    point.
    C] On FrameMaker, no real answer but you will soon see
    evidence that Adobe are continuing to better integrate all the
    products we are using. I don't think you will see what you want in
    the upcoming version though.
    NEXT:
    1] Please search for <p style="mso-bookmark:
    2] If that fails, try creating the three layouts.
    3] Then post back how it went. If unsuccessful, tell us if
    the Output pane gave any information about things the process did
    not like.
    Let us know either way as if one succeeds and you post that,
    it helps the next person with the same problem.

  • Any way to *cut* an element from a slide?

    Is there any way to cut an element on one slide (such as a
    text box, mouse movement) and delete it, or cut it and paste it
    into/onto another slide?
    All I see are options to Copy Background, which when you
    paste into another slide it REPLACES the existing background), or
    to cut/delete entire slides.
    Why would I want to do this?
    Sometimes I want to remove text boxes and highlight boxes
    COMPLETELY from a slide because they appear in published files even
    if their layer visibility is set to hidden. (Probably a bug in CP4)
    Sometimes I want to take a mouse movement and put it on
    another slide.
    I see no way to work with (cut or paste) elements in the time
    line.
    Can anyone help?

    quote:
    Originally posted by:
    Captiv8r
    Welcome to our community, Tom
    Normally the Cut, Copy and Paste options are available when
    working with objects in Captivate. By chance are any of them
    locked? If so, that may explain why the option isn't available to
    you.
    Look in the Timeline and see if there is a Padlock icon
    listed. If so, click it to unlock it.
    Cheers... Rick
    the were not locked, but I have found you cannot Delete a
    single element if it is hidden on the timeline.
    Also, you can not delete multiple elements at the same time,
    and that some elements are tied to others on the timeline and you
    have to delete them in a certain order sometimes.
    I think Flash still has a much better timeline editing
    capabilities.

  • Must be a better way...

    Hello Flash Community!
    Thanks in advance for any help/advice.
    So, what I'm looking for here is some high level advice as far as a better way to do things. I feel like so often with programming I'm just breaking my neck to get things working when I know there is a better way (presumably based in OOP) to go about things. I just need someone to look at what I've done and point it out to me.
    So, here's what I've done so far: http://www.catherinemix.com
    And it works pretty well as far as I'm concerned! The app dynamically loads as many images as my client (my mom ) puts on the server, resizes them dynamically, adds L/R arrow buttons dynamically based on how many images are involved, etc... But the downside to all that dynamic flexibility is that I haven't found a way to load the thumbnail images (and their respective full size images) one by one. Instead, I have to load them all together and keeping the user waiting that long is unacceptable to my mom. What I would love is for each thumbnail/full size combo to get its own preloader bar in the location it will eventually be embedded, but I haven't found a way to do that and account for an unknown number of images (as it is determined dynamically.)
    Any ideas here? I would specifically like to know which functions y'all use when you need to load multiple files simultaenously (AttachMovie?)
    I have posted the kluge-y code which handles all of the image gallery functions below.
    Thanks! and Be Well
    Graham
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var wait:PleaseWait = new PleaseWait();
    wait.x = 400;
    wait.y = 50;
    addChild(wait);
    var waitFadeIn:Tween = new Tween(wait, "alpha", Regular.easeOut, 0, 1, 1, true);
    var titleText:TextField;
    var textSprite:Sprite;
    //thumbH is the ideal height for our thumbnails, and thumbW the ideal width
    var thumbH = 120;
    var thumbW = 170;
    //loadH is the ideal height for our fullsize images, and loadW the ideal width
    var loadH = 500;
    var loadW = 600;
    //some counter numbers
    var thumbNum = 1;
    var loadNum = 1;
    //some Sprites which need to be accessed by more than one function
    var darkStage:Sprite;
    var loadSprite:Sprite;
    //Let's instantiate some Arrays that we can load the images into.
    //Since Arrays of Loaders can't be copied, we have to go through the process twice.
    var thumbArray:Array = new Array();
    var loadArray:Array = new Array();
    firstLoad();
    firstThumb();
    function firstLoad():void {
        trace("firstLoad");
        var loadski = new Loader();
        loadski.load(new URLRequest("images/fulls/0.png"));
        loadski.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
        loadArray.push(loadski);
    //Starting with the above Loader, this function will execute every time the Loader completes
    function loadComplete(e:Event):void {
        trace("loadComplete");
        var loadski = new Loader();
        loadski.load(new URLRequest("images/fulls/" + loadNum + ".png"));
        loadArray.push(loadski);
        loadski.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
        loadski.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
        loadNum++;
    //Once the Loader goes too far by attempting to load an image that doesn't exist on the computer,
    //it will thorw an IOError Event at which point the following function will execute.
    function loadError(e:IOErrorEvent):void {
        trace("loadError");
        loadArray.pop();
        loadNum = 0;
        loadResize();
        //We use the pop function to remove the most recently added Loader instance, since we know it
        //contains a null reference (beacuse the IOError Event is asynchronous.)
        thumbArray.pop();
        //We reset the counter variable.
        thumbNum = 0;
        //Add the little arrows that allow the user to click to see more thumbnails (if there are more
        //than 8 images on the server.)
        removeChild(wait);
        addArrows();
        //Let's resize the images to thumbnail size and add them to the display list.
        thumbResize();
        addClickOnThumb();
    function loadResize():void {
        trace("loadResize");
        for (var ex = 0; ex < loadArray.length; ex++) {
            //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
            if ( loadArray[loadNum].content.width > loadW || loadArray[loadNum].content.height > loadH) {
                //And if the width of the image is greater than the height, apply Scaler 1...
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 1 is the ratio of the ideal width to the image width
                    var scaler1 = loadW / loadArray[loadNum].content.width;
                    trace(loadNum + " load scaler 1: " + scaler1);
                    //Apply Scaler 1 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler1;
                    //Otherwise, apply Scaler 2
                } else {
                    //Scaler 2 is the ratio of the ideal width to the image height
                    var scaler2 = loadH / loadArray[loadNum].content.height;
                    trace(loadNum + " load scaler 2: " + scaler2);
                    //Apply Scaler 2 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler2;
                    trace("loadArray[loadNum].content.height = " + loadArray[loadNum].content.height);
                    trace("loadArray[loadNum].content.width = " + loadArray[loadNum].content.width);
                //Otherwise... (that is, the image width and height are in both cases less than the ideal)
            } else {
                //And if the width of the image is greater than the heigh, apply Scaler 3
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 3 is the ratio of the ideal width to the image width
                    var scaler3 = loadW / loadArray[loadNum].content.width;
                    trace(loadNum + " load scaler 3: " + scaler3);
                    //Apply Scaler 3 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler3;
                } else {
                    //Scaler 4 is the ratio of the ideal width to the image height
                    var scaler4 = loadH / loadArray[loadNum].content.height;
                    trace(loadNum + " load scaler 4: " + scaler4);
                    //Apply Scaler 4 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler4;
            loadArray[loadNum].content.x = - (loadArray[loadNum].content.width / 2);
            loadArray[loadNum].content.y = - (loadArray[loadNum].content.height / 2);
            loadNum++;
    function firstThumb():void {
        trace("firstThumb");
        //Let's populate the first Array with Loaders that load the images Mom has put on the server.
        //We have to do this first Loader object by hand to get the Event.COMPLETE-based-loop going.
        var thumbski = new Loader();
        thumbski.load(new URLRequest("images/thumbs/0.png"));
        thumbski.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
        //We add the MouseEvent.CLICK listener to the actual Loader instance so that, later on, in the
        //function enLarge, we can make use of the currentTarget parameter to correlate the Array index of
        //the thumbnail that the user is clicking on with that of the loadArray.
        thumbski.addEventListener(MouseEvent.CLICK, enLarge);
        thumbArray.push(thumbski);
    //Starting with the above Loader, this function will execute every time the Loader completes
    function thumbComplete(event:Event):void {
        trace("thumbComplete");
        var thumbski = new Loader();
        thumbski.load(new URLRequest("images/thumbs/" + thumbNum + ".png"));
        thumbski.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
        //We add the IOErrorEvent listener so that as soon as this error is thrown, we will exit this loop
        //and proceed to the next logical step in the program can be taken.
        thumbski.addEventListener(MouseEvent.CLICK, enLarge);
        thumbArray.push(thumbski);
        thumbNum++;
    function addArrows():void {
        //Let's determine how many batches there are. A batch is the minimum amount of thumbnail images
        //mom wants to show up onscreen at a time. In this case, she has decided on 8.
        var batches =  Math.ceil(thumbArray.length / 8);
        //The variable m is part of a kluge fix related to the calculation of startX (explained below.)
        var m = 0;
        //Pseudocode for this loop: If there are at least two batches, then...
        //We do this because less than 2 batches doesn't warrant arrows
        if (batches > 1) {
            for (var k = 1; k < batches; k++) {
                //triW is the desired width of our arrows
                var triW = 20;
                //startX is the x position of the start of our rightward facing triangle(s)
                //The formula says: Our x starting position should be a triangle width shy of the
                //far edge of the stage (multiplying it by k ensures it happens as many times
                //as there are batches, which is why we intialize k = 1.) Every subsequent iteration
                //of the formula has to add a triangle's width worth of distance, except for the
                //very first one, which is why it is multiplied by m, which is initially set to 0.
                var startX = (((stage.stageWidth - triW) * k) + (triW * m));
                //We want the arrows to sit perfectly between the two rows of thumbnails. Since the
                //max height of every thumbnail is thumbW, that would seem to be the natural choice
                //for the starting y position of the arrows. But, we actually have to use thumbW/2
                //because the thumbnails have already been offset by half of thumbW due to being
                //aligned vertically with each other.
                var startY = (thumbW / 2);
                //This is the rightward facing triangle
                var tri:Sprite = new Sprite();
                tri.graphics.beginFill(0xFFFFFF);
                tri.graphics.moveTo(startX, startY);
                tri.graphics.lineTo(startX, (startY + triW));
                tri.graphics.lineTo((startX + triW), (startY + (triW/2)));
                tri.graphics.lineTo(startX, startY);
                tri.graphics.endFill();
                tri.buttonMode = true;
                tri.useHandCursor = true;
                tri.addEventListener(MouseEvent.CLICK, moveLeft);
                addChild(tri);
                //This is the leftward facing triangle
                var tri2:Sprite = new Sprite();
                var startX2 = (startX + (triW * 2));
                tri2.graphics.beginFill(0xFFFFFF);
                tri2.graphics.moveTo(startX2, startY);
                tri2.graphics.lineTo(startX2, (startY + triW));
                tri2.graphics.lineTo((startX2 - triW), (startY + (triW / 2)));
                tri2.graphics.lineTo(startX2, startY);
                tri2.graphics.endFill();
                tri2.buttonMode = true;
                tri2.useHandCursor = true;
                tri2.addEventListener(MouseEvent.CLICK, moveRight);
                addChild(tri2);
                //Increase m (see above)
                m++;
    //This function moves the entire Gallery MovieClip to the left 800 pixels.
    function moveLeft(event:MouseEvent):void {
        var leftTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x - 800), .5, true);
    //This function moves the entire Gallery MovieClip to the right 800 pixels.
    function moveRight(event:MouseEvent):void {
        var rightTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x + 800), .5, true);
    //This function resizes the loaded images to the desired thumbnail dimensions and adds them
    //to the display list.
    function thumbResize():void {
        //The highest level of organization of thumbnails is the batch. There are only as many batches
        //as the length of the thumbArray divided by 8 (the max amount of thumbnails in a batch, as determined
        //by mom.)
        for (var batch = 0; batch < Math.ceil(thumbArray.length / 8); batch++) {
            trace("batch " + batch);
            //This Sprite serves as the container that we use to position entire batches
            var batchSprite: Sprite = new Sprite();
            //The logic behind setting the x position of the batchSprite to 800 x batch should be self-evident --
            //we want each new batch to be 800 pixels to the right of the former one -- but the addition of (thumbW
            //divided by 1.5) is a kluge fix for how much space to give the batches on left margin.
            batchSprite.x = (thumbW / 1.5) + (batch * 800);
            addChild(batchSprite);
            //The second highest level of organization for our thumbnails is the row. Our grid of thumbnails is
            //two rows deep.
            for (var row = 0; row < 2; row++) {
                trace("     row " + row);
                //The third highest level of organization for our thumbnails is the column. Our grid of thumbnails is
                //four columns deep.
                for (var col = 0; col < 4; col++) {
                    trace("          col " + col);
                    trace("               thumb " + thumbNum);
                    if (thumbNum < thumbArray.length) {
                        //The following is the logic structure for handling the resizing of images. The goal was to develop
                        //a system robust enough to allow my mom to put whatever size images she wanted on the server and the
                        //app would use them. The logic is explained at each step...
                        //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
                        if ( thumbArray[thumbNum].content.width > thumbW || thumbArray[thumbNum].content.height > thumbH) {
                            //And if the width of the image is greater than the height, apply Scaler 1...
                            if ( thumbArray[thumbNum].content.width > thumbArray[thumbNum].content.height ) {
                                //Scaler 1 is the ratio of the ideal width to the image width
                                var scaler1 = thumbW / thumbArray[thumbNum].content.width;
                                trace("               scaler1 = " + scaler1);
                                //Apply Scaler 1 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler1;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                                //Otherwise, apply Scaler 2
                            } else {
                                //Scaler 2 is the ratio of the ideal width to the image height
                                var scaler2 = thumbW / thumbArray[thumbNum].content.height;
                                trace("               scaler2 = " + scaler2);
                                //Apply Scaler 2 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler2;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                            //Otherwise... (that is, the image width and height are in both cases less than the ideal)
                        } else {
                            //And if the width of the image is greater than the heigh, apply Scaler 3
                            if ( thumbArray[thumbNum].content.width > thumbArray[thumbNum].content.height ) {
                                //Scaler 3 is the ratio of the ideal width to the image width
                                var scaler3 = thumbW / thumbArray[thumbNum].content.width;
                                trace("               scaler3 = " + scaler3);
                                //Apply Scaler 3 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler3;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                            } else {
                                //Scaler 4 is the ratio of the ideal width to the image height
                                var scaler4 = thumbW / thumbArray[thumbNum].content.height;
                                trace("               scaler4 = " + scaler4);
                                //Apply Scaler 4 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler4;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                        //Here is where we center the images vertically...
                        thumbArray[thumbNum].content.x = - (thumbArray[thumbNum].content.width / 2);
                        //Here is where we center the images horizontally...
                        thumbArray[thumbNum].content.y = - (thumbArray[thumbNum].content.height / 2);
                        //Before placing them in their own container Sprite, so that their relative positions can be
                        //determined accurately (a task that would've been otherwise impossible after the
                        //adjustments to position made above.)
                        var thumby = new MovieClip();
                        thumby.addChild(thumbArray[thumbNum]);
                        //thumbW being the max possible length or width of any one thumbnail (this was done for visual
                        //consistency and codified in the logic tree above), placing two thumbnails thumbW
                        //apart (measuring from center point in either case) will put them edge to edge at best. This is why
                        //we add (thumbW / 8) as additional spacing.
                        thumby.y = (row * (thumbW + (thumbW / 8)));
                        thumby.x = (col * (thumbW + (thumbW / 8)));
                        thumby.buttonMode = true;
                        thumby.useHandCursor = true;
                        var fA:Array = new Array();
                        var dS:DropShadowFilter = new DropShadowFilter(5, 45, 0x000000, 0.33, 5, 5, 1, 1);
                        fA.push(dS);
                        thumby.filters = fA;
                        trace("thumby.width = " + thumby.width);
                        trace("thumby.height = " + thumby.height);
                        batchSprite.addChild(thumby);
                        thumbNum++;
    function enLarge(event:MouseEvent):void {
        var indexNum:Number = new Number();
        indexNum = thumbArray.indexOf(event.currentTarget);
        trace("indexNum = " + indexNum);
        darkStage = new Sprite();
        darkStage.graphics.beginFill(0x333333, .9);
        darkStage.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
        darkStage.addEventListener(MouseEvent.CLICK, reMove);
        darkStage.buttonMode = true;
        darkStage.useHandCursor = true;
        (parent  as  MovieClip).addChild(darkStage);
        loadSprite = new Sprite();
        loadSprite.addChild(loadArray[indexNum]);
        loadSprite.x = (stage.stageWidth / 2);
        loadSprite.y = (stage.stageHeight / 2);
        loadSprite.addEventListener(MouseEvent.CLICK, reMove);
        loadSprite.buttonMode = true;
        loadSprite.useHandCursor = true;
        loadSprite.mouseEnabled = false;
        (parent  as  MovieClip).addChild(loadSprite);
        var urlRequest:URLRequest = new URLRequest("xmls/" + indexNum + ".xml");
        var titleURL:URLLoader = new URLLoader();
        titleURL.addEventListener(Event.COMPLETE, completeListener);
        titleURL.load(urlRequest);
        function completeListener(event:Event):void {
            titleText = new TextField();
            titleText.autoSize = TextFieldAutoSize.LEFT;
            var myFont:Font = new BOF();
            var ttFormat:TextFormat = new TextFormat();
            ttFormat.color = 0xFFFFFF;
            ttFormat.size = 18;
            ttFormat.font = myFont.fontName;
            textSprite = new Sprite();
            textSprite.addChild(titleText);
            (parent  as  MovieClip).addChild(textSprite);
            var titleXML:XML = new XML(titleURL.data);
            titleText.text = titleXML.toXMLString();
            titleText.setTextFormat(ttFormat);
            titleText.embedFonts = true;
            textSprite.y = 570;
            textSprite.x = ((stage.stageWidth / 2) - (titleText.textWidth / 2));
            textSprite.mouseEnabled = false;
            titleText.mouseEnabled = false;
    function reMove(event:MouseEvent):void {
        (parent  as  MovieClip).removeChild(textSprite);
        (parent  as  MovieClip).removeChild(loadSprite);
        (parent  as  MovieClip).removeChild(darkStage);
    function addClickOnThumb():void {
        var cot:ClickOnThumbnail = new ClickOnThumbnail();
        cot.x = 400;
        cot.y = 583;
        (parent  as  MovieClip).addChild(cot);

    Hey Jim
    Wow, that's great; thanks! Can I ask what settings you used to get the files so small?
    Yes, I am familiar with Photoshop and image optimization issues, but I didn't realize that PNG was so much bigger than JPG and that I had so much file size I could shed before I would notice a degradation in image quality. Your advice will certainly help greatly, and I will certainly apply it to the thumbs as well. I think my mom will be very pleased.  : )
    I look forward to hearing what collection of settings you used.
    Thanks and Be Well
    Graham

  • Is there a better way to generate custom timed digital Signals

    I am trying to generate digital output of high and lows with particular delays on different lines. Each daq assistant is activating single line on a port on USB 6501. There more complex high and lows that I need to generate with variable time difference between high and low. There is codebelow which accomplishes what I am trying to achieve but for executing a long pattern of high and low signal is very time consuming to do this way. I am sure there is a better way to do this, I  not a expert on labview so I haven't uncovered its full potential. Can anybody suggest a more effective and a quick way to do this. I would hgihly appreciate. Thanks!
    I have not shown in the code below but through DAQ assistant I have initialized lines to low level logic.
    Solved!
    Go to Solution.

    See the attached file
    Attachments:
    Digital Signal.vi ‏335 KB

  • A better way than a global temp table to reuse a distinct select?

    I get the impression from other threads that global temp tables are frowned upon so I'm wondering if there is a better way to simplify what I need to do. I have some values scattered about a table with a relatively large number of records. I need to distinct them out and delete from 21 other tables where those values also occur. The values have a really low cardinality to the number of rows. Out of 500K+ rows there might be a dozen distinct values.
    I thought that rather than 21 cases of:
    DELETE FROM x1..21 WHERE value IN (SELECT DISTINCT value FROM Y)
    It would be better for performance to populate a global temp table with the distinct first:
    INSERT INTO gtt SELECT DISTINCT value FROM Y
    DELETE FROM x1..21 WHERE value IN (SELECT value FROM GTT)
    People asking questions about GTT's seem to get blasted so is this another case where there's a better way to do this? Should I just have the system bite the bullet on the DISTINCT 21 times? The big table truncates and reloads and needs to do so quickly so I was hoping not to have to index it and meddle with disable/rebuild index but if that's better than a temp table, I'll have to make do.
    As far as I understand WITH ... USING can't be used to delete from multiple tables or can it?

    Almost, but not quite, as efficient as using a temporary table would be to use a PL/SQL collection and FORALL statements and/or referencing the collection in your subsequent statements). Something like
    DECLARE
      TYPE value_nt IS TABLE OF y.value%type;
      l_values value_nt;
    BEGIN
      SELECT distinct value
        BULK COLLECT INTO l_values
        FROM y;
      FORALL i IN 1 .. l_values.count
        DELETE FROM x1
         WHERE value = l_values(i);
      FORALL i IN 1 .. l_values.count
        DELETE FROM x2
         WHERE value = l_values(i);
    END;or
    CREATE TYPE value_nt
      IS TABLE OF varchar2(100); -- Guessing at the type of y.value
    DECLARE
      l_values value_nt;
    BEGIN
      SELECT distinct value
        BULK COLLECT INTO l_values
        FROM y;
      DELETE FROM x1
       WHERE value = (SELECT /*+ cardinality(v 10) */ column_value from table( l_values ) v );
      DELETE FROM x2
       WHERE value = (SELECT /*+ cardinality(v 10) */ column_value from table( l_values ) v );
    END;Justin

Maybe you are looking for

  • Font size in a TextField

    Hello ! I'm using a javax.microedition.lcdui.TextField to enter a few digits. These digits were shown very small... Is there any way to change the font-size in the text field? Greetings Micha

  • Mac user: FTP login pw not saved

    I tried posting this to another topic that was posted by a PC user, am concerned it will get buried. I'm a Mac user and having this same annoying FTP login issue. I don't have IE7 (can't, thank you Microsoft) and had no problems in MX, only after upg

  • To buy or not to buy an iPod Nano

    I have been wanting to buy a Nano but have heard of ppl having problems, after searching the net i have found a very interesting page where some guys did some stress testing on an iPod Nano putting it through some every day testing and some not so ev

  • Form builder 10g installation

    Hi All, I want to download Forms10g into my system.So plese let me know the steps to download and let me know how to compare 2 ".fmb" files using Form builder. Please give me the steps. Thank you.

  • Did my MacBook crash?

    Let me preface this by saying that I am not a techie, so go easy on me, please! I've had my MacBook Pro for about four years now. I was using it the other night and everything was fine, but then the screen dimmed line-by-line, from top to bottom, and