Hi.. im a new member and new to AS3

i am a graphic designer and trying to learn AS3.

my first project was to make a ROLLOVER / OUT button and
load up the external jpg file into the flash when the buttons are clicked,
with the loading % text for each pictures being loaded.

it works fine when i tested on my computer(local), but
when i uploaded to website and try to view it thru, it wouldnt load up the .jpg into the flash.

what did i do wrong? plus, my codes are just all from my scratch, so they will be very bad and ineffective. please teach me if there is better way of coding(im sure there are :))

k here is my code… sorry about the forein languages here and there.


import fl.transitions.Tween;
import fl.transitions.easing.*;
var box:Sprite = new Sprite();
addChild(box);
//////////////////////////////////////////////
box.x = 100; // 이미지가 로딩될곳의 X
box.y = 50; // 이미지가 로딩될곳의 y
///////////이거 4개 너꺼에 맞게 바꾸세용//////////

// button1_mc (첫번째 버튼) ///////////////////////////////////////////////////////////////////////////////
// 너의 첫번째 버튼 이름을 button1_mc 라고 정해주고… 시작해요…
// 두번쨰 세번쨰는 각각 button2_mc, button3_mc … and so on…
var btn1Height:Number = button1_mc.height;
var btn1Width:Number = button1_mc.width;
button1_mc.height = 50; // * 이거 첫번째 버튼의 크기 조절하는거야… 크기중 높이를 여기다가 적어줘.
button1_mc.width = 50; // * 이건 첫번쨰 버튼의 폭…(width)…
button1_mc.buttonMode = true;
stage.addEventListener(Event.ENTER_FRAME, countProperty);
button1_mc.addEventListener(MouseEvent.ROLL_OVER, btn1RollOver);
button1_mc.addEventListener(MouseEvent.ROLL_OUT, btn1RollOut);
function countProperty(event:Event):void{
btn1Height = button1_mc.height;
btn1Width = button1_mc.width;
btn2Height = button2_mc.height;
btn2Width = button2_mc.width;
} // 여기다가 버튼 있는 계수만큼 써야돼.
function btn1RollOver(event:MouseEvent):void{
var button1TweenHeight:Tween = new Tween(button1_mc, “height”, Regular.easeInOut, btn1Height, 70, 1, true);
//
여기서 70 이라는 숫자를 바꿔야돼. 너의 버튼이 가장 커졌을떄의 크기 (높이)
var button1TweenWidth:Tween = new Tween(button1_mc, “width”, Regular.easeInOut, btn1Width, 70, 1, true);
//* 여기서도 똑같이. 이번엔 폭.
}
function btn1RollOut(event:MouseEvent):void{
var button1TweenHeight:Tween = new Tween(button1_mc, “height”, Regular.easeInOut, btn1Height, 50, 1, true);
//* 여기선 50 이라는 숫자를 너의 버튼의 원래 크기(커지지 않았을때 숫자를 적어줘) 높이. 그리고 밑에꺼엔 폭.
var button1TweenWidth:Tween = new Tween(button1_mc, “width”, Regular.easeInOut, btn1Width, 50, 1, true);
}
/////////////////첫번쨰 버튼 끝나는곳//////////////////////////////////////////////////////////////////////////////

// button2_mc (2번째 버튼) !!!//////////////////////////////////////////////////////////////////////////////
// *두번쨰 버튼인데… 잘 보면 첫번쨰 버튼에서 1 이라고 써있던게 다 2 로 바껴있지?
// 첫번쨰꺼 완성되면 두번째꺼 숫자 다 바꺼보고 두번쨰꺼도 완성되면 버튼 시작부분부터 끝부분까지 다 카피해서
// 세번째, 네번째, 다섯번째 버튼들 다 각각 숫자만 변경해주면 돼…
var btn2Height:Number = button2_mc.height;
var btn2Width:Number = button2_mc.width;
button2_mc.height = 50;
button2_mc.width = 50;
button2_mc.buttonMode = true;
button2_mc.addEventListener(MouseEvent.ROLL_OVER, btn2RollOver);
button2_mc.addEventListener(MouseEvent.ROLL_OUT, btn2RollOut);

function btn2RollOver(event:MouseEvent):void{
var button2TweenHeight:Tween = new Tween(button2_mc, “height”, Regular.easeInOut, btn2Height, 70, 1, true);
var button2TweenWidth:Tween = new Tween(button2_mc, “width”, Regular.easeInOut, btn2Width, 70, 1, true);
}
function btn2RollOut(event:MouseEvent):void{
var button2TweenHeight:Tween = new Tween(button2_mc, “height”, Regular.easeInOut, btn2Height, 50, 1, true);
var button2TweenWidth:Tween = new Tween(button2_mc, “width”, Regular.easeInOut, btn2Width, 50, 1, true);
}
////////////////////////////////// 버튼2 끝나는 부분 ////////////////////////////////////////////////////////////////

///////////////////////////// 인제 버튼 눌르면 사진 바뀌게 //////////////////////////////
function showLoadTxt(event:ProgressEvent):void{
var loaded:int = event.bytesLoaded;
var total:int = event.bytesTotal;
var percent:int = loaded/total*100;
load_txt.text = “Loading: “+String(percent)+”%”;
}
button1_mc.addEventListener(MouseEvent.CLICK, button1Down);
button2_mc.addEventListener(MouseEvent.CLICK, button2Down);

function button1Down(event:MouseEvent):void{
var pic1Req:URLRequest = new URLRequest(“1.jpg”);
var pic1Loader:Loader = new Loader();
pic1Loader.load(pic1Req);
box.addChild(pic1Loader);
pic1Loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showLoadTxt);

}

function button2Down(event:MouseEvent):void{
var pic2Req:URLRequest = new URLRequest(“2.jpg”);
var pic2Loader:Loader = new Loader();
pic2Loader.load(pic2Req);
box.addChild(pic2Loader);
pic2Loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showLoadTxt);
}