making a button play another swf file

  • jsh2134
  • Novice
  • Novice
  • jsh2134
  • Posts: 22
  • Loc: Boston and New York

Post 3+ Months Ago

HELP! I am trying to make a flash site, but currently I am having trouble with buttons. I've created a button and i am trying to have it open another swf when it is clicked...i kno its supposed to be something like

on (Release) {
goToAndPlay ()
}

I want it to play a file called portraits.swf and the first frame of it...preferably in the same window.

can anyone help?
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

you have to use the loadMovie , to load an external SWF into one of your Containers / movie clips .

so first will create an empty mc ...

Code: [ Select ]
this.createEmptyMovieClip("container", this.getNextHighestDepth());


now load the external swf located on the same folder ,
example you got " test.swf " that you want to load !

Code: [ Select ]
container.loadMovie("test.swf");

[/code]
  • jh1
  • Born
  • Born
  • jh1
  • Posts: 3

Post 3+ Months Ago

Don't quite understand where each bit of code sits. You'll have to assume some of us know nothing.

Can you please write again - in full - & where it should be please.

Thanks alot
J.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23460
  • Loc: Woodbridge VA

Post 3+ Months Ago

jh1 you are replying to a 3 year old post. Could you just create a new post, be a little more specific what your problem is, and tell us what version of flash and action script you are using? You can refer to this post in your new one if you'd like.
  • jh1
  • Born
  • Born
  • jh1
  • Posts: 3

Post 3+ Months Ago

Haha...yes I realised after, that I was indeed talking to a 3yr post. Silly me!

I've created 2 swfs. In each swf there are 2 buttons. 1 button should load up the other swf in it's place & the other button links to a different site.

I'm unsure as to what script should go on the button to load the other swf & my script on the other button to go to another site won't work when I view in a browser.

I've read quite a few bits of info here & there & I'm getting quite confused.

Cheers
J
  • jh1
  • Born
  • Born
  • jh1
  • Posts: 3

Post 3+ Months Ago

Oh sorry, using CS4 & AS2.0

Cheers

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.