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

Вернуться   Форум Flasher.ru > Flash > ActionScript 1.0/2.0

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

Регистрация: Jul 2005
Сообщений: 116
Question (РНР) интерактивность клипа после загрузки LoadMovie....Help!!!

Гостевая книга состоит из .swf , .php и .txt

Загружаю клип в главный мувик, и он перестает загружать переменные. Хотя отправляет переменные без проблем.

вот скрипты загружаемой swf-ки:

NumLow = 0;
NumHigh = 10;
loadVariablesNum ("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), 0);
System.useCodepage = true;
stop();
-----------------------------------------------------------------
on (release) {
if (Name eq "") {
_parent.Status = "Âàøå èìÿ";
} else if (Email eq "") {
_parent.Status = "Âàø e-mail";
} else {
Submit = "Yes";
NumHigh = 10;
NumLow = 0;
_parent.GuestBook = "Çàãðóçêà äàííûõ...";
System.useCodepage = true;
loadVariablesNum ("GuestBook.php", 0, "POST");
_parent.Status = "Çàãðóçêà äàííûõ çàâåðøåíà";
gotoAndStop (2);
System.useCodepage = true;
}
}

----------------------------------------------------------------
загружающей (главной):

loadMovie("GuestBook.swf", "1");

----------------------------------------------------------------
php:
<?php
// If you are using an old version of php, remove the next set of lines.
// or use $HTTP_POST_VARS["..."] instead.
$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Email = $_POST["Email"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];


// Replace special characters - you can remove the next 5 lines if wanted.
$Name = ereg_replace("[^А-Яа-яA-Za-z0-9 ]", "", $Name);
$Email = ereg_replace("[^А-Яа-яA-Za-z0-9 \@\.\-\/\]", "", $Email);
$Comments = ereg_replace("[^А-Яа-яA-Za-z0-9 \@\.\-\/\']", "", $Comments);


// Remove slashes.
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Comments = stripslashes($Comments);

// ###################################################################################
// ########## Reading and Writing the new data to the GuestBook Database #############

if ($Submit == "Yes") {
// Next line tells the script which Text file to open.
$filename = "GuestBook.txt";

// Opens up the file declared above for reading

$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );

// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y ( h:i:s A )",time()));

// you can use in flash - visit: http://www.macromedia.com/support/fl...s/htmltext.htm

$Input = "Name: <b>$Name</b><br>Email: <b><u><a href=\"mailto:$Email\">$Email</a></u></b><br>Comments: <b>$Comments</b><br><i><font size=\"-1\">Date: $Today</font><br><br>.:::.";

/* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file */

$New = "$Input$OldData";

// Opens and writes the file.

$fp = fopen( $filename,"w");
if(!$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}

// ###################################################################################
// ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##



// Next line tells the script which Text file to open.
$filename = "GuestBook.txt";

// Opens up the file declared above for reading

$fp = fopen( $filename,"r");
$Data = fread($fp, 800000);
fclose( $fp );

// Splits the Old data into an array anytime it finds the pattern .:::.
$DataArray = split (".:::.", $Data);

// Counts the Number of entries in the GuestBook
$NumEntries = count($DataArray) - 1;

print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook=";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
exit;
}
}
?>


----------------------------------------------------------------
ссылки:
http://newtimegroup.com.ua/chorus/GuestBook.html (самостоятельно)

http://newtimegroup.com.ua/chorus/test-page.html (с загрузкой)

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

Спасибо

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

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

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


 


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


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