Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,157,970 members, 7,835,248 topics. Date: Tuesday, 21 May 2024 at 07:37 AM

Loading Swfs With Flash Cs3 Issues - Art, Graphics & Video - Nairaland

Nairaland Forum / Science/Technology / Art, Graphics & Video / Loading Swfs With Flash Cs3 Issues (1086 Views)

Learn modern graphic design- Photoshop And CS3 ( fireworks ) / TUTORIAL! Greatly Enhance An Image In Simple Steps (PS CS3) / Adobe Illustrator Cs3 For Beginners(help) (2) (3) (4)

(1) (Reply)

Loading Swfs With Flash Cs3 Issues by technobayo(m): 5:50pm On May 21, 2010
I have two files A.swf and B.swf written in ActionScript 2 and 3 seperately. In the A.swf, i have a button btnA which loads the B.swf and in the latter, i have a button btnB which loads the A.swf. My dilema is that it works perfectly well in ActionScript 2.0 using the codes below while i have display issues with that written in AS3.

In Action Script 2.0, i could load either A.swf or B.swf using the codes below and when i do, the calling swf is replaced by the called.

on (release)
{
loadMovieNum("A.swf", 0);
}

on (release)
{
loadMovieNum("B.swf", 0);
}

Presently, i use ActionScript 3.0 and loading the external movie using the loader class presents a dilema as the calling swf remains in the background thus, obstructing the called's display view. Here's a look at my code for both movies:

btnA.addEventListener(MouseEvent.CLICK,loadB);

function loadB(evt:MouseEvent):void{
var swfRequest:URLRequest = new URLRequest("B.swf"wink;
var swfLoader:Loader = new Loader();
swfLoader.load(swfRequest);
addChild(swfLoader);
}

btnB.addEventListener(MouseEvent.CLICK,loadA);

function loadA(evt:MouseEvent):void{
var swfRequest:URLRequest = new URLRequest("A.swf"wink;
var swfLoader:Loader = new Loader();
swfLoader.load(swfRequest);
addChild(swfLoader);
}

I've tried using the addChildAt() method too but the calling movie remains in the background.

(1) (Reply)

Multimedia Solutions And Training / Film Camera For Sale / The Way That It Works Is To Analyze The Picture Sent By A Webcam That Is Either

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.