![]() |
|
||||||||||
|
|||||
|
[+1.3 05.04.09]
|
кароче трабала втом что скрипт почемуто все время загружает image2 хотя стоит чтобы он грузил по рандому
может я парь подсожите --------------------------------------------- _root.onLoad = function() { var i = 0; }; loadMovieNum("/image0.jpg", 1); setInterval(_root.onEnterFrame=function () { unloadMovie(["image"+i+".jpg"]); i = random(10); loadMovieNum(["/image"+i+".jpg"], 1); }, 1000); ----------------------------------------------------- Заранее благодарен
__________________
Бойтесь китайцев, компы приносящих! |
|
|||||
|
[+1.3 05.04.09]
|
помучался еще но серовно не грузит
вот новая версия скрипта ---------------------------------------------------- i = 0; _root.onEnterFrame = function() { d = i; i = random(9); if (d == i) { i = i+1; unloadMovieNum(1); loadMovieNum(["image"+i+".jpg"], 1); } else { unloadMovieNum(1); loadMovieNum(["image"+i+".jpg"], 1); } }; ----------------------------------------------------
__________________
Бойтесь китайцев, компы приносящих! |
|
|||||
|
Регистрация: Jan 2002
Адрес: СПб-Denver-Лермонтов
Сообщений: 1,525
|
Попробуй:
__________________
Для того чтобы узнавать, есть два способа: - задавать вопросы и пытаться самому на них ответить. Второй способ более продуктивный. (S.Wizard) |
|
|||||
|
[+1.3 05.04.09]
|
грузит то грузит только мне надо чтобы каждые 10 - 20 секунд загружался новый image
но серовно спасиба
__________________
Бойтесь китайцев, компы приносящих! |
|
|||||
|
Регистрация: Jan 2002
Адрес: СПб-Denver-Лермонтов
Сообщений: 1,525
|
Ну, сделай интервал не 1000, а 10000 или 20000. В чем проблема?
__________________
Для того чтобы узнавать, есть два способа: - задавать вопросы и пытаться самому на них ответить. Второй способ более продуктивный. (S.Wizard) |
|
|||||
|
[+1.3 05.04.09]
|
вот этот скрипт не работает
--------------------------------------- function load() { i = random(10); _root.loadMovie("image"+i+".jpg", i); } setInterval(load, 1000); --------------------------------------- не листает серовно да если даже листает он может загрузить два раза один и тодже image а должно быть условие ну как у меня во втором сообшении
__________________
Бойтесь китайцев, компы приносящих! |
|
|||||
|
Регистрация: Jan 2002
Адрес: СПб-Denver-Лермонтов
Сообщений: 1,525
|
Как только начнешь писать по-русски грамотно и с большим уважением к языку, - все у тебя получится.
Рэндом - то есть "случайно" - это значит, что значение может быть "ЛЮБЫМ" из назначенных. И random(10) = 3 == random(10)=3 - это запросто может быть. Хочешь исключений, - используй Arrray с исключением. Но, это - более заморочестей.
__________________
Для того чтобы узнавать, есть два способа: - задавать вопросы и пытаться самому на них ответить. Второй способ более продуктивный. (S.Wizard) |
|
|||||
|
Регистрация: Nov 2001
Адрес: spb.ru
Сообщений: 177
|
2 sergwizard
А зачем ты в во второй параметр метода loadMovie суешь число, в чем фишка? |
|
|||||
|
Регистрация: Jan 2002
Адрес: СПб-Denver-Лермонтов
Сообщений: 1,525
|
loadMovie
Availability Flash Player 3. Usage loadMovie("url",level/target[, variables]) Parameters url The absolute or relative URL of the SWF file or JPEG file to be loaded. A relative path must be relative to the SWF file at level 0. The URL must be in the same subdomain as the URL where the movie currently resides. For use in the Flash Player or for testing in test mode in the Flash authoring application, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk drive specifications. target A path to a target movie clip. The target movie clip will be replaced by the loaded movie or image. When the Actions panel is in normal mode, you can specify either a target movie clip or a level of a target movie; you can’t specify both. level An integer specifying the level in the Flash Player into which the movie will be loaded. The level parameter is vailable with the loadMovie action only when the Actions panel is in normal mode. If you select a level of a target movie while in normal mode, Macromedia Flash MX automatically changes the unloadMovie action to the unloadMovieNum action in the Actions panel Script pane. When the Actions panel is in expert mode, you cannot specify a level with unloadMovie. You must use unloadMovieNum instead. variables An optional parameter specifying an HTTP method for sending variables. (In expert mode, the variables parameter is identified as the method parameter.) The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL, and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.
__________________
Для того чтобы узнавать, есть два способа: - задавать вопросы и пытаться самому на них ответить. Второй способ более продуктивный. (S.Wizard) Последний раз редактировалось sergwizard; 04.10.2003 в 05:07. |
|
|||||
|
Регистрация: Nov 2001
Адрес: spb.ru
Сообщений: 177
|
Это, кажись, не метод называется (в тройке-то).
Когда ты испоьзуешь loadMovie через точку, там другие параметры: MovieClip.loadMovie Availability Flash Player 5. Usage myMovieClip.loadMovie("url" [,variables]) Parameters url An absolute or relative URL of the SWF or JPEG file to be loaded. A relative path must be relative to the SWF file at _level0. The URL must be in the same subdomain as the URL where the movie currently resides. For use in the stand-alone Flash Player or for testing in test mode in the Flash authoring application, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk drive specifications. variables An optional parameter specifying an HTTP method for sending or loading variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL, and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables. |
![]() |
Часовой пояс GMT +4, время: 23:01. |
|
|
« Предыдущая тема | Следующая тема » |
|
|