AS 2 sliding panel  - AS 3 sliding panel help

hey all,
i was using a script to animate some site content with a
sliding panel easing effect in AS 2, but when i try to run the
script in AS 3 it doesn't work. is there a way to convert this to
AS 3 quickly?
baseRate = 3.5;
difference = _parent.targetx - _parent.panel._x;
rate = difference / baseRate
_parent.panel._x += rate;
if this doesn't convert to AS 3, does anyone know of a good
easing formula in flash 9?
thanks for the help!

I forgot to mention that I put some test pages which
demonstrate the panels outside the table structure.
just the sliding panels:
http://www.rightonstudio.com/client/staging/jenko/chelsea/html/testimonials2.html
and with a table on top for the header section, divs in the
middle for the panels, and table on the bottom for the footer
section. This works but the alignment is all off in IE6,7 but not
in Safari and a little off in FF. :
http://www.rightonstudio.com/client/staging/jenko/chelsea/html/testimonials3.html
-L

Similar Messages

  • TS3989 Mssage when opening Photo Stream on-"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel" Help!!!

    Mssage when opening Photo Stream on-"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel" Help!!!

    You are posting in the "icloud on my mac" forum, but your profile mentions Windows.  If using a mac, you need to have iphoto or aperture installed in order to receive new photos via photo stream.  If using windows, try posting in the iCloud on a PC forum.  You'll get better help there.
    https://discussions.apple.com/community/icloud/icloud_on_my_pc

  • Sliding Panels Help for Javascript Idiot

    I have a simple thumbnail gallery to which I am attempting to
    apply the Spry Sliding Panels widget. I am creating the gallery
    from an xml file, and this seems to be working fine.
    I looked at the code of the Sliding Panels examples, but
    being the Spry and javascript idiot that I am, I was not able to
    incorporate the Sliding Panels successfully. Would someone mind
    taking a look at my code and perhaps commenting about how I would
    go about adding the sliding panel? I would appreciate it.
    P.s., I currently have 5 thumbnails visible. I would like to
    slide to the next 5 on the click of the arrows that are included.
    Here is the code, without any of my failed attempts at SP
    included:
    <!---Begin Thumbs Holder--->
    <div id="thumbsmask">
    <div id="thumbsbox" spry:region="dsPhotos dsGalleries
    dsGallery">
    <div id="p{ds_RowNumber}" spry:repeat="dsPhotos">
    <div class="thumb">
    <img id="tn{ds_RowID}"
    alt=""
    src="galleries/{dsGalleries::@base}{dsGallery::@base}/thumbnails/{@thumbpath}"
    width="90"
    height="90"
    style="opacity:0.3; filter:alpha(opacity=30)"
    onmouseover="MM_effectAppearFade('tn{ds_RowID}', 500, 30,
    100, false)"
    onmouseout="MM_effectAppearFade('tn{ds_RowID}', 500, 100,
    30, true)"
    onclick="HandleThumbnailClick('{ds_RowID}');"
    title="tn{ds_RowID}" />
    </div>
    <div class="thumbspacer"></div>
    </div>
    </div>
    </div>
    <!---End Thumbs Holder--->
    <div id="arrowholder">
    <div id="arrowright">
    <a href="#">
    <img src="images/arrowright.png" alt="left" width="20"
    height="20" align="right" border="0" />
    </a>
    </div>
    <div id="arrowleft">
    <a href="#">
    <img src="images/arrowlef.png" alt="right" width="20"
    height="20" border="0" />
    </a>
    </div>
    </div>

    Thanks for the response.
    I have tried to implement that, and it still does not work.
    Here is my code with it implemented.
    Thanks again.
    <script type="text/javascript">
    <!--
    var dsGalleries = new
    Spry.Data.XMLDataSet("galleries/galleries.xml",
    "galleries/gallery");
    var dsGallery = new
    Spry.Data.XMLDataSet("galleries/{dsGalleries::@base}{dsGalleries::@file}",
    "gallery");
    var dsPhotos = new
    Spry.Data.XMLDataSet("galleries/{dsGalleries::@base}{dsGalleries::@file}",
    "gallery/photos/photo");
    function TruncateStrIfNeeded(str, maxChars)
    // Decode our string so when we count characters, we aren't
    counting
    // the chars in an entity name.
    str = Spry.Utils.decodeEntities(str);
    if (str.length > maxChars)
    str = str.substr(0, maxChars - 4) + " ...";
    return Spry.Utils.encodeEntities(str);
    dsPhotos.addObserver({ onPostLoad: function() {
    var numberOfPanelsPerView = 5;
    var rows = dsPhotos.getData();
    var numRows = rows.length;
    // Add some custom columns to our data set.
    for (var i = 0; i < numRows; i++)
    var row = rows
    // Add a 'teaser' column which is basically the description,
    // but truncated so it can fit within our panel.
    row.teaser = TruncateStrIfNeeded(row.desc, 400);
    // Add a 'viewStartIndex' column that indicates what view
    this row
    // belongs to.
    row.viewNumber = Math.floor(i / numberOfPanelsPerView) + 1;
    row.viewStartIndex = i - (i % numberOfPanelsPerView);
    row.prevStartIndex = row.viewStartIndex -
    numberOfPanelsPerView;
    row.nextStartIndex = row.viewStartIndex +
    numberOfPanelsPerView;
    //-->
    </script>
    <script type="text/javascript"
    src="scripts/gallery.js"></script>
    <<<<<<<<<<<<<<body>>>>>>>>>>>>>>>
    <!---Begin Thumbs Holder--->
    <div id="thumbsmask">
    <div id="thumbsbox" spry:region="dsPhotos dsGalleries
    dsGallery">
    <div id="p{ds_RowNumber}" spry:repeat="dsPhotos">
    <div class="thumb">
    <img id="tn{ds_RowID}"
    alt=""
    src="galleries/{dsGalleries::@base}{dsGallery::@base}/thumbnails/{@thumbpath}"
    width="90"
    height="90"
    style="opacity:0.3; filter:alpha(opacity=30)"
    onmouseover="MM_effectAppearFade('tn{ds_RowID}', 500, 30,
    100, false)"
    onmouseout="MM_effectAppearFade('tn{ds_RowID}', 500, 100,
    30, true)"
    onclick="HandleThumbnailClick('{ds_RowID}');"
    title="tn{ds_RowID}" />
    </div>
    <div class="thumbspacer"></div>
    </div>
    </div>
    </div>
    <!---End Thumbs Holder--->
    <div id="arrowholder">
    <div id="arrowright" spry:if="{ds_RowNumber} % 2 == 0
    &amp;&amp; {prevStartIndex} &gt;= 0">
    <a href="#" onclick="sp1.showPanel('p{prevStartIndex}');
    return false;">
    <img src="images/arrowright.png" alt="left" width="20"
    height="20" align="right" border="0" />
    </a>
    </div>
    <div id="arrowleft"spry:if="{ds_RowNumber} % 2 != 0
    &amp;&amp; {nextStartIndex} &lt; {ds_RowCount}">
    <a href="#" onclick="sp1.showPanel('p{nextStartIndex}');
    return false;">
    <img src="images/arrowlef.png" alt="right" width="20"
    height="20" border="0" />
    </a>
    </div>
    </div>
    <script type="text/javascript">
    var sp1 = new Spry.Widget.SlidingPanels("thumbsmask");
    </script>

  • Spry Gallery and Sliding Panel help.

    Hi all,
    Sorry for my english, i'm french lol.
    I want combined the gallery with the sliding panel for
    display the thumbnails but I am blocked.
    Any help would be appreciated!
    Thanks

    Can you provide more information about your project?
    Are you loading the thumbs through Spry Data?
    Have you seen:
    http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample2.html
    Thanks,
    Don

  • Can't Left Click in Flash Player Settings Panel - HELP PLEASE

    Hi and thanks for taking the time to read this. Believe me it is a fraction of the time I have wasted trying to resolve this issue.
    Basic problem is:
    I am trying to stream to Ustream but since downloading AFP11 for my Windows PC when I open the Flash Player Settings panel i can't left click on anything. It is set to deny but I can't click allow, or close or any of the icons.
    Right click does work.
    I have followed countless instructions in other forums from other posts that have encountered the problem on Mac and older versions of AFP but as yet none of the solutions have proven succesul.
    I have tried all of the following but nothing has resolved the problem.
    1. Uninstall and reinstall Adobe Flash Player (although this is impossible using Google Chrome) and restart computer.
    2. Unistall flash and install older version. (made no difference on Google Chrome and on IE8 had no flash whatsoever).
    5. Uninstall older AFP and reinstall AFP11.
    4. Uninstall Google Chrome and restart computer.
    5. Uninstall QuickTime (I got this off http://www.techsupportforum.com/forums/f10/flash-player-not-working-properly-please-help-1 61552.html) and restart computer
    6. Last resort use keyboard shortcuts such as tab, enter and ctrl+arrows. This either didn't highlight the panel at all or if it did I still couln't select allow, or close the panel itself so was no help either.
    So now I'm back to square one.
    Now here's a really bizarre thing... I am using a shared laptop computer and if I use my colleagues profile where she hasn't updated her AFP to Adobe Flash Player 11 the settings panel is responding just fine. IT'S THE SAME PC!
    I know I am alone with this problem but someone out there has an answer. If you can help please let me know how to fix this problem where I can't left click in the Adobe Flash Player settings panel.and I will be eternily grateful.
    many thanks
    nik

    OK the amount I hate myself right now is more than a fat guy's self loathing for raiding the fridge at 2am for Pizza but less than an armed robber who's accidentally shot a pregnant woman in the stomach during a shootout. but not much less.
    So after I had miraculously got the Flash Player Setting Panel to work again, (after deleting QuickTime and leaving the window open for abut an hour it just started working again) I then got enticed into downloading the ustream producer software.
    While downloading it informed me that it would only work with QuickTime.
    Stupidly and Optimistically hoping it would remove the need to use flash player altogether I downloaded and installed both.
    I then discovered to my horror that Ustream producer is not a patch on Vidbalster and that it was not capable of delivering the same level of broadcast.
    I then opened the flash player settings panel on ustream and... the problem has returned!
    This means I am 99% sure that QuickTime IS the cause of the problem so I have uninstalled QT off the PC. I have also uninstalled Ustream Producer.
    The thing is though, now no matter how many times I restart, or uninstall and reinstall Adobe, or Google Chrome, I am once again UNABLE TO LEFT CLICK IN THE FLASH PLAYER SETTINGS PANEL. AAAARRRRRGGGGHHHH!!!!
    What did I do? I fixed it and  f***ing broke it again!
    Now it properly will not come back to life! the problem is not solved and i urgently need help.
    Why does Adobe Flash Player Settings Panel and Apple QuickTime hate each other so much that they've got to ruin my life?
    Help forum PLEASE!
    Regards,
    nik

  • Spry Tabs Panel help

    Am just using this on a page, but using some icons.
    At the moment it :
    looks
    like this
    Is it possible to move the images into the tabs, so that they
    change from the faded image to the colour one of each as they're
    moused over?
    I see it working if the image is the same for each tab, ie
    set a background image for the tabs, and a different background
    image for when they're moused over.
    But how can I use different images in the tabs that change to
    different images when each tab is moused over, a bit more like this
    (just with the images in the tabs, but no mouse over change yet :
    like
    this
    The CSS for the firs one with the text tabs looks like :
    .TabbedPanels {
    margin: 0px;
    padding: 0px;
    width: 100%; /* IE Hack to force proper layout when preceded
    by a paragraph. (hasLayout Bug)*/
    height: 150px;
    .TabbedPanelsTabGroup {
    margin: 0px;
    margin-left:7px;
    padding: 0px;
    .TabbedPanelsTab {
    position: relative;
    top: 0px;
    float: left;
    padding: 4px 5px;
    margin: 0px 16px 0px 0px;
    font: bold 1em sans-serif;
    background-color: #FFFFFF;
    list-style: none;
    color:#999999;
    border-left: solid 1px #fff;
    border-bottom: solid 1px #fff;
    border-top: solid 1px #fff;
    border-right: solid 1px #fff;
    -moz-user-select: none;
    -khtml-user-select: none;
    cursor: pointer;
    width:94px;
    text-align:center;
    .TabbedPanelsTabHover {
    background-color: #990000;
    color:#24303C;
    border-bottom: solid 1px #FFFFFF;
    .TabbedPanelsTabSelected {
    background-color: #FFFFFF;
    color:#24303C;
    .TabbedPanelsTab a {
    color: black;
    text-decoration: none;
    .TabbedPanelsContentGroup {
    border-left: solid 1px #fff;
    border-bottom: solid 1px #fff;
    border-top: solid 1px #fff;
    border-right: solid 1px #fff;
    background-color: #FFFFFF;
    margin-left:0px;
    height:120px;
    display:inline;
    .TabbedPanelsContent {
    margin-left:0px;
    width:500px;
    padding-right:5px;
    border-left: solid 1px #fff;
    border-bottom: solid 1px #fff;
    border-top: solid 1px #fff;
    border-right: solid 1px #fff;
    .TabbedPanelsContentVisible {
    /* Vertical Tabbed Panels */
    .VTabbedPanels .TabbedPanelsTabGroup {
    float: left;
    width: 400px;
    background-color: #EEE;
    position: relative;
    border-top: solid 1px #999;
    border-right: solid 1px #999;
    border-left: solid 1px #CCC;
    border-bottom: solid 1px #CCC;
    clear:both;
    .VTabbedPanels .TabbedPanelsTab {
    float: none;
    margin: 0px;
    border-top: none;
    border-left: none;
    border-right: none;
    .VTabbedPanels .TabbedPanelsTabSelected {
    background-color: #EEE;
    border-bottom: solid 1px #999;
    .VTabbedPanels .TabbedPanelsContentGroup {
    clear: none;
    float: left;
    padding: 0px;
    width: 400px;
    height:150px;
    #tp1 p { margin: 0; }
    Hope that makes sense. Cheers.

    Am just using this on a page, but using some icons.
    At the moment it :
    looks
    like this
    Is it possible to move the images into the tabs, so that they
    change from the faded image to the colour one of each as they're
    moused over?
    I see it working if the image is the same for each tab, ie
    set a background image for the tabs, and a different background
    image for when they're moused over.
    But how can I use different images in the tabs that change to
    different images when each tab is moused over, a bit more like this
    (just with the images in the tabs, but no mouse over change yet :
    like
    this
    The CSS for the firs one with the text tabs looks like :
    .TabbedPanels {
    margin: 0px;
    padding: 0px;
    width: 100%; /* IE Hack to force proper layout when preceded
    by a paragraph. (hasLayout Bug)*/
    height: 150px;
    .TabbedPanelsTabGroup {
    margin: 0px;
    margin-left:7px;
    padding: 0px;
    .TabbedPanelsTab {
    position: relative;
    top: 0px;
    float: left;
    padding: 4px 5px;
    margin: 0px 16px 0px 0px;
    font: bold 1em sans-serif;
    background-color: #FFFFFF;
    list-style: none;
    color:#999999;
    border-left: solid 1px #fff;
    border-bottom: solid 1px #fff;
    border-top: solid 1px #fff;
    border-right: solid 1px #fff;
    -moz-user-select: none;
    -khtml-user-select: none;
    cursor: pointer;
    width:94px;
    text-align:center;
    .TabbedPanelsTabHover {
    background-color: #990000;
    color:#24303C;
    border-bottom: solid 1px #FFFFFF;
    .TabbedPanelsTabSelected {
    background-color: #FFFFFF;
    color:#24303C;
    .TabbedPanelsTab a {
    color: black;
    text-decoration: none;
    .TabbedPanelsContentGroup {
    border-left: solid 1px #fff;
    border-bottom: solid 1px #fff;
    border-top: solid 1px #fff;
    border-right: solid 1px #fff;
    background-color: #FFFFFF;
    margin-left:0px;
    height:120px;
    display:inline;
    .TabbedPanelsContent {
    margin-left:0px;
    width:500px;
    padding-right:5px;
    border-left: solid 1px #fff;
    border-bottom: solid 1px #fff;
    border-top: solid 1px #fff;
    border-right: solid 1px #fff;
    .TabbedPanelsContentVisible {
    /* Vertical Tabbed Panels */
    .VTabbedPanels .TabbedPanelsTabGroup {
    float: left;
    width: 400px;
    background-color: #EEE;
    position: relative;
    border-top: solid 1px #999;
    border-right: solid 1px #999;
    border-left: solid 1px #CCC;
    border-bottom: solid 1px #CCC;
    clear:both;
    .VTabbedPanels .TabbedPanelsTab {
    float: none;
    margin: 0px;
    border-top: none;
    border-left: none;
    border-right: none;
    .VTabbedPanels .TabbedPanelsTabSelected {
    background-color: #EEE;
    border-bottom: solid 1px #999;
    .VTabbedPanels .TabbedPanelsContentGroup {
    clear: none;
    float: left;
    padding: 0px;
    width: 400px;
    height:150px;
    #tp1 p { margin: 0; }
    Hope that makes sense. Cheers.

  • Spry Tabbed Panels Help

    Greetings everyone:
    I had an existing Spry tabbed panel with three tabs. I then
    added a fourth tab and used the up arrow to move it to the number
    one slot. It displays properly as far as the tab goes, but when the
    page loads the original number one tab (now number two) is always
    open.
    How do I make the new number one tab the default for being
    open when the page loads?
    Thanks in advance for any help.
    Glenn

    Duh! (Smacks self in the forehead!)
    How about in the property inspector - Default Panel.
    Duh!
    From reading all the purists posts on the board (Murray,
    David and the rest of the gang) I immediately started looking for
    this in the code and couldn't find it, so I posted the question.
    I know, looking in the code is a good thing! :)
    Thanks.
    Glenn

  • Removing components from  a  J panel Help?

    I have a J Panel which has on it a stack of 10 components which are composed
    of either jComboboxes or textfields. Duridng program operation I need to clear the panel and then
    add the components again in different locations depending on user selection.
    Problem is I can't seem to get rid of the comboboxes. I am trying a removeAll and then
    reinitializing/rebuilding with all text fields but the combobox won't go away.
    I have used various combinations of
    Even if I just do the removeAll the underlying panel jPanel2 does not clear itself completly
    jPanel2.validate();
    jPanel2.invalidate();
    jPanel2.doLayout();
    Nothing seems to work yet
    Help??

    You can try remove () and then call repaint, unless you've done that...

  • Buttons showing in panel help

    HI,
    This was my final year project and im trying to tidy it up a bit so I can add it to my protfolio but im having a big problem with the following:
    I have several panels all in a container, one is a button panel and one is a screen which shows an algorithm running. When you press or hover over a button in the button panel, it is displayed in the top left corner of the screen panel.
    the applet is here: http://homepage.ntlworld.com/k.wood143/FinalCopy/algo.html
    to get to the source just take off algo.html
    the classes you want are algoApp.java, and /runjava/GrahamScan.java
    any help or questions will be greatly appreciated, thanks in advance

    this edited version of your code does not show the buttons in the panel. The problem was your incorrect implementation of JPanels. You should never override paint(..) but paintComponent(..) instead. your implementation would have been ok for AWT but not Swing. get rid of all of your update and paint functions. put your 'update' code in paintComponent() save the call to repaint(). The DefaultPoints Panel is unnecessary. here is a revision of GrahamScan:
    package runjava;
    * Author Paul wood
    * This class is a JPanel used to display all of the steps
    * involved in the Grahams Scan algorithm. It addds an animation
    * feature to the JPanel using threads
    import javax.swing.JOptionPane;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    public class GrahamScan extends JPanel implements Runnable {
         //Edited by BlairTheMagician
         static int[][]coords = new int[][]{ {20, 90}, {100, 140}, {25, 200}, {150, 140},
                        {120, 220}, {115, 200}, {150, 55}, {125, 120},
                        {200, 140}, {250, 210},{220, 265}, {240, 240} };
         // Create an array of type Point
         static Point[] defaultPoints = new Point[coords.length];
         static
              //     add the points of the coords 2d array into the point array
             for(int i = 0; i < defaultPoints.length; i++)
                 defaultPoints[i] = new Point(coords[0],coords[i][1]);
         }// end edit by the Magician
    // initialise constants used for button presses
    public final static int COMPLETE = 1;
    public final static int ANCHOR = 2;
    public final static int ANGLE = 3;
    public final static int CONVEX = 4;
    public final static int ANIMATION = 5;
    public final static int STOPANIM = 6;
    public final static int STEP = 7;
    public final static int BUILD = 8;
    private int complete;
    private int anchor;
    private int angle;
    private int build;
    private int convex;
    private int step;
    private int nextStep;
    Point test1;
    Point test2;
    // these are used to get the sets of points
    DefaultPanel defaultPanel;
    OwnPointsDemo ownPointsPanel;
    Point[] points;
              // this is still not workink
    //Point[] points = ownPointPanel.points;
    int draw = 2;
    int count = 2;
    int val = 0;
    int[][] lineDraw;
    boolean completeHull = false;
    int start = 0;
    // default delay
    int delay = 1000;
    // animation stuff
    int frameNumber = 0;
    volatile Thread animatorThread = null;
    boolean threadSuspended = false;
         // create an array to hold the final convex hull points
         Point[] convexHull;
         ArrayStack S;
    public GrahamScan(DefaultPanel defaultPanel, OwnPointsDemo ownPointsPanel )
    // add demo panel
    // JPanel grahamScanPanel = new JPanel();
    this.defaultPanel = defaultPanel;
    this.ownPointsPanel = ownPointsPanel;
    points = defaultPanel.points;
    convexHull = new Point[points.length];
         S = new ArrayStack(points.length);
    //Point[] points = ownPointPanel.points;
    lineDraw = new int[points.length][points.length];
    public void startAnimation()
    //Create and start the animating thread.
              if (animatorThread == null) {
                   animatorThread = new Thread(this);
                   animatorThread.start();
    public void stopAnimation() {
    //Stop the animating thread.
    if (animatorThread != null) {
                   animatorThread = null;
         public void run()
              final Thread currentThread = Thread.currentThread();
              reset();
              step = STEP;
              while( animatorThread == currentThread) {
                   try{
                        currentThread.sleep(delay);
                        synchronized(this) {
                             while (threadSuspended && animatorThread == currentThread)
                                  wait();
                   }catch( InterruptedException ex ){}
                   frameNumber++;
                   nextStep++;
                   repaint();
    public void paint( Graphics g )
         update(g);
         public void paintComponent( Graphics g )
         Graphics2D g2 = (Graphics2D)g;
    //super.paint( g2 );
         g2.setColor(Color.white);
         g2.fillRect(0,0,this.getWidth(),this.getHeight());
         g2.setColor(Color.black);
         // edit by BTM begin
         // draw default points
         for(int i = 0; i < defaultPoints.length; i++)
    g2.fillOval( defaultPoints[i].x, defaultPoints[i].y, 4, 4 );
         // end edit by BTM
    // initialise a polygon for visual testing of the algorithm
    Polygon polygon1 = new Polygon();
    g2.drawString("frame = " + frameNumber, ( 200 ),( 300 ) );
    if( anchor == ANCHOR )
              // now start the algoithm by finding the anchor point
              findAnchorPoint();
              g2.setColor(Color.blue);
              g2.drawString("<-- Anchor point", ( points[0].x + 5 ),( points[0].y +5 ) );
         if( angle == ANGLE )
              // next sort the array into angular order
              angleSort( points );
              for(int i = 1; i < points.length; i++)
              g2.drawLine(points[0].x, points[0].y, points[i].x, points[i].y );
    if( step == STEP )
              g2.drawString("step = " + nextStep, ( 100 ),( 300 ) );
              if( nextStep == 1 )
                   anchor(ANCHOR);
                   // this is needed to stop the image being repainted until
                   // step is pressed again
                   nextStep++;
              else if( nextStep == 3 )
                   angle( ANGLE );
              // this is needed to stop the image being repainted until
                   // step is pressed again
                   nextStep++;     
              else if( nextStep == 5 )
                        buildConvex( BUILD );
                        // this is needed to stop the image being repainted until
                   // step is pressed again
                   nextStep++;      
    if( build == BUILD )
         convexHull( points );
                   if (completeHull == true)
                        // add the points in the point array to the polygon
         for ( int i = 0; i < convexHull.length && convexHull[ i ] != null; i++ )
         polygon1.addPoint( convexHull[ i ].x, convexHull[ i ].y );
         // draw the polygon
         g2.drawPolygon( polygon1 );
    else
    //     g2.drawLine(points[0].x, points[0].y, points[1].x, points[1].y);
         test1 = S.top();
                        test2 = S.secTop();
                        if( val < 1 )
                             lineDraw[0][0] = points[0].x;
                             lineDraw[0][1] = points[0].y;
                        //     lineDraw[1][0] = points[1].x;
                        //     lineDraw[1][1] = points[1].y;
                             lineDraw[1][0] = test2.x;
                             lineDraw[1][1] = test2.y;
                             lineDraw[2][0] = test1.x;
                             lineDraw[2][1] = test1.y;
                             val++;
                        if(test1.x == lineDraw[draw][0] && test1.y == lineDraw[draw][1] )
                             //just draw what we've already got
                             for( int i = 1; i < lineDraw.length && lineDraw[i][0] > 0; i++ )
                                  g2.setColor( Color.blue );
                                  g2.drawLine(lineDraw[i-1][0], lineDraw[i-1][1], lineDraw[i][0], lineDraw[i][1] );
                        else
                             //add to lineDraw then draw lines
                             lineDraw[draw][0] = test1.x;
                             lineDraw[draw][1] = test1.y;
                             lineDraw[draw][0] = test2.x;
                             lineDraw[draw][1] = test2.y;
                             for( int i = 1; i < lineDraw.length && lineDraw[i][0] > 0; i++ )
                                  g2.setColor( Color.blue );
                                  g2.drawLine(lineDraw[i-1][0], lineDraw[i-1][1], lineDraw[i][0], lineDraw[i][1] );
         g2.setColor( Color.red );     
                        g2.drawLine(test1.x, test1.y, test2.x, test2.y);
    if( convex == CONVEX )
         // finally find which points are on the convex hull
              testMeth( points );
    // add the points in the point array to the polygon
    for ( int i = 0; i < convexHull.length && convexHull[ i ] != null; i++ )
    polygon1.addPoint( convexHull[ i ].x, convexHull[ i ].y );
    // draw the polygon
    g2.setColor(Color.blue);
    g2.drawPolygon( polygon1 );
    // these next methods all relate to button presses in he main AlgoApp class
    public void anim ( int animation )
         convex = 0;
         angle = 0;
         anchor = 0;
         if( animation == ANIMATION )
              threadSuspended = false;
    startAnimation();
         else if( animation == STOPANIM )
              threadSuspended = true;
    stopAnimation();
    public void anchor ( int anchorPoint )
         convex = 0;
         angle = 0;
         anchor = anchorPoint;
         repaint();
    public void angle ( int angleSort )
         convex = 0;
         angle = angleSort;
         repaint();
    public void step ( int stepByStep )
         convex = 0;
         step = stepByStep;
         nextStep++;
         repaint();
    public void buildConvex( int buildHull )
         angle = 0;
         build = buildHull;
         repaint();
    public void convex ( int convexHull )
         angle = 0;
         convex = convexHull;
         repaint();
    public void sliderValue( int slider )
         delay = slider;
    public void reset()
         complete = 0;
         anchor = 0;
         angle = 0;
         build = 0;
         convex = 0;
         step = 0;
         nextStep = 0;
         frameNumber = 0;
         start = 0;
         draw = 2;
         count = 2;
         val = 0;
         completeHull = false;
         // used to delete lineDraw array so it redraws from the start
         for( int i = 0; i < lineDraw.length; i++)
              lineDraw[i][0] = 0;
              lineDraw[i][1] = 0;
         repaint();
    *This is where Graham's Scan algorithm is
    // first we find the anchor point
    public void findAnchorPoint()
    int min = points[0].y;
    int max = points[0].x;
    int anchorPoint = 0;
    int anchorIndex = 0;
    for (int i = 0; i < points.length && points[i] != null; i++)
    if (points[i].y > min)
    min = points[i].y;
    max = points[i].x;
    anchorPoint = i;
    else if (points[i].y == min)
    if (points[i].x > max)
    min = points[i].y;
    max = points[i].x;
    anchorPoint = i;
    // puts the anchor point at the beginning of the array
    swapPoint( points, anchorPoint, anchorIndex );
    public void swapPoint( Point pointArray[], int first, int second )
    Point hold;
    hold = pointArray[ first ];
    pointArray[ first ] = pointArray[ second ];
    pointArray[ second ] = hold;
    public void swapDouble( double doubleArray[], int first, int second )
    double temp;
    temp = doubleArray[ first ];
    doubleArray[ first ] = doubleArray[ second ];
    doubleArray[ second ] = temp;
    public double[] arraySort(double sortArray[])
    for( int pass = 0; pass < sortArray.length; pass++)
    for(int i = 2; i < sortArray.length; i++)
    if(sortArray[i] > sortArray[i-1] )
    swapPoint(points, i, i-1);
    swapDouble(sortArray, i, i-1);
    return sortArray;
    // next we calculate the angles
    public void angleSort( Point arr2[] )
    double angleArray[] = new double[arr2.length];
    double orderArray[] = new double[arr2.length];
    int indexOfAngle = 0;
    // works out angle of every point with x0 and y0 as the anchor point
    for (int i = 0; i < arr2.length; i++) {
    double pointAngle = Math.atan2((arr2[i].y - arr2[0].y), (arr2[ i ].x - arr2[0].x));
    // if its on the line with the anchor point at 180 degrees, this equals PI.
    // to make this come last in the array change PI to minus PI
    if ( pointAngle == Math.PI)
    pointAngle = -Math.PI;
    angleArray[i] = pointAngle;
    // call sortArray to sort the array angularly
    orderArray = arraySort(angleArray);
         // finally we claculate the final convex hull
    public void convexHull(Point stackArr[] )
    float leftCheck;
    if ( start == 0 )
              S.push(stackArr[0]);
              S.push(stackArr[1]);
              start += 1;
         if ( draw < stackArr.length )
              Point pt1 = S.top();
              Point pt2 = S.secTop();
              leftCheck = isLeft(pt1,pt2,stackArr[draw]);
              if ( leftCheck > 0)
                   S.push(stackArr[draw]);
                   count++;
                   draw++;
              else
              S.pop();
              count--;
         if ( draw == stackArr.length )
    completeHull = true;
              // stack called temp is used to get elements output in the correct order
              ArrayStack temp = new ArrayStack(stackArr.length);
              for ( int counter = 0; counter < count; counter++ )
              Point tempPoint = S.pop();
              temp.push(tempPoint);
              // put the coordinate onto final convex hull array
              for (int j = 0; j < count; j++)
              convexHull[j] = temp.pop();
              draw++;
    // this testMeth is used to allow the Get Convex Hull button to work
    public void testMeth(Point stackArr[] )
    int count = 2;
    int i = 2 ;
    float leftCheck;
    ArrayStack S = new ArrayStack(stackArr.length);
    S.push(stackArr[0]);
    S.push(stackArr[1]);
    while ( i < stackArr.length)
    Point pt1 = S.top();
    Point pt2 = S.secTop();
    leftCheck = isLeft(pt1,pt2,stackArr[i]);
    if ( leftCheck > 0)
    S.push(stackArr[i]);
    count++;
    i++;
    else
    S.pop();
    count--;
    // stack called temp is used to get elements output in the correct order
    ArrayStack temp = new ArrayStack(stackArr.length);
    String testOutput = "\nConvex Hull = \n ";
    for ( int counter = 0; counter < count; counter++ )
    Point tempPoint = S.pop();
    temp.push(tempPoint);
    // put the coordinate onto final convex hull array
    for (int j = 0; j < count; j++)
    convexHull[j] = temp.pop();
    //==============================================================================
    // Copyright 2001, softSurfer (www.softsurfer.com)
    // This code may be freely used and modified for any purpose
    // providing that this copyright notice is included with it.
    // SoftSurfer makes no warranty for this code, and cannot be held
    // liable for any real or imagined damage resulting from its use.
    // Users of this code must verify correctness for their application.
    // This is a C++ implementation which I, Paul Wood have modified slighty
    // for use in Java (07/03/2005).
    // isLeft(): tests if a point is Left|On|Right of an infinite line.
    // Input: three points P0, P1, and P2
    // Return: >0 for P2 left of the line through P0 and P1
    // =0 for P2 on the line
    // <0 for P2 right of the line
    public float isLeft( Point P0, Point P1, Point P2 )
    return (P1.x - P0.x)*(P2.y - P0.y) - (P2.x - P0.x)*(P1.y - P0.y);
    //==============================================================================

  • Toggling btwn panels  -help w setup

    I'm trying to avoid using the mouse as much as I do, and was wondering if anyone knows how to avoid that when I have to click in each of my three open panels to edit code. I know Shift/Tab covers toggling btwn docs. I looked at the cs5 keyboard shortcuts and not found a solution. For my setup I have two standard monitors, with the Design view open on the left monitor, Code view for CSS is dragged to half the monitor on the right, with the  source code/ F10 panel occupying the other half. So I click in each one every time I want to edit, and I have to click in the Design view to scroll down and see the bottom, and I have to save each time before viewing the source code update, which also would be nice to stop. Lots of RMT I'd like to avoid. Does anyone have a solution? Thank you.

    Hello Lindsey,
    I was finally able to commit some time to this project today and I did make some progress. I decided to move all of the task creation elements out of the while loop and I also added the wait and stop function after the write function. Once I made the changes I just explained, the DAQ board started outputting pulses on Port0 Line 0. I decided to check the other lines and I was disappointed to see that only one of the lines was outputting any data.
    I am including a screen shot of the latest version of the block diagram below:
    Here is the front Panel:
    This is a screen shot of the scope that I am using to monitor the output lines:
    CH1 - Yellow - line 0
    CH2 - Green - line 1
    CH3 - Blue - Line 2
    CH4 - Orange - Clock Pulse for timing function
    As you can see, there is no data on line 1 or line 2. Could you provide me any insight as to why this might be happeneing? 
    The issue I was having with the mismatch of data types is when I fed my 2D U8 array in to a N sample N channel write function with the U8 data type selected and the error code I was recieving was 200565. I was able to resolve it by changing the write function to a 32 bit data type but I am uncertain why it reads a 2D U8 array as a 32 bit data source. 
    Thank you in advance for any help you might be able to provide. 
    ~ Randy 

  • Icloud control panel help!

    i have windows 8 on my pc..i cant get icloud  control panel to run .
    any help would be greatly appreciated.

    opps ...sorry i miss spoke.
    i have windows xp on my pc...
    my question is. Can i get the icloud to work with the xp?
    If not??????

  • LR4 Upgrade shows LR3 Tone Settings panel - Help!

    I just upgraded from LR3 to LR4 and migrated my photo catalogs to the LR4 version.  As I was working with my photos, I noticed the Tone Settings panel initially loads the new LR4 version (with Whites and Blacks) but, once the program is completely loaded, it displays the LR3 Tone Settings Panel (with Hightlights and Blacks).   Has anyone else run into this and how can it be fixed???
    Thanks in advance!
    Craig

    When you upgrade your existing LR3 catalog to LR4, all images in the catalog that had previous develop adjustments (so likely most of them) will retain the 2010 Process Version, and therefore will exhibit the LR3 controls in the Basic Panel. These can be upgraded to PV2012 (and thus to the new Basic Panel controls) as indicated by Michael.
    New images imported into the LR4 catalog will by default get PV2012, thus you'll see the new controls from the outset. On such images you can, if needed, revert back to PV2010 by selecting the option in the Camera Calibratiion panel.

  • Logging Panel (help!)

    Hi everyone,
    I want to add a logging panel to my frame. I want to use it in order to diplay text messages displayed by the program rather than printing it to the console.
    I don't know how to direct the text to this panel. Would plz tell me how to do this? or give me a reference to read?
    Many Thanks,
    Somaya

    I can't really understand why you want to redirect System.out/System.err ("printing to the console") if you are using a frame. Why print to the console instead of using GUI components only?
    However odd it may seem, I thought it would be a fun experiment so I created a panel class you can use:
    import javax.swing.*;
    import java.awt.*;
    import java.io.OutputStream;
    import java.io.PrintStream;
    import java.io.IOException;
    * Panel class that can intercept and redirect System.out and/or System.err to internal scrollable JTextArea.
    public class OutErrInterceptingPanel extends JPanel
        * @param interceptErrStream decides whether or not to intercept and redirect System.err to text area
        * @param interceptOutStream decides whether or not to intercept and redirect System.out to text area
       public OutErrInterceptingPanel(boolean interceptErrStream, boolean interceptOutStream)
          JTextArea logArea = new JTextArea();
          logArea.setEditable(false);
          setLayout(new BorderLayout());
          add(new JScrollPane(logArea), BorderLayout.CENTER);
          //Use fake/intercepting OutStream to connect PrintStream(-s) to JTextArea...
          OutputStream wrapper = null;
          if (interceptErrStream)
             wrapper = new StreamWrapper(logArea);
             System.setErr(new PrintStream(wrapper));
          if (interceptOutStream)
             if (wrapper == null)
                wrapper = new StreamWrapper(logArea);
             System.setOut(new PrintStream(wrapper));
        * Acts as an OutputStream but it intercepts all write calls and adds data to a JTextArea instead...
       private class StreamWrapper extends OutputStream
          private JTextArea outputSource;
          public StreamWrapper(JTextArea aOutputSource)
             outputSource = aOutputSource;
          public void write(int b) throws IOException
             //Convert and append to JTextArea (Note that append method is thread safe)
             if (b < 0)
                outputSource.append("?"); //Replace invalid char with a question mark
             else
                char[] chars = Character.toChars(b);
                for (int i = 0; i < chars.length; i++)
                   outputSource.append(Character.toString(chars));
    public void write(byte[] b) throws IOException
    for (int i = 0; i < b.length; i++)
    write(b[i]);
    public void write(byte[] b, int off, int len) throws IOException
    for (int i = off; i < off + len; i++)
    write(b[i]);
    And of course I also created a GUI application for testing the panel:
    import javax.swing.*;
    import java.awt.*;
    public class TextAreaLogger extends JFrame
       public TextAreaLogger(JPanel logPanel)
          super("Sample Application on how to use OutErrInterceptingPanel");
          getContentPane().add(new JLabel("See OutErrInterceptingPanel in action below:"), BorderLayout.NORTH);
          getContentPane().add(logPanel, BorderLayout.CENTER);
       public static void main(String[] args)
          //Create GUI on the event dispatching thread
          try
             SwingUtilities.invokeAndWait(new Runnable()
                public void run()
                   //Create intercepting panel (intercept System.out only) and use it in GUI
                   JPanel logPanel = new OutErrInterceptingPanel(false, true);
                   TextAreaLogger frame = new TextAreaLogger(logPanel);
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   frame.setSize(450, 400);
                   frame.setVisible(true);
          } catch (Exception e)
          //Print 25 lines to System.out 25 lines to System.err
          for (int i = 1; i <= 25; i++)
             System.out.println("This is a line "+ i +" written to System.out");
             System.err.println("This is a line "+ i +" written to System.err");
    }My implementation may not be the best way of redirecting System.out and System.err to a text area, but it sure was fun to do! =)
    Note. If I completely misinterpreted what you wanted help with - if all you really wanted was to know a litle bit about JTextArea - you may find this link useful (and you should probably just ignore the code above):
    http://java.sun.com/docs/books/tutorial/uiswing/components/text.html

  • Dreamweaver CS6 Insert Panel Help

    I am trying the 30 day Dreamweaver CS6 Creative Cloud and would like to know how to get the Text Bar in the Insert Panel. I currently have the following in my insert panel.
    Common
    Structure
    Media
    Form
    jQuery Mobile
    jQuery UI
    Templates
    Favorites
    I am new to Dreamweaver so any help is greatly appreciated.
    Thanks
    Mark

    If you have that set-up in the Insert panel, you're using Dreamweaver CC (version 13), not Dreamweaver CS6 (version 12).
    The Text category was removed from the Insert panel in Dreamweaver CC because it duplicated features that were available elsewhere. If you're looking for special characters, they're now at the bottom of the Common category in the Insert panel.

  • Dual scroll panels help!

    I used Flash Catalyst CS5.5 to create a feature with two links to popup windows that had scroll panels for text only (with a background). I was able to get the popups to function properly and the text scroll panels to function properly.
    Problem One: After publishing both projects and uploading, they are utilizing the same text. I tried putting one in a subdirectory, but that didn't work. What files can I rename to run both panels in the same directory?
    Problem Two: My panels both have cut off the text... how can I add it back? Is there a simple way to do that?
    I know this is probably an easy problem but Flash is new to me. Any help would be great!
    This is the page I'm working on:
    http://www.parkcity-dogtown.com/press.htm

    OK. I figured out how to separate the filenames. Thanks everyone for your help
    Now I need to edit the swf files to add text... Any help would be appreciated...

Maybe you are looking for

  • SAP NetWeaver ABAP 7.02 Trial Version - CPRXRPM

    Hello Experts, I have installed the "SAP NetWeaver ABAP 7.02 Trial Version" from SDN downloads and as you know it comes with SAP_ABA, SAP_Basis, PI_Basis, SAP_BW components. I still need CPRXRPM component. is it possible to add the CPRXRPM component

  • Transaction doesn't roll back to Oracle

              Hello, I would like to ask does webloogic support transaction controlled by client           which is out of container? My case is that i use UserTransaction in the client           application(not within bean). Bean methods (CMP) are invok

  • How do I change default volume for bluetooth heads...

    I've just set my e71 up with my car bluetooth system.  When I make a call the volume is too low.  Is there a way I can adjust the default volume on my phone for bluetooth headset calls - without affecting the normal volume?

  • Everythime I open a certain project in GarageBand, my MacBook freezes. Help?

    For instance I open up My Song 119 and it loads fine but then I press something in the GarageBand window and it gives me the spinning ball which causes my Mac to be unresponsive. But if I open another song from the finder folder, it works perfectly f

  • Common diemsions and more then one fact table join problem

    Hi, I have 5 common dimension and 3 fact table which in the same subject area. When I want to display results from more then one fact table sending database then query more then one and I think BI server join this two different result on OBI server.