Skip to main content
Inspiring
April 18, 2006
Answered

need actionscript onLoad help

  • April 18, 2006
  • 5 replies
  • 353 views
Hello,

I'm hoping someone can help me. I'm working on a project that someone else started. I have a main movie called "interface" with navigation off to the bottom right. When one of the nav items is clicked on (for example, "contact"), the contact.swf movie is then loaded on the left side of the site (via an empty movie clip called "holder"). Right now there's some fairly complicated actionscript that does this and I've just created a form page that I now need to perform a similar function without all of that actionscript.

Basically on the contact page (contact.swf) there's an Email Us movie clip that performs as a button, I'd like for that contact us page to change from contact.swf to contact_form.swf when clicked. In other words I'd like the empty movie clip "holder" to play contact_form.swf instead of contact.swf. Can someone help me with the correct syntax? I was thinking it was holder.loadmovie, etc. but shouldn't there be some on(release) function as well?

I'm confused, please forgive me.
This topic has been closed for replies.
Correct answer
Try this

getURL ("javascript:NewWindow=window.open('recentFlyer.htm','newWin','width=400,height=500,left=0,top=0, toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");

5 replies

Correct answer
April 19, 2006
Try this

getURL ("javascript:NewWindow=window.open('recentFlyer.htm','newWin','width=400,height=500,left=0,top=0, toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
Inspiring
April 19, 2006
Many thanks! Much appreciated...all fixed now.
Inspiring
April 18, 2006
Well I've almost figured it out. On my movieclip, I put in the following actionscript...

on(release) {
loadMovie("contact_form.swf",_root.holder);
}


However, it's loading in the wrong place and is keeping the title from the Contact page there, but is removing everything else.
Inspiring
April 19, 2006
Try the following code below and adjust the x/y coordinates as needed.

on(release)
{
this._parent.holder.createEmptyMovieClip("contactFormHolder_mc",1);
this._parent.holder.contactFormHolder_mc._x = 300;
this._parent.holder.contactFormHolder_mc._y = 200;

loadMovie("contact_form.swf", this._parent.holder.contactFormHolder_mc);
}
Inspiring
April 19, 2006
Thanks for your help. This produces the same result as my original code unfortunately, even with the x/y coordinates. It is still appearing lower right corner. We don't want to spend a lot of time on this and have decided to just open a pop up html window with the form on it (since we'll be redesigning the site anyway). I'm not sure though, how to specify the size of the window I want to open, which is 450px by 500px.

So far I have:
on (release)
{
//Opens link in a new window.
getURL (" http://www.livingatthewestin.com/contact_form_test.html", "_blank");
}

Any thoughts? Many thanks.