-
How do i replace MC`S in the same stage for others?
I would like to make a smooth transition between movieclips in the same scene.
For example mc1 is on stage then i click on mc2 who is also on stage to show it´s content (it can be a video or image) but mc1 dissapears smoothly from the scene. It´s a bit like this site:
http://www.bbc.co.uk/switch/meta4orce/launch.shtml
When you press to see the videos the menu goes away so that the video can be shown.
Do i have to use the timeline or is it possible to just code instead?
-
Ok, i´m getting the hang of this and one swf is now showing up on the stage but i still have two questions:
- How do i remove the actual content in the scene so that only the content of the loaded swf is on stage?
- How do i position the loaded swf´s in the stage, because mine is showing on the bottom right corner.
This is the code i used:
Code:
function startLoad()
{
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("AugmentedReality_v1.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
}
function onCompleteHandler(loadEvent:Event)
{
addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
startLoad();
}
-
Ok,i´ve solved the problem with the postion of the swf´s but they are showing on top of the Menu button.
Here´s the code. I´ve changed the function onCompleteHandler with this:
Code:
function onCompleteHandler(e:Event):void {
var swf:DisplayObject = e.target.content;
swf.x = -400;
swf.y = -300;
addChild(swf);
}
The problem is that both the Menu movieclip (the Menu button) and the movieclips with the buttons that load the swf´s are inside the same container.
-
I used
Code:
parent.visible = false;
inside the function startLoad() but everything goes invisible even the loaded swf`s.
I´m a bit stuck having the swf´s showing up from movieclips inside others. I`ve tried to use an empty mc in the stage to load the swf´s there but i couldn´t solve the problem.
Please help,really stuck at the moment.
-
No improvement on my project unfortunately.
Maybe i´m not explaining this better.
I´m calling an external swf from a movieclip that is nested inside another movieclip but the problem is that this parent movieclip shows on top of the external movieclip.
How do i put the external swf to show on top?
-
Originally Posted by FabM
How do i put the external swf to show on top?
I'm not sure I completely understand the problem, but I would look at layers first. If the calling layer is at the top of the hierarchy in the MC, the external swf should show on top.
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
|