帮忙呀!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

bj890 2009-04-22 01:23:08
...全文
298 40 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
40 条回复
切换为时间正序
请发表友善的回复…
发表回复
zjybushiren88888 2009-04-23
  • 打赏
  • 举报
回复
[Quote=引用 28 楼 wanghao3616 的回复:]
http://bbs.blueidea.com/thread-2682812-1-1.html
“火山音乐播放器”三部曲,它们分别是:

1,FLASH+WMP播放FLASH本身无法播放的音乐格式和视频格式。
→参考教程:http://bbs.blueidea.com/thread-2677496-1-1.html
→源文件:http://www.huoshan.org/shiyan/flash_wmp/flash_wmp.rar

2,FLASH+SwiftMP3波谱同步。
→参考教程:http://space.flash8.net/bbs/thread-307160-1-1.html
→源文件:http://www.h…
[/Quote]

up
bj890 2009-04-23
  • 打赏
  • 举报
回复
谢谢老大!
Allen_Chen_ 2009-04-23
  • 打赏
  • 举报
回复
已经告诉你怎么做了自己又不试。我已经无语了。
花半小时给你写了个简单例子(答案中左右以你为参照):
http://allencloud.cloudapp.net/SL_MovieMarkerTestPage.aspx

首先用Expression Encoder来设置一些Marker.比如第一个marker的value设置为:熊向哪里看?|左边|右边|左边

encode好这个wmv以后写Silverlight代码:

<UserControl x:Class="SL_MovieMarker.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="1400" Height="1300">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel>
<StackPanel x:Name="QA">
<TextBlock Text="{Binding Question}"></TextBlock>
<RadioButton GroupName="g1" Content="{Binding First}">
</RadioButton>
<RadioButton GroupName="g1" Content="{Binding Second}">
</RadioButton>
<Button Width="100" Height="40" Content="递交" Click="Button_Click"></Button>
<TextBlock x:Name="TextBlock1"></TextBlock>

</StackPanel>

<MediaElement x:Name="MediaElement1"
Width="400" Height="300"
Source="Bear.wmv" AutoPlay="True" MarkerReached="MediaElement1_MarkerReached"
></MediaElement>

</StackPanel>
</Grid>
</UserControl>


public partial class Page : UserControl
{
QA qa = new QA();
public Page()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(Page_Loaded);
}

void Page_Loaded(object sender, RoutedEventArgs e)
{
this.DataContext = qa;
this.QA.Visibility = Visibility.Collapsed;
}

private void MediaElement1_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
{
MediaElement1.Pause();
this.QA.Visibility = Visibility.Visible;
string[] data=e.Marker.Text.Split('|');
qa.Question= data[0];
qa.First = data[1];
qa.Second = data[2];
qa.Answer= data[3];
}

private void Button_Click(object sender, RoutedEventArgs e)
{
foreach (UIElement ui in QA.Children)
{
RadioButton rb = ui as RadioButton;
if (rb != null&&rb.IsChecked==true)
{
if (rb.Content.ToString() == qa.Answer)
{
MediaElement1.Play();
this.QA.Visibility = Visibility.Collapsed;
}
else {
HtmlPage.Window.Alert("错了!");
}
}

}

}
}
public class QA : INotifyPropertyChanged
{
string _question;
string _first;
string _second;
string _answer;

public string Question
{
get { return _question; }
set
{
_question = value;
Notify("Question");
}

}
public string First
{
get { return _first; }
set
{
_first = value;
Notify("First");
}
}
public string Second
{
get { return _second; }
set
{
_second = value;
Notify("Second");
}
}
public string Answer
{
get { return _answer; }
set
{
_answer = value;
Notify("Answer");
}
}




void Notify(string propertyName) {
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;


}
bj890 2009-04-23
  • 打赏
  • 举报
回复
兄弟们呀!
readfuture 2009-04-23
  • 打赏
  • 举报
回复
友情帮顶
sohighthesky 2009-04-22
  • 打赏
  • 举报
回复
up up 不害羞
bj890 2009-04-22
  • 打赏
  • 举报
回复
up
ztlacc2008 2009-04-22
  • 打赏
  • 举报
回复
不会,不过还是很关注!
bj890 2009-04-22
  • 打赏
  • 举报
回复
有例子吗。
makun0624 2009-04-22
  • 打赏
  • 举报
回复
UP UP
vlysses 2009-04-22
  • 打赏
  • 举报
回复
一个方法:视频分成多段,每段配一段显示内容,拖拽时从当前段的开始播放即可
llsen 2009-04-22
  • 打赏
  • 举报
回复
还要跳转,,
==帮你看
wanghao3616 2009-04-22
  • 打赏
  • 举报
回复
http://bbs.blueidea.com/thread-2682812-1-1.html
“火山音乐播放器”三部曲,它们分别是:

1,FLASH+WMP播放FLASH本身无法播放的音乐格式和视频格式。
→参考教程:http://bbs.blueidea.com/thread-2677496-1-1.html
→源文件:http://www.huoshan.org/shiyan/flash_wmp/flash_wmp.rar

2,FLASH+SwiftMP3波谱同步。
→参考教程:http://space.flash8.net/bbs/thread-307160-1-1.html
→源文件:http://www.huoshan.org/shiyan/flash_boxing/flash_boxing.rar

3,FLASH+LRC歌词同步。
→参考教程:http://bbs.blueidea.com/viewthread.php?tid=2205817&page=1
peng_weida 2009-04-22
  • 打赏
  • 举报
回复
mark
冬你个冬 2009-04-22
  • 打赏
  • 举报
回复
有难度 这个不好弄啊
Allen_Chen_ 2009-04-22
  • 打赏
  • 举报
回复
可能还要用到Expression Encoder:
http://www.microsoft.com/expression/products/overview.aspx?key=encoder
bj890 2009-04-22
  • 打赏
  • 举报
回复
up
Allen_Chen_ 2009-04-22
  • 打赏
  • 举报
回复
很容易的东西,用Silverlight做。
bobo_包子 2009-04-22
  • 打赏
  • 举报
回复
友情帮顶!
chenchangan6 2009-04-22
  • 打赏
  • 举报
回复
up
加载更多回复(18)

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧