Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » Loading swf's Into Specific Frames


Loading swf's Into Specific Frames

Reply
  #1 (permalink)  
Old 02-02-10, 01:55 PM
MichaelTK MichaelTK is offline
New Member
 
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Loading swf's Into Specific Frames

I'm having a some trouble with loading an SWF into my main SWF.

Here's what I'm doing:

I have a main SWF with 4 frames. I want to click two buttons that will then load two SWF's into Frame 2 and Frame 3. Below is the script I wrote for the buttons. The earlywork_btn needs to load RColeman_EarlyWork.swf into frame 2. This swf is a slide show. The currentwork_btn needs to load RColemna_CurrentWork.swf into frame 3.

HERE IS MY SCRIPTS FOR MY BUTTONS:

stop();

function onbiographybuttonClick(evt:MouseEvent):void {
gotoAndStop("1");
}
biography_btn.addEventListener(MouseEvent.CLICK, onbiographybuttonClick);

function onearlyworkbuttonClick(evt:MouseEvent):void {
gotoAndStop("2");
}
earlywork_btn.addEventListener(MouseEvent.CLICK, onearlyworkbuttonClick);

function oncurrentworkbuttonClick(evt:MouseEvent):void {
gotoAndStop("3");
}
currentwork_btn.addEventListener(MouseEvent.CLICK, oncurrentworkbuttonClick);

function oncontactbuttonClick(evt:MouseEvent):void {
gotoAndStop("4");
}
contact_btn.addEventListener(MouseEvent.CLICK, oncontactbuttonClick);


And in Frame 2 I have this script to load RColeman_EarlyWork.swf. It works, however, once it loads then it is in my enitre main swf file, basically each time I click a button it is ontop of the content in the other frames. How do I make it just stay in Frame 2? Also, I can only load this one swf file, not the other one into FRAME 3.

HERE IS MY SCRIPT TO LOAD THE SWF FILES:

var ldr:Loader = new Loader();
var url:String = "RColeman_EarlyWork.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);

I'm desperate, PLEASE HELP!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
speeding up the loading process donff Flash & ActionScript 2 07-30-07 07:30 AM
Need Your HelP! Loading Multiple External Text into Multiple Dynamic Text Fields Flash_Boi Flash & ActionScript 2 03-30-06 04:27 PM
Flash help: Play frames in reverse Infinite_Hackers Flash & ActionScript 2 08-24-05 10:05 PM
How to solve this without using frames? Edward Han PHP 2 06-22-04 08:40 AM
Source load into table not using frames moman JavaScript 1 03-09-04 07:32 AM


All times are GMT -5. The time now is 01:44 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.