A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [CS3] External SWF Files

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    10

    Unhappy [CS3] External SWF Files

    Hello people!

    I am trying to write the action script for external SWF files for my flash project. It does not work! I'm using Flash CS3. When you first launch the site, it has animation on the main page. As for the drop down button, I wanted to click on the 1st button, it display an external swf file. It does not work. Please help! Needed your advised to make it works. I have attached the flash file. Please take a look and tell me what I did wrong! Thank you in advanced.

    PS: I also upload the file the the magaupload as well.
    http://www.megaupload.com/?d=HUV1EFHF (4.8MB)

    Vince

  2. #2
    Hey there!

    You had one misspelling:
    Code:
    hospital.onRelease = funciton() {
    which should be
    Code:
    hospital.onRelease = function() {
    The other problem is your code is on the root level and is targeting "hospital". Because "hospital" is on the second frame of the "menu" movie clip, you should probably put the hospital click function inside the "menu" movie clip. If you do this, however, remember to make sure that you target the loader which is on the root:

    Code:
    hospital.onRelease = function() {
    	trace("hospital");
    	_root.loader._visible = true;
    	_root.mcl.loadClip("sample.swf", holder);
    }
    In general, it looks like this whole FLA could use some help with naming instances and targeting them correctly. As a rule of thumb, you should name everything you put on the stage. Then remember when you want your actionscript to point to something, it is relative to where you put your actionscript.

    Rock on,

    --eric

  3. #3
    Junior Member
    Join Date
    May 2008
    Posts
    10

    External SWF Files

    Eric,

    Thank you so much for your help! I appreciated a lot.

    Vince

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center