www.webdeveloper.com
Results 1 to 3 of 3

Thread: flash website (actionscript)

  1. #1
    Join Date
    Apr 2008
    Posts
    4

    flash website (actionscript)

    So basicaly I'm making a website..and I'm trying to load an SWF onto the page. Problem is nothing appears...I don't know if it's a coding error or if I'm just missing something.

    (actionscript 2.0)

    //heres the code that I got attempting to load the welcomepage.swf nothing appears when I preview my work. The welcome page should load automatically....or when I click...but nothing happens.

    loadMovie("welcomepage.swf", blankmc);
    targety = 85.5;
    onEnterFrame = function () {
    indicator._y += (targety-indicator._y)/5;
    }



    //for scrolling & loading content
    welcomebtn.onPress = function() {
    targety = 85.5;
    }

  2. #2
    Join Date
    Apr 2008
    Posts
    4
    problem solved I figured it out. the code was right I just didn't name the instance properly.

  3. #3
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Well first get a .swf that works perfectly on your local machine. "loadMovie" is internal to the .swf and has nothing to do with a Web page. Make sure there are no problems with the .swf. After that, embed the .swf into an HTML page. With a good .swf your HTML will look something like this:

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

    None of this has anything to do with ActionScript.
    Re-check your ActionScript to make sure it works without putting it on a page. It looks pretty jumbled to me.
    Then when you are really ready to load a good .swf unto your page, use swfoject.js or something like that to eliminate the "Click to use control" dialog box.
    http://www.adobe.com/devnet/flash/ar...object_02.html

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



Recent Articles