Old 04-24-2009, 11:38 AM   #1 (permalink)
Junior Member
 
Join Date: Apr 2009
Posts: 2
Default Linking and Position

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
mimmiwaugh is offline   Reply With Quote
Old 04-25-2009, 10:55 AM   #2 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,967
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

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);
}
And you'll see it will work. Please refer to the flash documentation. These are parts of the flash basics and you can find them all there along with some code examples.
Adrian is offline   Reply With Quote
Old 04-25-2009, 04:25 PM   #3 (permalink)
Junior Member
 
Join Date: Apr 2009
Posts: 2
Default Update

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
mimmiwaugh is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:35 AM.