# Help! Connecting/Loading swf files for website

**URL:** <https://forum.kirupa.com/t/help-connecting-loading-swf-files-for-website/309361>\
**Category:** Uncategorized\
**Created:** [May 12, 2010, 9:09pm UTC](https://forum.kirupa.com/t/help-connecting-loading-swf-files-for-website/309361 "2010-05-12T21:09:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pixxie](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@Pixxie](https://forum.kirupa.com/u/Pixxie)\
**Post date:** [May 12, 2010, 9:09pm UTC](https://forum.kirupa.com/t/help-connecting-loading-swf-files-for-website/309361/1 "2010-05-12T21:09:16Z")

</div>

Hello!

I’m a bit of a newbie at Flash and building my first website. I’ve built all the pages individually as different files and now I want to use AS to connect them all and link from my main page to the other files using buttons.

I thought I was on the right track with this code, but it returns an output error (both below). Can anybody help?

import flash.display.Loader;  
import flash.events.MouseEvent;  
import flash.net.URLRequest;

var myLoader:Loader=new Loader();  
housebtn\_btn.addEventListener(MouseEvent.CLICK, housepagecontent);  
function housepagecontent(myevent:MouseEvent):void {  
var myURL:URLRequest=new URLRequest(“FC Website - House.swf”);  
myLoader.load(myURL);  
addChild(myLoader);  
};

* * *

TypeError: Error #1034: Type Coercion failed: cannot convert fl.controls::TextArea@78fd8201 to flash.display.MovieClip.  
at flash.display::Sprite/constructChildren()  
at flash.display::Sprite()  
at flash.display::MovieClip()  
at FCWebsite\_fla::MainTimeline()

* * *

Thank you!!

Pixxie
