FireFoxで公開して開くときはいつでも、Adobe Flash Proでテストするときにコードが動作します(電子メールアプリケーションが開き、件名、名前、ID、スーパーバイザ、スコアを含む) IEを使用するか、swfプレーヤーを開くだけで、電子メールクライアントが開きますが、件名を含むすべてのフィールドが欠落しています...私はFlashで動作する方法が好きで、サーバーサイドのPHPを必要としない単純さですであることを期待通りに働いて...MailtoはFlash Proで動作しますが、Published時には動作しません
stop();
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.net.URLLoader;
// Variables
nameout_txt.text = names;
idout_txt.text = id;
supervisorout_txt.text = supervisor;
score.text = myscore+"";
//Email
var Email:URLRequest = new URLRequest
("mailto:[email protected]" + "?subject=WOE Certificate" + " " + names + "&body=" + "Name: " + names + "\nEID: "
+id + "\nSupervisor Name: "+ supervisor + "\nScore: " + myscore);
emailbtn.addEventListener(MouseEvent.CLICK,emailCert);
function emailCert(event:MouseEvent):void {
navigateToURL(Email," _blank") ;
}
//Array to hold a list of the weekdays.
var weekdays:Array = new Array ("Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday");
//Array to hold a list of the months.
var months:Array = new Array ("Jan","Feb","Mar","Apr","May","Jun","Jul",
"Aug", "Sep", "Oct","Nov","Dec");
//Adds an event listener to the dymanic text field.
the_date_txt.addEventListener(Event.ENTER_FRAME,showDate);
function showDate(event:Event):void {
//Create a new instance of the date class.
var myDate:Date = new Date();
//Retrieve the day, month and year from the date class.
var theDay=weekdays[myDate.getDay()];
var theMonth=months[myDate.getMonth()];
var theDate=myDate.getDate();
var theYear=myDate.getFullYear();
//Display the date in the dynamic text field.
the_date_txt.text=theDay+", "+theMonth+" "+theDate+", "+theYear;
}
/* Printing... */
/* Button */
print_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);
function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void
{
gotoAndPlay(14);
}
trace(myscore)
にいます.swfファイルをローカルに開く(例えば、 '' '' file:/// path/to/your.swf.''')か、ローカルWebサーバから提供されますか? (例: '' '' http:// localhost/your.swf''')? –
私はフォルダから開きます。 .swfファイルと.htmlの両方を試してみましたが、いずれもFlash ProのCtrl + Enterキーと同じようにフィールドに値を入力しません。 – Wicked
Flash Playerからプロジェクタ(.exe)を書き出すことはできますか? –