PDA


View Full Version : Flash Dynamic Nav Menu


ptourvi1@twcny.
06-21-2004, 03:12 AM
Some people were asking for this and I was making it for myself anyways so here it is for anyone that wants it.

Edit: Added new zip with fla source file and new swf with correct font embedded..to upgrade just overwrite old swf with new one.

Edit 2: Added a resaved standard FlashMX source-vbcpmsflashMX.zip

Edit2.5: I've noticed problems in the object code if you use an absolute path so you may want to just use a relative path to the swf
Demo on upper left below:
DEMO HERE (http://www.tek-wiz.com/)

Dynamic Flash Menu by JTMON

Ok here is a down and dirty quick dynamic nav menu made for vbcmps.

This will add a basic dynamic navigation module to your CMPS which can be changed via text file.

First,
decide what text you want on each button. You must use all ten buttons for this version else the button will say undefined.
Open the included menuitems.txt file. Replace my text with your own..the menu1, menu2, menu3, refer to the text that will show on the button. The url1, url2, url3 refers to the path (relative or absolute) to whatever webpage or web address you want loaded when that button is clicked. MAKE SURE TO LEAVE the txt file formatted as is. Upload the menuitems.txt and the cpmsmenu.swf file to the same location on the server. I placed mine in my webroot.

Next,
In your Admincp - Styles & Templates - Style Manager - Add a new template called "adv_portal_flashmenu".

Insert this code into the template:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Nav Menu</b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Begin custom code -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="172" height="210" id="cpmsmenu" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://www.yoursite.com/pathtofile/cpmsmenu.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="cpmsmenu.swf" quality="high" bgcolor="#ffffff" width="172" height="210" name="cpmsmenu" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<!-- End custom code -->

</td>
</tr>
</table>
<br />
MAKE SURE TO REPLACE:
http://www.yoursite.com/pathtofile/
with your address and path.

REPLACE: "Nav Menu" with whatever you want the title of the block to show as on the portal page.

Save the template!

Still in your Admincp - vBa CMPS - Add Module

- Module Title - flashmenu
- Module Identifier - Leave blank
- OR Template to Include - flashmenu
- Activate and select the column you want it in.
- Save and you are done.
thanks to clord for his basic module code..
Enjoy-JTMON

Socket
06-21-2004, 05:31 PM
Nice :)

Thx for the update too

Polo
06-23-2004, 10:50 AM
not exactly what i was looking for... but thanks anyways...

GoldnGT
06-23-2004, 01:51 PM
Is there a way to change the font used? I tried to edit the source with Flash MX and it gave me "UNEXPECTED FILE TYPE"

Mike

ptourvi1@twcny.
06-23-2004, 02:23 PM
Polo...bonfire posted another one in the other hacks/addons section...maybe that one?

GoldnGT, it was made using the very latest MX version so it should be ok editing it in that one...I plan on doing another version where the color/hover color/ and font are controlled via text...Also, I may be able to save the source in a lower version so you can edit it.....What version MX do you have...I'm using MX 2004...

Edit I uploaded a resaved source version. Flash would only let me save as MX 2004 or MX so I chose MX on this one...hopefully it works for you...if you are any good at coding, the actionscript could be cleaned up.

Polo
06-23-2004, 02:31 PM
Polo...bonfire posted another one in the other hacks/addons section...maybe that one?

i will check thanks

GoldnGT
06-23-2004, 02:42 PM
I've got the original FlashMX. I have 2004 at home, (i'm at work now) so i'll have to try it when i get there as well.

I'll try this one... thanks.

Mike

ptourvi1@twcny.
06-23-2004, 04:17 PM
Is there a way to change the font used? I tried to edit the source with Flash MX and it gave me "UNEXPECTED FILE TYPE"

Mike


For anyone that doesn't have FlashMX or doesn't know how to make this change, tell me the font you want and I'll make the change and upload or email the new file...

GoldnGT
06-24-2004, 09:47 AM
This addon is great. Made a real difference in the layout of my CMPS loader. I changed the font to Verdana, (b/c its easier to read on my site, plus i ahve some long section names) and it looks good.

Props!

Mike

Snowy
07-14-2004, 11:41 AM
For anyone that doesn't have FlashMX or doesn't know how to make this change, tell me the font you want and I'll make the change and upload or email the new file...

I was hoping you may do me a menu that will fit in with my sites skin?

www.synergyforums.com

Thanks

mholtum
08-02-2004, 03:02 AM
Hmmm, I did everything you stated and the mod displays the menu without any text and when a button is clicked "undefined" is displayed in the navbar.. This is what I am using:

menu1=Home/Headlines
&url1=www.pcadventurers.net/
&menu2=Forums
&url2=http://www.pcadventurers.net/forums/index.php
&menu3=User Control Panel
&url3=http://www.pcadventurers.net/forums/usercp.php
&menu4=FAQ
&url4=http://www.pcadventurers.net/forums/faq.php
&menu5=Articles
&url5=http://www.pcadventurers.net/forums/articles.php
&menu6=Arcade
&url6=http://www.pcadventurers.net/forums/arcade.php
&menu7=Calendar
&url7=http://www.pcadventurers.net/forums/calendar.php
&menu8=Members
&url8=http://www.pcadventurers.net/forums/members.php
&menu9=Search
&url9=http://www.pcadventurers.net/forums/search.php
&menu10=Log Out
&url10=http://www.pcadventurers.net/forums/login.php?do=logout

I have the files in http://www.mydomain.net/flashmenu/ What am I doing wrong?

ptourvi1@twcny.
08-02-2004, 03:14 AM
have you tried the files in your root directory? Undefined means the file didn't load the values from the text file.

Also, you may want to try this code in your template.

<!-- Begin custom code -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="172" height="210" id="cpmsmenu" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="cpmsmenu.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="cpmsmenu.swf" quality="high" bgcolor="#ffffff" width="180" height="210" name="cpmsmenu" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<!-- End custom code -->

mholtum
08-02-2004, 03:20 AM
Ok, moving them to the root dir fixed the issue. Interesting...

mholtum
08-02-2004, 03:22 AM
Thanks. I like the font you are using and I assumed that would be what was used. What do I need to do to get that font? Also can I add more buttons?

mholtum
08-02-2004, 03:31 AM
Ok, now I am confused. I reedited the menuitems.txt file and reuploaded it. Blank again.

ptourvi1@twcny.
08-02-2004, 12:53 PM
if you goto your site via youraddy.com it works, but if you goto www.youraddy.com it doesn't work...I had the same issue before...change your object code like mine and that should fix it

mholtum
08-02-2004, 01:13 PM
You lost me.. Change it where?

ptourvi1@twcny.
08-02-2004, 02:40 PM
change your code in the adv_portal_flashmenu template to the code I posted above..

mholtum
08-02-2004, 02:55 PM
Great thanks. Done. I would like to change the font to match the rest of the site. ANy ideas?

ptourvi1@twcny.
08-05-2004, 02:00 AM
You'd have to edit the source fla included in the zip file..

mholtum
08-05-2004, 02:13 AM
thats what I thought bummer I am new to flash

dsboyce8624
05-07-2005, 12:20 AM
I changed the font to Tahoma and adjusted the dimensions of the box a bit to clean up the edges.

Feel free to use and distribute at will.

nastea
06-04-2005, 02:35 PM
anyway to make the BG color #ededed and the font color #42789d ???

dsboyce8624
06-08-2005, 04:20 PM
That's all configureable in the flash file.

Stachel
06-25-2005, 10:37 AM
What are some example websites containing this feature?

Stachel

ptourvi1@twcny.
07-10-2005, 01:06 AM
I'm working on a new version right now where you can set the button, hover, and text color via the textfile.

DOMIN8
07-13-2005, 01:34 PM
how do you change the color scheme?

funkie
03-03-2006, 09:33 AM
wow this hack really gets in your browser you have to delete your tempory internet files to see and changes you make any idea why this is normaly a hold ctrl and refresh does the job

ptourvi1@twcny.
03-03-2006, 03:41 PM
Change your browser settings to check for a new version of page each visit and not just once a day or week. Also, it's a known issue that flash movies are cached. You can add some non cache code or put the code in another area to avoid this.