[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Section 1 (10.59 KiB) ● ●
//MainTimeline (jl_rps_fla.MainTimeline)
package jl_rps_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var yourMove1:yourMove;
public var path:String;
public var c_idle;
public var clipsscissors:Array;
public var myScore:TextField;
public var ScissorsButton:SimpleButton;
public var clipspaper:Array;
public var c_scissors_scissors;
public var myscore;
public var ck:singleclick;
public var thisLoader:Loader;
public var herScore:TextField;
public var currclip;
public var delayscissors:Array;
public var herscore;
public var thisMC:MovieClip;
public var c_paper_scissors;
public var c_scissors_paper;
public var index:int;
public var c_rock_scissors;
public var c_birdie;
public var mov:MovieClip;
public var RockButton:SimpleButton;
public var clipsrock:Array;
public var c_rock_rock;
public var c_walkoff;
public var c_takeoffclothes;
public var c_paper_paper;
public var sourceloc:TextField;
public var errorText:TextField;
public var delayrock:Array;
public var c_exit;
public var msg:TextField;
public var done;
public var srcCheck:Boolean;
public var c_rock_paper;
public var c_paper_rock;
public var c_scissors_rock;
public var PaperButton:SimpleButton;
public var delaypaper:Array;
public var blah;
public var c_enter;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
srcCheck = false;
blah = loaderInfo.loaderURL;
trace(("url=" + loaderInfo.url));
trace(("loaderurl=" + loaderInfo.loaderURL));
if (blah){
if (blah.indexOf("http://holdem.eadultgames.com/") == 0){
srcCheck = true;
};
if (blah.indexOf("http://www.eadultgames.com/") == 0){
srcCheck = true;
};
sourceloc.text = blah;
};
srcCheck = true;
if (srcCheck == false){
errorText.visible = true;
} else {
errorText.visible = false;
ck = new singleclick();
done = 0;
myscore = 0;
herscore = 0;
c_birdie = "jl_birdie323";
c_enter = "jl_enter149";
c_exit = "jl_exit531";
c_idle = "jl_idle567";
c_paper_paper = "jl_paper_paper411.swf";
c_paper_rock = "jl_paper_rock257.swf";
c_paper_scissors = "jl_paper_scissors640.swf";
c_rock_paper = "jl_rock_paper799.swf";
c_rock_rock = "jl_rock_rock841.swf";
c_rock_scissors = "jl_rock_scissors221.swf";
c_scissors_paper = "jl_scissors_paper981.swf";
c_scissors_rock = "jl_scissors_rock722.swf";
c_scissors_scissors = "jl_scissors_scissors671.swf";
c_takeoffclothes = "jl_takeoffclothes278";
c_walkoff = "jl_walkoff372";
myScore.htmlText = (("<b>" + String(myscore)) + "</b>");
herScore.htmlText = (("<b>" + String(herscore)) + "</b>");
clipsrock = [c_rock_rock, c_rock_paper, c_rock_scissors];
clipspaper = [c_paper_rock, c_paper_paper, c_paper_scissors];
clipsscissors = [c_scissors_rock, c_scissors_paper, c_scissors_scissors];
delayrock = [42, 39, 39];
delaypaper = [47, 45, 43];
delayscissors = [45, 44, 47];
path = "http://www.eadultgames.com/free_games/rps/";
index = 0;
thisLoader = new Loader();
thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);
thisMC = new MovieClip();
mov.addChild(thisMC);
currclip = c_enter;
thisLoader.load(new URLRequest(((path + currclip) + ".swf")));
RockButton.addEventListener(MouseEvent.CLICK, playRock);
PaperButton.addEventListener(MouseEvent.CLICK, playPaper);
ScissorsButton.addEventListener(MouseEvent.CLICK, playScissors);
RockButton.visible = false;
PaperButton.visible = false;
ScissorsButton.visible = false;
yourMove1.visible = false;
};
}
public function restartGame(_arg1):void{
myscore = 0;
herscore = 0;
myScore.htmlText = "<b>0</b>";
herScore.htmlText = "<b>0</b>";
msg.text = "";
done = 0;
if (_arg1 == 1){
currclip = c_enter;
};
if (_arg1 == 2){
currclip = c_idle;
};
thisLoader.load(new URLRequest(((path + currclip) + ".swf")));
}
public function playPaper(_arg1:MouseEvent):void{
var _local2:SoundChannel;
var _local3:*;
_local2 = ck.play();
thisMC.removeEventListener(Event.ENTER_FRAME, runOnce);
PaperButton.removeEventListener(MouseEvent.CLICK, playPaper);
_local3 = Math.floor((Math.random() * 3));
currclip = clipspaper[_local3];
trace((path + currclip));
thisLoader.load(new URLRequest((path + currclip)));
RockButton.visible = false;
ScissorsButton.visible = false;
}
public function playRock(_arg1:MouseEvent):void{
var _local2:SoundChannel;
var _local3:*;
_local2 = ck.play();
thisMC.removeEventListener(Event.ENTER_FRAME, runOnce);
RockButton.removeEventListener(MouseEvent.CLICK, playRock);
_local3 = Math.floor((Math.random() * 3));
currclip = clipsrock[_local3];
thisLoader.load(new URLRequest((path + currclip)));
trace((path + currclip));
ScissorsButton.visible = false;
PaperButton.visible = false;
}
public function doneLoading(_arg1:Event):void{
mov.removeChild(thisMC);
thisMC = MovieClip(thisLoader.content);
thisMC.x = 116;
thisMC.y = 94;
trace(currclip);
if (currclip == c_enter){
msg.text = "First player to 5 wins!";
};
if (currclip != c_idle){
RockButton.removeEventListener(MouseEvent.CLICK, playRock);
PaperButton.removeEventListener(MouseEvent.CLICK, playPaper);
ScissorsButton.removeEventListener(MouseEvent.CLICK, playScissors);
};
thisLoader.unload();
thisMC.addEventListener(Event.ENTER_FRAME, runOnce);
mov.addChild(thisMC);
thisMC.gotoAndPlay(1);
}
public function playScissors(_arg1:MouseEvent):void{
var _local2:SoundChannel;
var _local3:*;
_local2 = ck.play();
thisMC.removeEventListener(Event.ENTER_FRAME, runOnce);
ScissorsButton.removeEventListener(MouseEvent.CLICK, playScissors);
_local3 = Math.floor((Math.random() * 3));
currclip = clipsscissors[_local3];
trace((path + currclip));
thisLoader.load(new URLRequest((path + currclip)));
RockButton.visible = false;
PaperButton.visible = false;
}
public function runOnce(_arg1:Event):void{
trace(((thisMC.currentFrame + " ") + thisMC.totalFrames));
if (currclip != c_idle){
if (currclip == c_rock_rock){
if (thisMC.currentFrame == delayrock[0]){
msg.text = "It's a tie.";
};
};
if (currclip == c_rock_paper){
if (thisMC.currentFrame == delayrock[1]){
msg.text = "Rock loses to Paper!";
herscore = (herscore + 1);
herScore.htmlText = (("<b>" + String(herscore)) + "</b>");
};
};
if (currclip == c_rock_scissors){
if (thisMC.currentFrame == delayrock[2]){
msg.text = "Rock beats Scissors!!";
myscore = (myscore + 1);
myScore.htmlText = (("<b>" + String(myscore)) + "</b>");
};
};
if (currclip == c_paper_rock){
if (thisMC.currentFrame == delaypaper[0]){
msg.text = "Paper beats Rock!!";
myscore = (myscore + 1);
myScore.htmlText = (("<b>" + String(myscore)) + "</b>");
};
};
if (currclip == c_paper_paper){
if (thisMC.currentFrame == delaypaper[1]){
msg.text = "It's a tie.";
};
};
if (currclip == c_paper_scissors){
if (thisMC.currentFrame == delaypaper[2]){
msg.text = "Paper loses to Scissors!";
herscore = (herscore + 1);
herScore.htmlText = (("<b>" + String(herscore)) + "</b>");
};
};
if (currclip == c_scissors_rock){
if (thisMC.currentFrame == delayscissors[0]){
msg.text = "Scissors loses to Rock!";
herscore = (herscore + 1);
herScore.htmlText = (("<b>" + String(herscore)) + "</b>");
};
};
if (currclip == c_scissors_paper){
if (thisMC.currentFrame == delayscissors[1]){
msg.text = "Scissors beats Paper!!";
myscore = (myscore + 1);
myScore.htmlText = (("<b>" + String(myscore)) + "</b>");
};
};
if (currclip == c_scissors_scissors){
if (thisMC.currentFrame == delayscissors[2]){
msg.text = "It's a tie.";
};
};
};
if (thisMC.currentFrame == (thisMC.totalFrames - 1)){
thisMC.gotoAndStop((thisMC.totalFrames - 1));
msg.text = "";
RockButton.visible = true;
PaperButton.visible = true;
ScissorsButton.visible = true;
yourMove1.visible = true;
if (currclip == c_exit){
done = 1;
RockButton.visible = false;
PaperButton.visible = false;
ScissorsButton.visible = false;
yourMove1.visible = false;
} else {
if ((((herscore == 5)) && (!((currclip == c_birdie))))){
msg.text = "You Lose! Try Again.";
currclip = c_birdie;
RockButton.visible = false;
PaperButton.visible = false;
ScissorsButton.visible = false;
yourMove1.visible = false;
} else {
if ((((myscore == 5)) && (!((currclip == c_takeoffclothes))))){
currclip = c_takeoffclothes;
msg.text = "You Win!!";
RockButton.visible = false;
PaperButton.visible = false;
ScissorsButton.visible = false;
yourMove1.visible = false;
} else {
if ((((currclip == c_takeoffclothes)) && ((myscore == 5)))){
currclip = c_exit;
RockButton.visible = false;
PaperButton.visible = false;
ScissorsButton.visible = false;
yourMove1.visible = false;
} else {
if (currclip == c_birdie){
restartGame(2);
RockButton.addEventListener(MouseEvent.CLICK, playRock);
PaperButton.addEventListener(MouseEvent.CLICK, playPaper);
ScissorsButton.addEventListener(MouseEvent.CLICK, playScissors);
} else {
currclip = c_idle;
RockButton.addEventListener(MouseEvent.CLICK, playRock);
PaperButton.addEventListener(MouseEvent.CLICK, playPaper);
ScissorsButton.addEventListener(MouseEvent.CLICK, playScissors);
RockButton.visible = true;
PaperButton.visible = true;
ScissorsButton.visible = true;
yourMove1.visible = true;
};
};
};
};
};
thisMC.removeEventListener(Event.ENTER_FRAME, runOnce);
if (done == 0){
thisLoader.load(new URLRequest(((path + currclip) + ".swf")));
} else {
restartGame(1);
};
};
}
}
}//package jl_rps_fla
Section 2 (127 B)
//singleclick (singleclick)
package {
import flash.media.*;
public dynamic class singleclick extends Sound {
}
}//package
Section 3 (123 B)
//yourMove (yourMove)
package {
import flash.display.*;
public dynamic class yourMove extends MovieClip {
}
}//package