|
|
#1 (permalink) |
|
Junior Member
Join Date: Apr 2009
Posts: 2
|
Hi
I'm pretty new to flash and html but I'm learning fast ! I have two questions I am working on a site where all the content appears on one main .swf and within that various other external .swf's are opened up. I want to link the menu buttons to open an external .swf into my main page - I have got it working so that it opens up in a new page but not into my original main page. I have tried out various ideas which I have seen posted but they relate to other menus and haven't seemed to work. The relevant html is like this <behaviour value="1" /> <list label="Videos"> <item label="Documentaries" data="final.swf" param="_root.mysite_final.swf" /> (this opens fine in a new page but I want it to open within my main .swf) I have tried various code in the scrollingmenu.fla and in the menuitem.as This is the code I saw posted menu_mc.onItemClick= function(node:XMLNode, level:Number){ your_movie_clip.loadMovie(node.attributes.clip); } and I have tried documentaries.onItemClick= function(node:XMLNode, level:Number){ final.swf.loadMovie(node.attributes.clip); } but there is an error as it does not recognize 'documentaries' or the movie 'final.swf'. What code do I need to write to link each particular button on the menu to it's relevant eternal.swf and to load that into my main .swf ? My second question was how do align the whole menu into the centre of my main flash site? - I have tried 'default' and various other things in the align box of the scrollingmenu.fla but it always comes up top left.I have tried using align in the .as files but it doesn't like it. Any help would be great ![]() Thanks in advance Mimmi |
|
|
|
|
|
#2 (permalink) |
|
OYXLUSFlash.com Staff Member
|
What is the movieclip instance name where you want to load the external clip ? You must replace your_movie_clip with the instance name of that movieclip. For example, create a new empty movie clip, give it an instance name of holder_mc and use the following code:
Code:
menu_mc.onItemClick= function(node:XMLNode, level:Number){
holder_mc.loadMovie(node.attributes.clip);
}
|
|
|
|
|
|
#3 (permalink) |
|
Junior Member
Join Date: Apr 2009
Posts: 2
|
Hi Adrian,
thanks for the reply. My movieclip instance name is called main9.swf and into that I want to load a movie called final1.swf which I want to be activated by button 1 on the menu which I have called 'documentaries'.Button 2 will be activating final2.swf and so on .. I have updated the code as I now know it was written wrong first time around Creating an emptymovieclip worked fine for repositioning but still doesn't for loading an eternal file into the main swf. My codes is this.createEmptyMovieClip("holder_mc", 999); var my_mcl:MovieClipLoader = new MovieClipLoader(); menu_mc.onItemClick = function(node:XMLNode, level:Number) { holder_mc.loadMovie(node.attributes.clip); }; It still opens the movie in a new tab on my browser any ideas ? Mimmi Last edited by mimmiwaugh; 04-28-2009 at 08:47 AM. Reason: wrong code |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT. The time now is 11:35 AM.









Linear Mode
