Simple Flash Navigation Question

Hi - great to see all these thoughts and comments.  I am making some good headway with AS3 but I'm stuck at the moment trying something really simple:  I want to load the home.swf when the site first loads.  
I am using this script for my buttons and it works fine:
home_mc.addEventListener(MouseEvent.CLICK, home);
function home(myevent:MouseEvent):void {
  var myURL:URLRequest=new URLRequest("home.swf");
  myLoader.load(myURL);
  myLoader.x = 0
  myLoader.y = 150
  buttonMode=true
  addChild(myLoader);
What do I need to change to the script so it loads "automatically" in the main.swf when the user first comes to the website? 

If you don't want it to have to wait for user interaction then take it out of the event handler.
  var myURL:URLRequest=new URLRequest("home.swf");
  myLoader.load(myURL);
  myLoader.x = 0
  myLoader.y = 150
  buttonMode=true
  addChild(myLoader);
Not sure what the buttonMode=true is doing in there...
And you can shorten up one bit:
myLoader.load(new URLRequest("home.swf");
Also I don't see where you have created your myLoader instance. I'm sure you have some code where that is created outside the event handler. So you will need that bit too.

Similar Messages

  • Simple Flash Control Question?

    I have a small problem with controlling a flash sprite.
    I have a "photo gallery" type of Flash cast member where
    users may select a picture. The problem is, is when they advance to
    the next frame in the Director timeline, and then go back to the
    Director frame where the photo gallery Flash sprite resides, the
    Flash sprite has gone back to the first frame. I want the user to
    know what "picture" was selected if they go back to that frame in
    the director movie , basically keeping the playhead of the flash
    cast member where it is. Is there a way to get a Flash cast member
    to stay on the frame and not "reload" to the first frame?

    The low-tech way to do that is to stretch out the Flash
    sprite sp it
    spans all the frames needed (possibly your whole
    presentation). Set the
    sprite to be offstage during the parts that it should not be
    shown, like
    set the loc to point(-1000,-1000) or something. When the
    playhead is on
    the frames where you should see it, place it where it should
    be seen.
    That way, it will never forget it's state.

  • Simple photo navigation question

    First let me say, I am a print designer, so web is a bit
    foreign to me. I am attempting to create an online portfolio
    website for my print design work, and have run into a few problems.
    Does anyone know how to make a button proceed to the next
    frame when it is pressed, but not go past a certain frame number? I
    assume it requires an if else statement, but I'm a bit lost.
    Also, I need the same thing only going backwards. These
    buttons will be used for a forward and back command while viewing
    images, basically I am trying to create a loop for viewing my
    portfolio.
    I would use a slide show ... but I need the images to change
    size and page orientation. Any suggestions?

    I made a little example:
    frameadvance
    There is a red box that just shows you that the playhead is
    advancing (these could be frames of images if you want), and there
    is a frame counter on top.

  • 4 Simple Flash Questions that Are Stumping Me!

    What is the Frame Rate for Web Animations
    Q1. I am making an animation which will be played on the web. What is the default frame rate (fps) of Flash CS5? And what is the frame rate of for web?
    Q2. My animation needs to be 30 seconds long. So at 15 fps that would mean I need to use 600 frames in Flash?
    How Do I Mask everything so all I see is the Content on the Stage?
    I have a wide image that extends past my movies stage size so when I preview my movie the image is visible. How do I mask out anything that extends past my movies window size? I believe I can create a layer named "mask" and place it above all other layers, but I forget how to make the mask. Any help is appreciated.
    How to Fade a Graphic
    I have a graphic element (some type) and I want it to fade from 0% to 100%. In older versions of Flash I could just select the symbol and then set it's alpha value to 0%, move a few keyframes and then set the alpha to 100%. Voila! but now it doesn't seem to work that way. How can I do this in CS5?

    Ned, it says 24 fps which means there is 24 frames per second so each 24 frames is 1 second.
    Date: Fri, 4 Nov 2011 05:35:16 -0600
    From: [email protected]
    To: [email protected]
    Subject: 4 Simple Flash Questions that Are Stumping Me!
        Re: 4 Simple Flash Questions that Are Stumping Me!
        created by Ned Murphy in Flash Pro - General - View the full discussion
    1 You can create your character as a movieclip and copy/paste that movieclip from one file to another. 2. One way to create a movieclip is to copy all the frame of the animation's timeline (select them all, right click the selection, choose Copy Frames), then create a new movieclip symbol (Insert -> New Symbol...etc) right click on its only keyframe and chhose Paste Frames.  THat will put all the layers and frames you copied into the movieclip The only way to come close to being certain about the timing of you animation is to use code to keep track of the time, something like getTimer()..  The frame rate that a file plays at is not a reliable means of dictating the time it takes due to a variety of factors which include the amount of content you are trying to process and performance limits of the user's machine.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4007420#4007420
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4007420#4007420. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Target another frame in a framset from flash navigation

    Target another frame in a frameset with for example
    getUrl (example.html, "rightFrame");
    has Adobe released some solution?
    - Right now we migrate from Flash towards PowerPoint and CSS,
    because
    the lack of answers and interactivity in Flash because of
    Microsofts "security pathes" in IE 6 and 7
    Right now I cant find a simple solution of how to target
    another
    frame from a frame in the same html-doc from a button in a
    flash navigation.
    Am I right or wrong? It looks like everyone avoid this simple
    question?
    - Why?
    And I still appreciate every possible answer that could solve my
    problem and a lot of problem to other
    interactive producer.

    Cant target another frame in the same frameset (2 frames -
    LeftFrame and RightFrame ) in the same html.doc
    This is the code I have applied to the Flash button
    in a frame called navigation in LeftFrame:
    on(release){
    getURL("right.htm", rightFrame);
    For some reason I can't get the page to open in the target
    frame (RightFrame).
    It will only pop up in a new window. (_blank)
    Microsoft has done a some security restriction since februari
    2006.
    The problem is that you cant use flash navigation in the same
    frameset no longer.
    I´ve serched everywhere and it looks like there is no
    simple solution to this problem.
    Adobe suggest that you Work around with Javascript.
    But what´s happend if the user disable JavaScript in the
    WebBrowser?
    Isn´t that obvious - it´s a strategic issue for the
    Interactive webbindustry.
    It´s a crossroad - which way webdesigners/developers,
    markering managers
    e-commerce managers.., want to choose to work along with
    databases, content
    management system and so on.
    If Flash not can provide an easy way of targeting another
    frame in a webbrowser for
    its customers, the customers have to choose a another
    solution - CSS+php or even worse
    - PowerPoint.
    I already migrate to CSS, PHP and PowerPoint because of
    Adobes late response of Microsoft so called
    "..because of security reason".
    At least I hope Adobe is interested of producing a motion
    tutorial of how to solve the problems by
    Javascript or whatever complex and not user friendly
    solution
    they come up with.
    Do you understand now?
    If you can provide a simple code below - please tell me -
    I really appreciate that!!!!!
    Code on flash button in LeftFrame:
    OnPress (I appreciate some bright solution here or som e link
    to how I solve the problem.)

  • Embedding an SWF Flash Navigation into Dreamweaver

    My website http://www.theboxinghistorian.com/ has already been created and has a lot of files, at the moment whenever i make a change to my spry navigation i do it through the template which automatically updates every page.
    Now I was looking to remove the spry navigation and to add a flash SWF File as my navigation, however I am relatively new to this and was wondering if adding such a file as my navigation is a simple case of updating the change through the template and once again every page through the Webstite would be updated.  Or would there be more complex issues i would need to Iron out as im using flash in dreamweaver.........

    My advice would be to forget about using Flash for navigation and stick with your Spry menu for now - but make it more efficient (see below).
    There are no upsides and too many downsides to Flash navigation including relying on the Flash plugin being available on your vfisitors computer (what do they do if Flash is not available for them?), search engines struggle with Flash without some clever coding by you (why bother?) and maintaining the navbar is a major pain (have to recreate the Flash file every time).
    The navigation you're currently using looks OK but I suggest implementing it as a Server Side Include instead of propagating it through your Template every time.
    Whilst the Template approach works, the major downside is that you have to upload every page of your website every time you change the Template. That gets old, fast.
    If you convert just the HTML part of your navigation (the ul structure) to a single tiny external text file (an Include) which the server then Includes in the page dynamically every time, you have minimal work to do to update your navigation bar whenever you wish. Just update the tiny text file (e.g. add/delete/move an <li> in the code), upload it to the server and your entire site is instantly up-to-date.
    Adding your navbar to the page as a Server Side Include transforms maintenance from a lengthy mundane chore to a pleasure.

  • Where can I buy the code or buy the book to make a simple flash game?

    I need to make or buy a template for a simple flash game for a clients website. It has to be legit to buy. It is about 5 pages long. You are asked a question, you select a radio button for the answer to the question, it compiles all your answers and gives you a result.
    I know flash pretty well but ccording to budget and time.it is best not to have to experiment.
    Let me know, I appreciate the imput!

    http://activeden.net/searches?term=quiz&type=files

  • How do I reboot my machine when it is flashing a question mark folder?

    How do I reboot my machine when it is flashing a question mark folder?

    Booting From An OS X Installer Disc
    1. Insert OS X Installer Disc into the optical drive.
    2. Restart the computer.
    3. Immediately after the chime press and hold down the "C" key.
    4. Release the key when the spinning gear below the dark gray Apple logo appears.
    5. Wait for installer to finish loading.
    After the installer loads proceed through the installation procedure.  If you are reinstalling Snow Leopard then your hard drive will not be erased.

  • Problems with Flash Navigation

    I'm trying to edit a horizontal flash navigation that I found
    on the internet but i'm having some issues. The original file can
    be found
    here.
    The flash pulls menu information from an XML file. To add a
    menu block all I should have to do is add the text to the flash
    file and then add a block of code to the XML file. The issue I'm
    having is that when I attempt to add a 9th main menu item, its
    submenu doesn't display correctly.
    I've been wracking my brain on this one for days and can't
    figure it out. Any help anyone could offer would be greatly
    appreciated.

    JodiBurgess wrote:
    > I have a frameset, the navigation frame uses flash for
    the navigation - basic
    > getURL code with target frame "MAIN" (which is the name
    of the frame I want to
    > target). This worked fine in IE6, but when I upgraded to
    IE7 clicking on the
    > navigation caused it to fire off a new window (as if I
    had given it a target
    > "_blank").
    Try another name, words like Main or mainFrame are reserved
    and always caused
    problems. Give the frame some unique name Jodi_frame etc...
    Also, don't forget to test it on server, not locally.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Mac book pro flashing a question mark folder

    What does it mean when my mac book pro is flashing a question mark folder and will not boot

    There are four general causes of this issue:
    1. The computer's PRAM no longer contains a valid startup disk setting when there aren't any problems with the disk itself. This can be checked for by pressing the Option key and seeing if the drive appears.
    2. The internal drive's directory structure has become damaged. This requires usage of an alternate bootable system to perform the repair.
    3. Critical system files have been deleted. This requires usage of an alternate bootable system to reinstall them.
    4. The internal drive has died or become unplugged. This is the most likely case if the computer took a sharp impact or there are unusual sounds coming from the hard drive's location.
    (86432)

  • Super Simple Flash Game Tutorials?

    I'm looking for some super simple flash game tutorials that students can complete in about an hour.  I don't want a lot of actionscript, but some is necessary and that's fine.  Drop any links you may know of or any book titles.  I don't mind buying a book if it is what I'm looking for.  Flash CS5

    This is an old technique but it works great using php:
    http://www.flashkit.com/tutorials/Games/High-sco-Glen_Rho-657/index.php

  • Flash navigation won't always load page

    A web site I'm working on working uses Flash for the
    navigation. There's a primary vertical navigation bar and all links
    work. There are two vertical menu bars that appear separately when
    certain buttons are rolled over on the primary bar. One of the
    secondary bars works fine. The second one however is the one
    causing me grief...it's a movie clip. When I click on a button, it
    opens like an accordion revealing additional links. When any of the
    links are clicked, a new web page is supposed to load. Sometimes
    the appropriate page loads, sometimes not.
    I've used getURL throughout and it works everywhere but in
    that navigation bar.
    Every html page has a different flash file. Sometimes when
    the html page doesn't load the appropriate page, the proper flash
    navigation appears though.
    I've gone over the code for every button on every page and
    searched forums, but still can't find what I've done wrong. Any
    help would be appreciated.

    Hi
    I am having the same problem. I was working on word and then it crashed. I then switched it off and now all I get is the apple and the wheel going round. I bought my mac in 2011.
    Anyone know hoe to fix it
    Dawn

  • AS2 XML Flash Navigation

    Hello All,
    I have been creating a dynamic Flash Navigation based on a tutorial I found online.
    I'm having issues aligning the MovieClip house all the array names from My XML file.
    I'm using:
    var yPosition:Number = 118;
    var xPosition:Number = 250;
    to align the Movie Clip. For some reason I can adjust the yPosition but I cant get the xPosition to move my MovieClip at all. >:(
    Any helpful hints would be greatly appreciated.
    Cheers-
    Graeme

    Heres the code I'm using:
    //Store Button Position
    var yPosition:Number = 118;
    var xPosition:Number = 250;
    //Declare New XML Object
    var myXML:XML = new XML();
    //Set Flash to ignore the XML file's white space
    myXML.ignoreWhite = true;
    //Declare new Array to store the links from the XML file
    var links:Array = new Array();
    //Declare new Array to store the names from the XML file
    var names:Array = new Array();
    //Set XML onLoad function
    myXML.onLoad = function(){
        //Set varible to store the XML childNodes
        //This allows you to get the number of buttons in the XML file.
        //You'll use this tell flash how many times to loop the for loop.
        var linkname:Array = this.firstChild.childNodes;
        //Set a for loop
        for(i=0;i<linkname.length;i++){
            //Push the button name into the names Array
            names.push(linkname[i].attributes.NAME);
            //Push the button link into the links Array
            links.push(linkname[i].attributes.LINK);
            //Attach the button Movie Clip from the libray give it an instance name and place it on the next highest level
            _root.attachMovie("button","btn"+i,_root.getNextHighestDepth());
            //Set the y position of the buttons
            _root["btn"+i]._y = yPosition;
            //Increace the varible yPosition 15 pixel each time the loop runs to place each button under each other
            yPosition = yPosition+25;
            //Place the button name from names Array into the blackTxt text box
            _root["btn"+(i)].blackTxt.Txt.text = (names[i]);
            //Place the button name from names Array into the whiteTxt text box
            _root["btn"+(i)].whiteTxt.Txt.text = (names[i]);
            //Assign the btnOver function to the button onRollOver state.
            _root["btn"+(i)].onRollOver = btnOver;
            //Assign the btnOut function to the button onRollOut state.
            _root["btn"+(i)].onRollOut = btnOut;
            //Assign the btnRelease function to the button onRelease state.
            _root["btn"+(i)].onRelease = btnRelease;
    //Load the XML file
    myXML.load("links.xml");
    //Button Over function
    function btnOver(){
        //This referse to the current button the mouse is over
        //Go To And Stop frame 2 of the current button the mouse is over
        this.gotoAndStop(2);
    //Button Out function
    function btnOut(){
        //Go To And Stop frame 3 of the current button the mouse rolls out from
        this.gotoAndStop(3);
    //Button Release function
    function btnRelease(){
        //Set a varible named currentBtn equal to the instance name of the current button the mouse clicked on
        var currentBtn:String = this._name;
        //Set a varible named currentIndex equal to the varible currentBtn and the characters between 3rd letter and 5th of that string.
        //This will return a number between 0 and the total number of buttons
        var currentIndex:String = currentBtn.substring(3,5);
        //Get the URL from the links Array
        //Use the currentIndex varible as the index number
        getURL(links[currentIndex]);

  • Simple Flash Detector (k)

    I need a SIMPLE flash detector for flash 8.
    I have been using the Dreamweaver behavior method for years.
    But with
    Flash 8 it doesn't work.
    I have downloaded the Flash Detection kit, but am having a
    hard time
    making heads or tails of it.
    Why is this difficult?
    -Kirk

    I have since changed this page to the Actionscript method
    with 8.0.0
    selected.
    Works fine for me, but not for my client.
    -Kirk
    W. Kirk Lutz wrote:
    > I have a client using IE 6 on a Windows XP Pro machine
    that does not get
    > sent to the update page, instead gets a weird version of
    the flash file.
    >
    > The Blackburn_index.html page is using the Dreamweaver
    Behavior method
    > with FlashPlayer 9.0.0 selected as what should be
    installed.
    >
    >
    > Here is the test page:
    >
    http://www.redheadcompanies.com/CLIENTS/KSI/Midtown2006_Website/Flash/Blackburn/Blackburn_ index.html
    >
    >
    > Any help would be greatly appreciated.
    >
    > -kirk
    >
    >
    >
    > W. Kirk Lutz wrote:
    >> I need a SIMPLE flash detector for flash 8.
    >>
    >> I have been using the Dreamweaver behavior method
    for years. But with
    >> Flash 8 it doesn't work.
    >>
    >> I have downloaded the Flash Detection kit, but am
    having a hard time
    >> making heads or tails of it.
    >>
    >> Why is this difficult?
    >>
    >> -Kirk

  • Flash navigation and frames

    I have flash navigation buttons in top frame. When the
    navigation/menu buttons are clicked the content should load in the
    'body' frame. What is actually occurring is the content is opening
    in a new window. I've checked the frame name and actions etc in
    flash. Can anyone provide advice on why this isn't working?

    What is the link to your page?
    Is this something that your school is requiring, or was the
    decision to use
    Flash nav and frames yours?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > If you want to use Flash for navigation, consider this -
    >
    > 1. Some people don't have Flash installed - what do they
    do?
    > 2. Search engines don't parse Flash links - your site
    will not be
    > spidered
    > 3. Screen assistive devices don't parse Flash links -
    what will those
    > users
    > do?
    > 4. DW cannot maintain links within a Flash movie, so if
    you move or
    > rename
    > a linked file, your navigation will break - what will
    you do?
    >
    > It's usually a very bad idea for these reasons...
    >
    > The decision to use or not use frames should be based on
    a) your site's
    > needs, and b) your willingness to accept the potential
    problems that
    > frames can create for you as developer and maintainer of
    the site and for
    > your visitors as casual users of the site.
    >
    > I am down on frames because I believe that they create
    many more problems
    > than they solve.
    > Judging from the posts here, and the kinds of problems
    that are described,
    > the kind of person most likely to elect to use frames is
    also the kind of
    > person most likely ill-prepared fo solve the ensuing
    problems when they
    > arise. If you feel a) that you understand the problems
    and b) that you
    > are prepared to handle them when they occur, and c) that
    you have a need
    > to use frames, then by all means use them.
    >
    > As far as I know, the most comprehensive discussions of
    frames and their
    > potential problems can be found on these two links -
    >
    >
    http://apptools.com/rants/framesevil.php
    >
    http://www.tjkdesign.com/articles/frames/
    >
    > Combining both makes you the award winner for the day!
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "GreenWat" <[email protected]> wrote in
    message
    > news:[email protected]...
    >>I have flash navigation buttons in top frame. When
    the navigation/menu
    >>buttons
    >> are clicked the content should load in the 'body'
    frame. What is
    >> actually
    >> occurring is the content is opening in a new window.
    I've checked the
    >> frame
    >> name and actions etc in flash. Can anyone provide
    advice on why this
    >> isn't
    >> working?
    >>
    >

Maybe you are looking for

  • TS1424 Haypi Kingdom - In-app - Coin Purchase

    I am continually tring to make an in-app purchase of "coin" in the game "Haypi Kingdom" and the charge attempts on my credit-card (I can see the transaction pending) on my online statement but the charge never goes through and always gets canceled fo

  • Mass Reversal of CO Documents

    I know transaction KB17N reverses a CO document but is there a CO transaction that does mass reversals?  If so, what is the transaction?

  • Problem with load Database Home Page

    when I try load Database Home Page i have this error: ORA-06550: line 2, column 0: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select updat

  • Mail Reply has no SEND button.

    Several month ago the Reply function in Mail stopped providing a window with the SEND button in the top border. New work as it should. So the only way to Reply to another email was to close the response and select Save into drafts. Then go to drafts

  • 12.1 - AddMultiPageBitmap Rule  - UNIX - PDF & Word Doc Not Supporting

    Hi I am trying to add a word/pdf document using the AddMultiPageBitmap Rule in Documaker 12.1 in Solaris . We use the PDFPrint Driver for generating the PDF Output. I see that rule works properly when we have a Tiff file to be added. When we trying a