View Full Version : Calling a swf inside of DW

01-27-2010, 03:20 PM
(not sure if i need coding for this swf problem inside DW)

OK.... i have a header made in flash, its 950 x 175 px. For every button in the header a swf is called in into a specif frame. The problem is that when the swf loads it does but not full size of 950 x 650 but it loads in the same header size. How can i make this work, hit the button and swf comes in in full size ?

this is the code of one of the buttons in my header: (action script 2)

var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());

var mcListener:Object = new Object();
mcListener.onLoadInit = function(target_mc:MovieClip) {
trace("movie loaded");

var MCL:MovieClipLoader = new MovieClipLoader();

MCL.loadClip("Diving.swf", container);

01-27-2010, 05:30 PM
Hi mate,

Are you trying to load an external swf into an iFrame?

I don't think you can do that (I've never done it anyway), you can load from the header animation an html file into the iFrame and this could contain the swf you want to load but unless the HTML as something other the swf you may as well do it all in Flash.

To target an HTML page into an iFrame in AS2 you use

<iframe src="defaultPage.html" name="container"></iframe>

button.onPress = function(){
getURL("pageToLoad.html", "container");

You should really be using AS3 btw.

Get back to us if you need more help.

01-27-2010, 05:36 PM
or in AS3

var iFrameURL:URLRequest = new URLRequest("pageToLoad.html");

btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void
navigateToURL(iFrameURL, "container");

01-29-2010, 03:03 AM
Hey Mate... good to see you around...

yeah.. i have to move to AS3... i will give it a try and let you know.. but i read about iframes and many people complaint about it... what you think ?

01-29-2010, 11:01 PM
To be honest mate I don't really use them at all.

I'm not totally sure what the community view is on iFrames these days.

There seems to be healthy debate on this forum about them you might wanna check it out.


Is this not something you could do entirely in Flash? Do you have design we could have a look at? or it might not even need Flash at all. Who's the site aimed at? Its hard to say much more without seeing a design.

01-30-2010, 09:16 PM
well.... the problem is that the site is made in Joomla so the client could could make his own updates.. but i will just divide the swf for each link and page will have its own swf, problem solved. i will give you the site as soon as a finished it.