all groups > flash actionscript > april 2006 >
You're in the

flash actionscript

group:

need actionscript onLoad help


need actionscript onLoad help Mcginess13
4/18/2006 9:26:15 PM
flash actionscript:
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.
Re: need actionscript onLoad help Mcginess13
4/18/2006 9:42:22 PM
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.
Re: need actionscript onLoad help myIP
4/19/2006 3:07:38 AM
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);
}

Re: need actionscript onLoad help Mcginess13
4/19/2006 3:12:38 PM
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.
Re: need actionscript onLoad help quethenoo
4/19/2006 3:14:51 PM
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);");
Re: need actionscript onLoad help Mcginess13
4/19/2006 3:19:27 PM
AddThis Social Bookmark Button