-
loading External SWF error. Layer
Hey people!
Im from Brazil.
my problem is simple(I think).
I making my site all in flash, so when I clicked in a button I want to call External swf
For example I Click in a MovieClip "HOME" I want Call External swf HOME, where contain my All Home Page.
So, the problem is when I Use
on (release){
loadMovie("home.swf", 2);
}
It works and External SWF comes to my stage.
but the problem is the home.swf sits on top of my page and my custom mouse
Its possible call a External SWF in specify layer, or frame?
give a instance for a frame for example....
I tried but not worked....
so, Thanks a lot for the help!
-
.
Hi,
Try loading your swf into an empty movieclip on the main stage.
loadMovie("home.swf", emptyClip);
or
emptyClip.loadMovie("home.swf");
-
it worked
loadMovie("home.swf", _root.mc);
but the problem is mc do not can have transparency, so home.swf will get transparency too.
Other problem is the size....
What I supose to do a emptyClip? an square?
if you work with shpares will change the size of SWF
so Still this 2 problens...
you can teach me make empty movie clip?
Thanks!
-
.
Hi,
Off the top of my head
PHP Code:
_root.createEmptyMovieClip("emptyClip",_root.getNextHighestDepth());
_root.emptyClip._x = 100;
_root.emptyClip._y = 100;
loadMovie("home.swf", _root.emptyClip);
-
Originally Posted by fruitbeard
Hi,
Off the top of my head
PHP Code:
_root.createEmptyMovieClip("emptyClip",_root.getNextHighestDepth());
_root.emptyClip._x = 100;
_root.emptyClip._y = 100;
loadMovie("home.swf", _root.emptyClip);
The Code work fine, I get the external swf, but the problem is the still getting Over all others MovieClipe
for example I have Index.swf and a Want to load Page2.swf
when I click in MovieClip for load page2.swf
the page2.swf get Over all Layers, like be in the last one, and site get covered....
The mouse Effect get under page2.swf
Can you Understand?
Its very complicated
But thanks a lot for your help
-
.
Hi,
It's just a matter of depth, I suggest you make the mouse effect use the same principle as the loading movieclips, getNextHighestDepth(), make the mouse effect goto the next highest depth.
Or you could make your emptymovieclips at a lower deptht than your mouse effect.
with a liitle playing around you should get it to work how you like, remeber, placing something directly on the stage gives it a negative depth ( -10000)
-
Originally Posted by fruitbeard
Hi,
It's just a matter of depth, I suggest you make the mouse effect use the same principle as the loading movieclips, getNextHighestDepth(), make the mouse effect goto the next highest depth.
Or you could make your emptymovieclips at a lower deptht than your mouse effect.
with a liitle playing around you should get it to work how you like, remeber, placing something directly on the stage gives it a negative depth ( -10000)
Can you give me a example?
for example I click on button
on (release){
so what next?
}
its not possible load swf on especify Layer or Graphic ?
The problem is the transparency and SWF get over all document
-
When you do this code, you are creating an empty movieclip at a certain DEPTH. The DEPTH sets which clip is on top.
_root.createEmptyMovieClip("emptyClip",_root.getNe xtHighestDepth());
When you set the DEPTH to getNextHighestDepth(), you are saying get the next available number. Which is why you should never use this and don't need it.
Set your DEPTH yourself.
_root.createEmptyMovieClip("mcBackground",20);
_root.createEmptyMovieClip("mcPicture",600);
_root.createEmptyMovieClip("mcTextOverPicture",800 );
_root.createEmptyMovieClip("mcPicture2",620);
-
.
Hi,
When I was doing my AS2 site I used to use nextHighestDepth quite a bit, due to the fact that I had an index swf with 7 or 8 external movies loaded in when required, so when one clip was clicked it appeared at the top.
So I wouldn't say never use it, I did need it.
-
Yeah we all used it at some point. It's just that it's not a good solution. Like when you're using it to manage visibility. You should use the visible property to make things visible.
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
|