Results 1 to 2 of 2
-
May 18th, 2010, 09:12 AM #11Registered User
postsconditional function and UILoader
Hi there,
I have problem with conditional function and UILoader (interiorLoader).
the part of my code is now like this:
// button forward...........
forward_btn.addEventListener(MouseEvent.CLICK, forward);
function forward(e:MouseEvent):void {
if (interiorLoader.source =="interiors_content1.swf") {
interiorLoader.load(new URLRequest("interiors_content1a.swf"));
interiorLoader.addEventListener(ProgressEvent.PROG RESS, progressHandler);
interiorLoader.addEventListener(Event.COMPLETE, completeHandler);
forward_btn.visible=false;
back_btn.visible=true;
} else {
if (interiorLoader.source=="interiors_content2.swf") {
forward_btn.visible=true;
forward_btn.visible=true;
interiorLoader.load(new URLRequest("interiors_content2a.swf"));
}
}
When I used only source not load everything was working correctly
It should work like this:
If you press forward_btn and in UILoader is interiors_content1.swf it should load
in UILoader file interiors_content1a.swf etc.....
Please help me........Last edited by mikrobus11; May 18th, 2010 at 10:32 AM.
-
May 26th, 2010, 03:12 PM #2
Put all your swf link name into an array
Code:var myLinkArray:Array = new Array("interiors_content1.swf", "interiors_content2.swf"); var currentIndex:int = 0; [...] function forward():void { currentIndex++; interiorLoader.load(new URLRequest(myLinkArray[currentIndex])); } function backward():void { currentIndex--; interiorLoader.load(new URLRequest(myLinkArray[currentIndex])); }There is 10 kind of people, those who understand binary, and those who don't.
Similar Threads
-
Fade UILoader to 25% ??
By Varl in forum ActionScript 3Replies: 1Last Post: May 2nd, 2010, 10:46 PM -
UILoader Problem
By SaberVulcan in forum ActionScript 3Replies: 0Last Post: April 20th, 2010, 04:50 PM -
UILoader doesn't fill the page
By maruf89 in forum ActionScript 3Replies: 1Last Post: February 13th, 2010, 12:09 AM -
PLS help with correct unloading of UILoader - external SWF
By noonoo11 in forum ActionScript 3Replies: 1Last Post: December 9th, 2009, 03:57 PM -
UILoader not displaying
By ceyesuma in forum ActionScript 3Replies: 0Last Post: November 18th, 2008, 05:26 PM

Reply With Quote

Bookmarks