
05-04-08, 06:55
|
|
Junior Member
|
|
Join Date: Mar 2008
Posts: 6
Rep Power: 0
|
|
|
Flag videos while playing
|
|
Hi,
I am currently developing a video recording system using flash cs3 with as3. The videos are listed on myDataGrid and i am able to tag video, while recording and when i hit the send button the video along with the tags gets added to the "tag" column on myDataGrid.
I wanted to add a new colum called "flagged" in order to flag a video while playing.
/////here is the "send" function////
public function send()
{
//collect SO data and send
//only set if not 0
if(getDuration() != 0)
{
m_iDuration = getDuration();
}
////trace("===========type "+m_sType)
m_userObject = new Object();
m_userObject.duration = m_iDuration;
m_userObject.session = m_sSession;
/*
m_userObject.bBitmap = new ByteArray();
m_userObject.bBitmap.objectEncoding = 0;
m_userObject.bBitmap = m_bitmapData;
*/
m_userObject.bitmapuri = m_sBitmapUri;
//convert the date to a string in format DD/MM HH:MM
var dateString:String = new String();
if(m_dDate.getDate()<10) dateString += "0"+m_dDate.getDate()
else dateString += m_dDate.getDate()
dateString += "/";
if(m_dDate.getMonth()<10) dateString += "0"+m_dDate.getMonth()
else dateString += m_dDate.getMonth()
dateString += " ";
if(m_dDate.getHours()<10) dateString += "0"+m_dDate.getHours()
else dateString += m_dDate.getHours()
dateString += ":";
if(m_dDate.getMinutes()<10) dateString += "0"+m_dDate.getMinutes()
else dateString += m_dDate.getMinutes()
//into SO object
m_userObject.date = dateString;
m_userObject.type = m_sType;
m_userObject.flag = m_sFlag;
//stop the audio and camera attachements
m_netStream.attachAudio(null);
m_netStream.attachCamera(null);
//stop recording
m_netStream.close();
//stop the timers
m_timeoutTimer.stop();
m_durationTimer.stop();
//publish everything now
//post event SENDING
dispatchEvent(new Event(Record.SENDINGDATA));
}
///////here is the flag function on the Record class////////
public function setSharedDataFlag(sFlag:String)
{
m_sFlag = m_sFlag+" "+sFlag;
}
public function setSharedDataFlagRemove(sFlag:String)
{
m_sFlag = StringUtils.remove(m_sFlag,sFlag,false);
m_sFlag = StringUtils.removeExtraWhitespace(m_sFlag);
}
//////////here is the function when the flag button is clicked//////////
function flagClick (pEvt:MouseEvent):void
{
if(pEvt.target.textColor == 0x8E9ECE)
{
pEvt.target.textColor = 0xffffff
myrecord.setSharedDataFlagRemove(pEvt.target.text) ;
}
else
{
pEvt.target.textColor = 0x8E9ECE;
myRecord.setSharedDataFlag(pEvt.target.text);
}
}
//////////here is my play function///////
public function play(sSession:String,iDuration:int)
{
trace("player::play "+sSession)
m_video.clear();
m_netStream.play(sSession);
m_iDuration = iDuration;
}
i am not sure how to send the "flag" while playing
If anyone could help me ill be grateful...
Thanks |
|