Results 1 to 10 of 10

Thread: Flash menu / XML help

  1. #1
    Join Date
    Feb 2009

    Flash menu / XML help

    I am trying to implement a flash menu on my website. I've never done this sort of thing before... I think I'm really close to getting it. I can view the menu in my browser while offline (locally), but i cannot figure out how to "embed" the menu on my webpage. Basically, I have a .swf and an .xml file. I then tried using the following html to insert it, but it doesn't work! HELP!!!

    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    cabs/flash/swflash.cab#version=6,0,29,0" width="width" height="height">
    <param name="movie" value="swf file path">
    <param name="quality" value="high">
    <param name="scale" value="noscale">
    <param name="bgcolor" value="background color">
    <param name="flashVars"
    value="xmlConfig=path to configuration file">
    <embed src="swf file path" width="width" height="height" flashvars="xmlConfig=path to configuration
    file" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shock
    wave-flash" scale="noscale" bgcolor="background color"></embed>

  2. #2
    Join Date
    Feb 2008
    NW Washington State
    Well if the .swf works on your local machine but not when uploaded to your server, the problem is almost always a pathing issue. If you use something like this in your .swf:
    var menu:XML = new XML();
    Remember that the path to the swf and the xml are relative to the location of the html page which on which you did the "embedding", not simply the relationship used during creation. That means that during testing of the sample show above, the xml had to be placed in a folder called "scripts", which was at the same level as the html page. If the .swf was also placed in there, then the path from the html page to the swf would be:
    <param name="movie" value="scripts/menu.swf">
    Unless you put the correct path to the xml in while you were doing development (the extra folder depth), it may just read
    which would not load from an html page one folder level up. If the menu is duplicated in any subfolders, the relative address to the .swf and .xml will have to be changed to include the "../" up one level markup.
    One way to test correct pathing, type the file name directly into your browser address bar.
    If you can't download direct, address is wrong, file does not exist, of file is in wrong place. this will also work for the .xml file.
    Best wishes,

  3. #3
    Join Date
    Feb 2009
    I am a little unsure about the paths, so I just used the full path starting with http://. is this not going to work? i see now that i can change the background color, height, width. i now see a colored box of the specified dimensions, but i still cant get the swf object to appear. grrr.

    i am able to direct download the object by typing the path into my address bar. however, the object looks enlarged, blurry, fuzzy, etc. it does not appear as it does on my local drive.

  4. #4
    Join Date
    Feb 2008
    NW Washington State
    Absolute urls should work also, but you may get a security warning during testing from local machine, just follow the dialog box if it does.
    If you can download directly, great! It will appear larger because it has the whole browser to open in... for testing...not a problem. Can you also download the xml?
    As far as loading the .swf, the "embed" method is pretty much being phased out in favor of valid code. Here is one example:
    You can also use swfobject... a small .js file which is valid code and allows the use of alternate content for non Flash users.
    Here's an example of a swf menu with working alt content for non flash users... menu works fine either way. View the source code and notice how the menu buttons use alt content
    As for your example, the line that concerns me the most is the
    flashvars="xmlConfig=path to configurationfile"
    Is this a menu template that you use xml to config and not actually read in the data or ????? Do you suspect any problems with that file?

  5. #5
    Join Date
    Feb 2009
    ugggh. i can't figure this out for the life of me. none of the above examples contain a .xml file in addition to the .swf, so i'm still confused. any other suggestions?

  6. #6
    Join Date
    Feb 2008
    NW Washington State
    Typically loading the xml is handled inside the actionscript... but not always. In the example I was mentioning
    var menu:XML = new XML();
    The code is part of the actionscript and not the html. There is a bunch of code to create and fill an array that is placed between these two lines. Now your application may be completely different.
    What is the purpose of the xml file? Is it used to config a skin or something for the menu? Or does it provide the text that is used on the nav buttons of the menu?
    Do you have access to the Flash .fla file? Is there something like menu.load("menu.xml"); in the ActionScript?
    Without seeing the specifics.... I'm just guessing.

  7. #7
    Join Date
    Feb 2009
    its become apparent that i need to have my hand held through this process.

    my xml file specifies the menu design as well as the navigation tree. is there any way i can email you the exact files i am dealing with? i would appreciate it tremendously, as i am about ready to give up.

  8. #8
    To clarify, is it that you can view the .swf file in the browser by going to www.yoursite.com/menu.swf but you cannot view it embedded on the page?

  9. #9
    Join Date
    Feb 2009
    well, i figured out how to embed it. now my problem is getting the pull down to overlap the html, rather than having a giant blank gap on my page. i understand this is a difficult problem to deal with. is it even possible? thanks!

  10. #10
    Hm, possibly using the wmode attribute:


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.17682 seconds
  • Memory Usage 2,937KB
  • Queries Executed 13 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (10)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates