Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Dec 2014
    Location
    Arkansas, USA
    Posts
    133

    Default Slider / Calendar ... How would I do this in Xara?

    Our local beekeepers association has a meeting on the first Monday of each month. On the business site of one of my customers I have what I've called a "slider".

    In December of each year, I go in and set it up for the entire succeeding year such that at midnight on the first Monday of each month, the slider will show the date for the NEXT meeting. For instance, today the slider says:

    "-REMINDER- The next meeting of The Southeast Arkansas Beekeepers Association will be on Monday June 6, 2016 at the Crossett Public Library"

    At midnight on June 6, 2016, it will change to:

    ""-REMINDER- The next meeting of The Southeast Arkansas Beekeepers Association will be on Monday July 4, 2016 at the Crossett Public Library""
    (of course, it will need to be rescheduled, but they are deciding on a new date).

    Is there a way to set up something similar in Xara without me resorting to having to write a special javascript. I used to do things like this in Flash, but it seems mobile devices are lost when I use flash these days. I can code "un petit peu", but really don't think I want to dig in ... it's why I have started using WYSIWYG web page editors.

    Thanks in advance for any help given.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,879

    Default Re: Slider / Calendar ... How would I do this in Xara?

    There is nothing in Xara that can do this directly.

    JavaScript code for this could be very simple and used to good benefit for a number of TGers.

    You could just use a pop-up to show the calendar dates and locations.

    You could embed something from Google Sheets.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,932

    Default Re: Slider / Calendar ... How would I do this in Xara?

    I used to do things like this in Flash
    Dijenga, you can create your script in flash, export it as swf, convert it to html5 via Google Swiffy, and place the resultant html file in a placeholder in Xara. Not all things work via Swiffy but this does.

    Here's the AS I used, not complete of course, just enough to prove it worked:

    var dateNo1=20160502;
    var dateNo2=20160606;
    var dateNo3=20160704;
    var dateNo4=20160801;
    var date1="2nd May 2016";
    var date2="6th June 2016";
    var date3="4th July 2016";
    var dater="1st August 2016";

    var today_dateate = new Date();
    var date_str:String = (today_date.getDate()+"/"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());

    var date_str_year = today_date.getFullYear();
    var date_str_month = today_date.getMonth() + 1;
    if (date_str_month<=9) {
    date_str_month="0" + date_str_month;
    }
    var date_str_date = today_date.getDate();
    if (date_str_date<=9) {
    date_str_date="0" + date_str_date;
    }

    var dated = date_str_year + "" + date_str_month + "" + date_str_date;
    compStart="-REMINDER- The next meeting of The Southeast Arkansas Beekeepers Association will be on Monday ";
    compEnd=" at the Crossett Public Library ";

    if (dated<dateNo1) {
    var comp=compStart + date1 + compEnd;
    } else if (dated<dateNo2) {
    comp=compStart + date2 + compEnd;
    } else if (dated<dateNo3) {
    comp=compStart + date3 + compEnd;
    } else if (dated<dateNo4) {
    comp=compStart + date4 + compEnd;
    }
    EDIT: The forum is converting Colon D in the script above into a smiley face!
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,879

    Default Re: Slider / Calendar ... How would I do this in Xara?

    Here is a JavaScript solution: Monthly Venue Informer.web

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  5. #5
    Join Date
    Dec 2014
    Location
    Arkansas, USA
    Posts
    133

    Default Re: Slider / Calendar ... How would I do this in Xara?

    Thanks Acorn, I will try it later today. Right now, trying to get through to support at Sourcetec and see why Quicker isn't exporting to html5 --- I'm supposed to be able to create the flash file now and export as an html5 animation.

    So far, it isn't working at all.

  6. #6
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: Slider / Calendar ... How would I do this in Xara?

    Most, if not all, Flash->HTML converters cannot cope with actionscript custom coding.

  7. #7
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,932

    Default Re: Slider / Calendar ... How would I do this in Xara?

    Not quite true Paul, swiffy converts the AS code I supplied earlier in this thread.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  8. #8
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: Slider / Calendar ... How would I do this in Xara?

    Quote Originally Posted by Egg Bramhill View Post
    Not quite true Paul, swiffy converts the AS code I supplied earlier in this thread.
    That's interesting. Your code is probably runnable as javascript. I'll have an experiment sometime on some of my old swfs.

  9. #9
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,932

    Default Re: Slider / Calendar ... How would I do this in Xara?

    It's not far off JS Paul. Here's the same code written as JavaScript.

    <div id="venue">You should have seen the upcoming Venue appear here</div>
    <script>

    var dateNo1=20160502;
    var date1="2nd May 2016";

    var dateNo2=20160606;
    var date2="6th June 2016";

    var dateNo3=20160704;
    var date3="4th July 2016";

    var dateNo4=20160801;
    var date4="1st August 2016";


    var today_date = new Date();
    year_now=today_date.getFullYear();
    month_now=today_date.getMonth();
    month_now=month_now + 1;
    if (month_now<=9) {
    month_now="0" + month_now;
    }

    date_now=today_date.getDate();
    if (date_now<=9) {
    date_now="0" + date_now;
    }

    var date_string = (year_now+month_now+date_now);

    var compStart="-REMINDER- The next meeting of The Southeast Arkansas Beekeepers Association will be on Monday ";
    var compEnd=" at the Crossett Public Library ";

    if (Number(date_string)<dateNo1) {
    var comp=compStart + date1 + compEnd;
    } else if (Number(date_string)<dateNo2) {
    comp=compStart + date2 + compEnd;
    } else if (Number(date_string)<dateNo3) {
    comp=compStart + date3 + compEnd;
    } else if (Number(date_string)<dateNo4) {
    comp=compStart + date4 + compEnd;
    }

    //alert(comp);

    document.getElementById("venue").innerHTML = comp;

    </script>
    Attached Files Attached Files
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  10. #10
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,879

    Default Re: Slider / Calendar ... How would I do this in Xara?

    Here is a more generalised version for use in a host of situations: Day Date Venue Informer.web

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •