Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Поиск рулит! Сообщения за день Все разделы прочитаны
 

Вернуться   Форум Flasher.ru > Архив Flasher.ru > Flash > Advanced

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 07.10.2004, 11:58
Andrew Drone вне форума Посмотреть профиль Отправить личное сообщение для Andrew Drone Найти все сообщения от Andrew Drone
  № 1  
Andrew Drone
 
Аватар для Andrew Drone

Регистрация: Aug 2004
Адрес: Харьков, Украина
Сообщений: 31
Отправить сообщение для Andrew Drone с помощью ICQ
По умолчанию управление импортированным Avi

Допустим я импортировал movie.avi

Как можно осуществить: воспроизведение, паузу, остановку, изменить скорость воспроизведения, перемотку к какому-либо кадру/секунде, и как эти события отследить?

И еще один вопрос: при импортировании Флэш автоматически кидает на Таймлайн, т.е. разбивает по кадрам и выделяет соответственно энное количество кадров под него. Это можно как-нибудь обойти?

Старый 07.10.2004, 12:06
dee2 вне форума Посмотреть профиль Отправить личное сообщение для dee2 Найти все сообщения от dee2
  № 2  
dee2
 
Аватар для dee2

Регистрация: May 2003
Адрес: Moscow
Сообщений: 957
Отправить сообщение для dee2 с помощью ICQ
для чего всё это? интернет или локально?

Старый 07.10.2004, 13:24
Andrew Drone вне форума Посмотреть профиль Отправить личное сообщение для Andrew Drone Найти все сообщения от Andrew Drone
  № 3  
Andrew Drone
 
Аватар для Andrew Drone

Регистрация: Aug 2004
Адрес: Харьков, Украина
Сообщений: 31
Отправить сообщение для Andrew Drone с помощью ICQ
Организация интерактивного "руководства пользователя", поставляемого в комплекте с программой. Выполняется, естественно, локально. Имхо, тащить из инета метров 20 никто не будет.

Предвосхищая вопросы, скажу, что работать все должно именно с видеофайлом, а не статическими картинками и покадровой анимацией.

Старый 07.10.2004, 13:41
dee2 вне форума Посмотреть профиль Отправить личное сообщение для dee2 Найти все сообщения от dee2
  № 4  
dee2
 
Аватар для dee2

Регистрация: May 2003
Адрес: Moscow
Сообщений: 957
Отправить сообщение для dee2 с помощью ICQ
используй Macromedia Director

Старый 07.10.2004, 13:48
Andrew Drone вне форума Посмотреть профиль Отправить личное сообщение для Andrew Drone Найти все сообщения от Andrew Drone
  № 5  
Andrew Drone
 
Аватар для Andrew Drone

Регистрация: Aug 2004
Адрес: Харьков, Украина
Сообщений: 31
Отправить сообщение для Andrew Drone с помощью ICQ
Дело в том, что я в какой-то флэшке видел такую реализацию, но тогда не обратил внимания. Вчера перерыл весь винт, но именно эту не нашел.

Стало быть это реализуемо средствами Flash MX, но вот как именно - пока нерешенный вопрос


Р.S. нечто подобное можно наблюдать в скринсейвере Hitman Contracts, но там, по-моему, все-таки покадровая анимация


Последний раз редактировалось Andrew Drone; 07.10.2004 в 13:50.
Старый 07.10.2004, 14:09
dee2 вне форума Посмотреть профиль Отправить личное сообщение для dee2 Найти все сообщения от dee2
  № 6  
dee2
 
Аватар для dee2

Регистрация: May 2003
Адрес: Moscow
Сообщений: 957
Отправить сообщение для dee2 с помощью ICQ
Реализуемо - не значит оптимально
Вот например, как отслеживаются и контролируются события в Director (mpegAdvance xTra).
Flash по возможностям близко не стоит.

sprite(x).play() - Used to start or resume playback of a Media file. Playback is usually started automatically when the sprite is loaded, unless the "Paused at Start" option is checked.
Example:
sprite(1).play()

sprite(x).pause() - Used to pause playback of a Media file.
Example:
sprite(1).pause()

sprite(x).seek(time) - Seeks the video to a different time in the Media file, and pauses the video. Time should be expressed in milliseconds.
Example:
sprite(1).seek(15000)

sprite(x).stepForward() - Moves the video playback position one frame forward.
Example:
sprite(1).stepForward()

sprite(x).stepBack() - Moves the video playback position one frame backward.
Example:
sprite(1).stepBack()

sprite(x).playsegment(starttime, endtime) -Plays a segment of the Media file. Please note that using this option actually limits access to the times of the stream that falls outside the playback segment boundaries. You should use another playSegment() command to seek to a different time on the stream.
Example:
sprite(2).playSegment(10000, 25000)

sprite(x).isPastCuePoint(cuepointindex) - Returns TRUE if the cue point indicated has already passed, FALSE otherwise. The Xtra only supports this function used with cuepoint indexes, not names.
Lingo example:
sprite(1).isPastCuePoint(2)
put the result
-- 1

member(x).addCuePoint( cuepointtime, cuepointname) - This function can be used to create a new cue point from scripting. Cue points are automatically sorted.
Example:
member("mpegfile").addcuepoint(10500, "NewCue")

member(x).removeCuePoint(cuepointindex) - This function can be used to remove a cue point. You should supply the index of the cue point to be removed.
Example:
member(x).removecuepoint(2)

member(x).canPlayVideo() - Returns 1 (TRUE) or 0 (FALSE). Can be used to determine if a given member can be played in the system, and it is useful to test for system capabilities if you are planning for example to play MPEG2 or MPEG4 content. IMPORTANT: on the Macintosh the function member(x).quicktimeversion() should be used to test for the capability to play MPEG4 videos. Attempting to play or query some MPEG4 files when Quicktime 5 is installed can produce a type 10 error.
Lingo example:
member(1).canPlayVideo()
if the result=0 then
alert("Member 1 can not be played")
else
--nothing
end if

member(x).canImageOffScreen() - Returns 1 (TRUE) or 0 (FALSE). Can be used to determine if non direct-to-stage playback and access to the image of sprite object is possible in the system. Older versions of the DirectShow engine (released before DirectX 7.1) can play MPEG1 files, but do not allow access to the data necessary for offscreen imaging. In this case the MPEG file will still play correctly in DTS mode, which is set automatically by the Xtra.
Lingo example:
member(1).canImageOffScreen()
if the result=0 then
alert("DTS playback is disabled for member 1")
else
--nothing
end if

member(x).quicktimeversion() - This function can be used to test for the presence of Quicktime 6 on the Macintosh, and enable playback of MPEG4 files. Possible return values are the version of Quicktime installed (3.01 or 6.02 for example) or FALSE (0). On Windows the return value is always 0.
Lingo example:
put member(2).quicktimeversion()
-- 6.00

member(x).scanFile() - This function can be used to extract the correct duration and dimensions of a video file when the linked media is changed via scripting. The file is queried and the castmember properties are updated automatically. This function is usually not necessary for the typical operation of the Xtra.
Example:
member(2).scanfile()

member(x).register(registrationnumber) -This function can be used in Projectors to register the Xtra at runtime, and allow developers to save linked casts. It is not necessary for the normal operation of the Xtra.
Example:
member("mpegfile").register("SERIALNUMBERHERE")
Image - Gets the current video frame as an image object, ready to be used with imaging Lingo functions. The image of sprite is only available on Windows if the canImageOffScreen() member function returns true and the sprite is playing in non-dts mode.
Example:
myimg = sprite(1).image

Currenttime - The current position of the Media file, in milliseconds.
Lingo example:
put sprite(1).currenttime
-- 22345

Rate - The playback rate Media file. The Xtra supports rates between 0 and 2 (reverse playback is not supported.) The movierate can also be used to play or pause the media, setting it to 1 or 0.
Lingo example:
put sprite(1).rate
-- 1

Movietime - The current position of the Media file, in milliseconds. This has the same value as the currenttime of sprite property.
Lingo example:
put sprite(1).movietime
-- 22345

Movierate - The playback rate Media file. This has the same value as the rate of sprite property.
Example:
sprite(1).movierate = 0.5

Mediabusy - Indicates whether the Media file is playing. Possible values are 0 (FALSE) and 1 (TRUE).
Lingo example:
put sprite(1).mediabusy
-- 1

MostRecentCuePoint - The index of the last cue point passed. Consult Director's documentation for additional info on this property.
Lingo example:
put the mostrecentcuepoint of sprite 1
-- 2

Duration - The duration of the Media file, in milliseconds. Can only be retrieved, not set.
Lingo example:
put sprite(1).duration
-- 100000

Volume - The current volume of the Media file, in a linear scale from 0 to 255. Can be tested and set.
Example:
sprite(1).volume = 128

Visible - Hides or shows the sprite window. Can be tested and set, and is useful to prevent black flashes at the beginning or end of media playback on Windows.
Example:
sprite(1).visible = false
Filename - the complete pathname of the linked media file.
Lingo example:
put member(1).filename
-- "C:\myfiles\myfile.mpg"
JavaScript syntax example:
trace member(1).filename
//"C:\myfiles\myfile.mpg

Duration - the duration of the linked Media file in milliseconds.
Lingo example:
put member(1).duration
-- 45200

Videowidth - the original encoded width of the linked Media file, in pixels. This is a read-only property.
Lingo example:
put member(1).videowidth
-- 320

Videoheight - the original encoded height of the linked Media file, in pixels. This is a read-only property.
Lingo example:
put member(1).videoheight
-- 240

Volume - The default audio volume to be used during playback of new Xtra sprites. Values range from 0 to 255, expressed linearly. The sprite volume property may be used when you want to modify the volume of a sprite that is already on the stage.
Lingo example:
put member(1).volume
-- -10

Balance - The default audio balance to be used during playback of new Xtra sprites. Values range from -100 to 100. The sprite balance property may be used when you want to modify the balance of audio of a sprite that is already on the stage. This property is only available on Windows.
Lingo example:
put member(1).balance
-- 0

Rate - The default playback rate to be used during playback. Values range from 0 to 2, expressed in percentage of the original playback rate. The sprite function rate may be used when you want to modify the rate of playback of a sprite that is already on the stage.
Lingo example:
member(1).rate = 0.5

Cpuboost - On Windows, Mpeg Advance Xtra can slow down Director to allow more CPU time for the DirectShow driver. This can be useful if you are experiencing poor or stuttering playback on older machines. Legal values are in the range of 0 to 95 percent, although values over 80 may result in problems with the performance of your Director animation and/or scripting event detection.
Lingo example:
member(1).cpuboost = 50

Toolbar - Indicates whether a toolbar is attached to the video window. Possible values are 0 (FALSE) or 1 (TRUE).
Lingo example:
member(1).toolbar = true

Loop - Indicates whether the linked Media file will loop automatically. Possible values are 0 (FALSE) or 1 (TRUE).
Lingo example:
member(1).loop = false

PlaySegment - Indicates whether only a segment of the Media file is to be played. Possible values are 0 (FALSE) and 1 (TRUE).
Lingo example:
member(1).playsegment = true

Starttime - Specifies the start time of the Media file to be played, in milliseconds. Only active if "the playsegment of the member" is TRUE.
Lingo example:
member(1).starttime = 10700

EndTime - Specifies the end time of the Media file to be played, in milliseconds. Only active if "the playsegment of the member" is TRUE.
Lingo example:
member(1).endtime = 45000

PausedAtStart - Indicates whether the Media file should be opened in "paused" state. Possible values are 0 (FALSE) and 1 (TRUE).
Lingo example:
member(1).pausedatstart= 0

DTS - Indicates whether the Media file will be played in direct-to-stage mode. Disabling DTS allows compositing of the sprite with other elements of the stage, including the possibility to distort the sprite using quads and skew, and enables Director inks to be used. The drawback is a severe performance penalty on older systems. The default value is for sprites to play with DTS enabled. Possible values are 0 (FALSE) and 1 (TRUE). Non dts playback is also not available on older Windows systems. Consult the canImageOffScreen() member function for more information on this topic.
Example:
member(1).dts= 0

CuePointTimes - Contains a list of the cue point times associated with this member.
Lingo example:
put member(1).cuepointtimes
-- [4500,12300,34650,67321]

CuePointNames - Contains a list of the cue point names associated with this member.
Lingo example:
put member(1).cuepointnames
-- ["Cue 1","NewCuePoint","Start Point","Second part"]

Старый 07.10.2004, 14:31
Andrew Drone вне форума Посмотреть профиль Отправить личное сообщение для Andrew Drone Найти все сообщения от Andrew Drone
  № 7  
Andrew Drone
 
Аватар для Andrew Drone

Регистрация: Aug 2004
Адрес: Харьков, Украина
Сообщений: 31
Отправить сообщение для Andrew Drone с помощью ICQ
мдя... вот теперь я действительно озадачен...

Тем не менее спасибо.

Ладно, буду искать решение дальше, если найду какой-нибудь более удобоваримый способ, обязательно сообщу.

Создать новую тему   Часовой пояс GMT +4, время: 14:45.
Быстрый переход
  « Предыдущая тема | Следующая тема »  
Опции темы
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 14:45.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.