How to create your own Adobe Connect Custom Pods!

 

My current Pomodoro Timer Timer v11b

I need to work out how to hide the controls from Adobe Connect Meeting participants

Any advice would be appreciated!   rupert <dot> russell <at> acu.edu.au

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s.[1] The technique uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks. These intervals are named pomodoros, the plural in English of the Italian word pomodoro (tomato), after the tomato-shaped kitchen timer that Cirillo used as a university student.[2][3]

 

Thanks to easelsolutions for the following YouTube https://www.youtube.com/watch?v=oz4vRIBTy3k

You will need the Adobe Connect SDK http://www.adobe.com/devnet/adobeconnect/sdk-eula.html

You will also need Adobe FlashBuilder I am using Adobe® Flash® Builder™® 4.7

Part1 Flash Builder Project File which should include the source code for part1a

 

Screenshot of my first Custom Pod!

 

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Note the above flash file is built to read the username from the Adobe Connect meeting room so running
it in a browser causes it to report null: for the username

 

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

 

Timer v002 Timer v003 Timer v11.10

 

Resources and examples

Flex Countdown Timer with Warning Color/Expiration Event Posted on April 16, 2008 by Tim O'Brien

Creating a simple timer in Flex with the flash.utils.Timer class by Peter deHaan

 

https://discursive.com/2008/04/16/flex-countdown-timer-with-warning-colorexpiration-event/

 

Tutorials

Exercise 4.7: Creating and navigating application states

http://www.adobe.com/devnet/flex/videotraining/exercises/ex4_07.html

Create and apply view states

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf63611-7ffa.html

The <mx:State> tag has the following attributes:

  <mx:State    Properties    basedOn="null"    name="null"    overrides="null"    />    

The <mx:SetProperty> tag has the following attributes:

  <mx:SetProperty     Properties     name="null"     target="null"     value="undefined"    />    

https://www.lynda.com/ActionScript-tutorials/Welcome/268/21059-4.html

 

Other Pomodoro Timers

http://www.ilovefreesoftware.com/03/webware/free-pomodoro-timer-websites.html

http://www.online-stopwatch.com/pomodoro-timer/

 

 

Link to book ACU Online Copy

http://proquestcombo.safaribooksonline.com.ezproxy1.acu.edu.au/book/programming/flex/9780596516215/12dot-managing-state/ch12s08_html?uicode=austcathu

Chapter 12 Managing States:

 

http://shop.oreilly.com/product/9780596516215.do

 

How to Make a Mute Button in Flash CS4 (AS3)

https://www.youtube.com/watch?v=SbKcXr71mKU

 

Source Code

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="100%"
xmlns:components="com.adobe.sync.components.*"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init()">

<!-- Pomodoro timer ***************************************************************************************
Timer v011.10 Next step to get the program to switch from Work Time countdown to Rest Time Countdown
by Rupert Russell
rupert.russell@acu.edu.au
01 May 2017
Creative Commons Attribution 4.0 International License
https://creativecommons.org/licenses/by/4.0/

http://stackoverflow.com/questions/8446904/flex-timer-example
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf60546-7ff2.html#WS2db454920e96a9e51e63e3d11c0bf69084-7fa1
http://soundbible.com/1746-Ship-Bell.html
Attribution 3.0 | Recorded by Mike Koenig | File

Note I had to set the Project > Properties > Flex Build Path >

Next step to add rest time and to switch to rest time at the end of work time and back again.


Thanks to: Flex Countdown Timer with Warning Color/Expiration Event
Posted on April 16, 2008 by Tim O'Brien
https://discursive.com/2008/04/16/flex-countdown-timer-with-warning-colorexpiration-event/

Creating a simple timer in Flex with the flash.utils.Timer class by Peter deHaan
http://blog.flexexamples.com/2007/08/14/creating-a-simple-timer-in-flex-with-the-flashutilstimer-class/

Adobe Connect 8 Custom Pods, Part 1
Thanks to easelsolutions for the following YouTube https://www.youtube.com/watch?v=oz4vRIBTy3k
*************************************************************************************** -->

<mx:Script>
<![CDATA[
import com.adobe.sync.events.SyncSwfEvent;

[Embed(source="Bell.mp3")]
[Bindable]
public var sndCls:Class;

public var snd:Sound = new sndCls() as Sound;
public var sndChannel:SoundChannel;

public function playSound():void {
if(playSoundFlag == true){
sndChannel=snd.play();
}

}

public function stopSound():void {
sndChannel.stop();
}

protected function syncMessageReceived(event:SyncSwfEvent):void
{

if(event.data.msgNm =="WorkSeconds")
{
activity = "Work";
workSeconds = workMin.value * 60;
t.reset();
display (workSeconds, workTxt.text); // reset the display
startTimer();
}


if(event.data.msgNm =="WorkTextUpdate")
{
activity = "Work";
workTxt.text = event.data.msgVal;
display (workSeconds, workTxt.text); // reset the display
}

if(event.data.msgNm =="RestTextUpdate")
{
activity = "Rest";
restTxt.text = event.data.msgVal;
display (workSeconds, restTxt.text); // reset the display
}

if(event.data.msgNm =="Rest")
{
activity = "Rest";
restSeconds = restMin.value * 60;
t.reset();
display (restSeconds, restTxt.text); // reset the display
startTimer();
}


if(event.data.msgNm =="Expired")
{
t.stop();
t.reset();
workSeconds = 0;
display (0, " "); // reset the display

}

if(event.data.msgNm =="stop")
{
playSound();
t.stop();
}


if(event.data.msgNm =="start")
{
t.start();
}


if(event.data.msgNm =="restMinChange")
{
restMin.value = event.data.msgVal;
t.start();
}

if(event.data.msgNm =="workMinChange")
{
workMin.value = event.data.msgVal;
t.start();
}

if(event.data.msgNm =="workMinChange")
{
workMin.value = event.data.msgVal;
t.start();
}


if(event.data.msgNm =="toggleSound")
{
if(playSoundFlag == true){
playSoundFlag = false;
}
else
{
playSoundFlag = true;
}
}


}


private const TIMER_INTERVAL:Number = 10;

private var workSeconds:int;

private var restSeconds:int;

private var baseTimer:int;

private var t:Timer;

private var activity:String = "";

private var playSoundFlag:Boolean = false;

private function init():void {
t = new Timer(1000);
t.addEventListener(TimerEvent.TIMER, updateTimer);
}

// it's good practice to separate event handler from functional method
public function updateTimer(evt:TimerEvent):void {

if (activity == "Work"){
display (workSeconds - t.currentCount, workTxt.text);
if (workSeconds - t.currentCount < 1) {
display (0, workTxt.text); // reset the display
stopTimer();
connector.dispatchSyncMessage("Expired", 0, false);
}
}

if (activity == "Rest"){
display (restSeconds - t.currentCount, restTxt.text );
if (restSeconds - t.currentCount < 1) {
display (0, restTxt.text); // reset the display
stopTimer();
connector.dispatchSyncMessage("Expired", 900, false);
}
}
}

private function display ( count : int, label : String ) : void {
var minutes : int = count / 60; // divide by 60 to get the minutes
var seconds : int = count % 60; // use modulo operator to get the "rest"
var min : String = minutes < 10 ? "0" + minutes : "" + minutes; // add leading zero if necessary
var sec : String = seconds < 10 ? "0" + seconds : "" + seconds;
activityTxt.text = label;
counter.text = min + ":" + sec; // no need to cast to String if you use "" + something
}

private function startTimer():void {
t.start();

connector.dispatchSyncMessage("start", 0, false);
}

private function stopTimer():void {
playSound();
t.stop();
connector.dispatchSyncMessage("stop", 0, false);
}


public function Work():void {
activity = "Work";
workSeconds = workMin.value * 60;
t.reset();
display (workSeconds, workTxt.text); // reset the display
connector.dispatchSyncMessage("WorkSeconds", workSeconds, false);
connector.dispatchSyncMessage("WorkTextUpdate", workTxt.text, false);
startTimer();
}


public function Rest():void {
activity = "Rest";
restSeconds = restMin.value * 60;
workSeconds = 0;
t.reset();
display (restSeconds, restTxt.text); // reset the display
connector.dispatchSyncMessage("Rest", restSeconds, false);
connector.dispatchSyncMessage("RestTextUpdate", restTxt.text, false);

startTimer();
}

private function timeExpired():void {
t.stop();
t.reset();
workSeconds = 0;
display (0, restTxt.text); // reset the display
connector.dispatchSyncMessage("Expired", 0, false);
}

private function restMinChange(value : int):void
{
connector.dispatchSyncMessage("restMinChange", value, false);
}

private function workMinChange(value:int):void
{
connector.dispatchSyncMessage("workMinChange", value, false);
}

private function toggleSound(value:Boolean):void
{
if(value == true){
playSoundFlag = false;
}
else
{
playSoundFlag = true;
}
connector.dispatchSyncMessage("toggleSound", playSoundFlag, false);
}

]]>
</mx:Script>

<components:SyncConnector id="connector" syncMessageReceived="syncMessageReceived(event)" />


<mx:ApplicationControlBar dock="true">
<mx:Button label="Start timer" click="startTimer()" />
<mx:Button label="Stop timer" click="stopTimer()" />
<mx:Button label="Sound" click="toggleSound(playSoundFlag)" toggle="true" />

</mx:ApplicationControlBar>


<!-- Work & Rest settings -->

<mx:Label id="activityTxt" fontSize="50" />
<mx:Label id="counter" fontSize="127" />

<mx:HBox width="100%" visible="true" enabled="true" >
<mx:Label id="workLabel" text="Work Mins:" />

<mx:HSlider id="workMin"
minimum="1" maximum="60" value="25"
dataTipPlacement="top"
tickColor="black"
snapInterval="1" tickInterval="10"
labels="[1,60]"
allowTrackClick="true"
liveDragging="true"
change="workMinChange(workMin.value);" />


<mx:TextInput id="workTxt" text="Work" width="20%" />
<mx:Button label="Work" click="Work()" />
</mx:HBox>


<mx:HBox width="100%" visible="true" enabled="true" >
<mx:Label id="restLabel" text="Rest Mins:" />

<mx:HSlider id="restMin"
minimum="1" maximum="60" value="5"
dataTipPlacement="top"
tickColor="black"
snapInterval="1" tickInterval="10"
labels="[1,60]"
allowTrackClick="true"
liveDragging="true"
change="restMinChange(restMin.value);"/>

<mx:TextInput id="restTxt" text="Rest" width="20%" />
<mx:Button label="Rest" click="Rest()" />

</mx:HBox>
</mx:Application>

 

http://docplayer.net/docview/58/41432467/#file=/storage/58/41432467/41432467.pdf

http://stackoverflow.com/questions/375100/flex-when-hiding-components-in-flex

Other Interesting Custom Pods

http://www.adobe.com/devnet/adobeconnect/articles/surveyswf.html