-
How do i show movieclip after pressing another?
I´m trying to show a new movieclip that only shows up when i press another one.
The movieclips to press are nested inside another movieclip so i need them to call the other movieclip which is in the stage.
To explain better menu1 is inside cont3. Menu_down is in the stage and i need to call it after pressing menu1.
Btw menu1 is showing an external swf also,is there any problem with it?
-
Ok cool, i´ve solved this
Just needed to add a function in the constructor class for each of my button and then use
Code:
down.visible = true;
in the downClick function.
Code:
cont3.menu1.addEventListener(MouseEvent.CLICK,downClick);
cont3.menu2.addEventListener(MouseEvent.CLICK,downClick);
cont3.menu3.addEventListener(MouseEvent.CLICK,downClick);
cont3.menu4.addEventListener(MouseEvent.CLICK,downClick);
Now, how do i reset things when pressing that "down" movieclip?
I need to unload or make dissapear the external swf´s to show the main menu again. I´m doing all this in frame 1 instead on the timeline.
What´s the best way to do this?
-
Can anyone help please?
If i didn´t explain myself correctly i would appreciate if you say so.
-
I´m having an hard time to unload the external swf´s.
I´m trying to unload the external swf using a button that i have on stage but at the moment is useless because i´m not doing it the right way and need help with my code.
To load the external swf´s i have a menu with 4 buttons and here is a code of one button just to give an example:
Code:
function startLoad()
{
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("swfs/AugmentedReality_v1.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
cont3.visible = false;
}
function onCompleteHandler(e:Event):void {
var swf:DisplayObject = e.target.content;
swf.x = 200;
swf.y = 100;
addChild(swf);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
startLoad();
I then created a function for my button using the loader.unload(); function but i´m missing something.
Code:
private function goTo(e:MouseEvent):void
{
down.visible = false;
cont3.visible = true;
mLoader.unload();
}
But i get this error :
Error 1120 Access of undefined property mLoader
Thanks very much for your help.
-
Any help please. I´m very near the deadline with my project.
How is it so hard to unload external swf´s eh? I´ve tried many tutorials and solutions but flash keeps me giving this 1120 error
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|