PC Review


Reply
Thread Tools Rate Thread

Answer to 2 questions

 
 
Lloyd Sheen
Guest
Posts: n/a
 
      7th Mar 2008
I am posting this to answer two question that I had posted earlier. I do
this since I think it is good practice for those who ask to confirm if
others suggestions fix their problem or if the poster fixed the problem
thereselves.

First is a problem with creating a "progress" type animation during the
playing of media files.

To accomplish this I did the following:

Create the element (I used a <td>) as follows:

<td id="DurationTDPos" style=" text-align:center;
background-image: url(Images/Progress.png);
background-position-x: -325px;
background-repeat: repeat-y ">

The png file is 325px wide to match the length of the td. It is originally
positioned -325px to make it non-visible using the background-position-x
attribute. As the media plays you calculate the % of the media played and
move the background image accordingly.

if (WMP.controls.currentPosition > 0)
{
currentPercent = (WMP.controls.currentPosition /
curItem.duration) * 100;
one = 325 - Math.floor(325 * (currentPercent/100));
two = '-' + one;
three = two + 'px';
currentPXString = three;
DurationTR.style.backgroundPositionX =currentPXString ;
}

The second problem was that when I was using a repeater I used the
ItemCreated rather than the ItemDataBound. What happened was the first time
it executed all looked fine on the page. A subsequent execution caused the
page to skip the page_load event and the button_click event such that the
data was not bound on the second execution and the ItemCreated was called
first with no e.Item.DataItem.

Changing the event fixed this problem.

Thanks
Lloyd Sheen

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
View Questions and Answer to questions I created Roibn Taylor Microsoft Excel Misc 4 24th Jul 2008 12:05 AM
Does anyone ever answer questions here? Steve Windows XP Internet Explorer 2 5th Feb 2004 02:45 AM
Does anyone ever get an answer to their questions Windows XP Print / Fax 1 13th Nov 2003 04:28 AM
Re: Does anyone answer these questions? YoKenny Windows XP Internet Explorer 0 29th Oct 2003 12:29 AM
Does anyone answer these questions? AnnoyedByXP Windows XP Internet Explorer 0 28th Oct 2003 08:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:36 AM.