loading external swfs through container mc's

  • batty
  • Born
  • Born
  • batty
  • Posts: 2

Post 3+ Months Ago

I am trying to extend upon an already built flash site that utilizes
_root
Here is what leads up to my problem..

The first swf loads an external swf into a movie clip:

BUTTON SCRIPT:

on(release){
_root.gotoAndPlay("buy");
}

FRAME "buy" SCRIPT:

loadMovie("buy.swf","content");

This works Marvelously, but then in the "buy. swf" I am trying to have a
button that plays a certain frame inside its own time line (buy.swf
timeline) and load another container movie clip (done manually on the
frame) with an external swf.

So my BUTTON SCRIPT in "buy.swf" looks like this:

on (release) {
content.gotoAndPlay(20);
}

My FRAME SCRIPT:

loadMovie("featured.swf","content2");

NOW THE PROBLEM IS: My button script in buy.swf does not go to and play
frame 20 so it never loads the external swf due to loadMovie script
being on a frame...how do i access this frame and external swf? I have
tried _root.myswf.gotoandPlay, I've tried
_root.content.content2.gotoandPlay...I've tried many a combos and
nothing seems to work....help?!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • dhonsvick
  • Beginner
  • Beginner
  • dhonsvick
  • Posts: 49

Post 3+ Months Ago

your targetting seems to be an issue here

this
Code: [ Select ]
on (release) {
content.gotoAndPlay(20);
}
  1. on (release) {
  2. content.gotoAndPlay(20);
  3. }

should probably be this
Code: [ Select ]
on (release) {
this.gotoAndPlay(20);
}

or this if you are using a component button

on (release) {
this._parent.gotoAndPlay(20);
}
  1. on (release) {
  2. this.gotoAndPlay(20);
  3. }
  4. or this if you are using a component button
  5. on (release) {
  6. this._parent.gotoAndPlay(20);
  7. }


try to avoid absolute targeting. If you are not getting the results you are expecting ... buttons not doing anything add the code to your buttons. to see if its at the path you expect.
Code: [ Select ]
trace(this);
  • batty
  • Born
  • Born
  • batty
  • Posts: 2

Post 3+ Months Ago

Thank you!

The second option:

on (release) {

this._parent.gotoAndPlay(20);

}

Works perfect! I had the 'parent' and the 'this' mixed up...so the coding is nested instead of following the layers...thanks again!

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 18 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
 
 

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