Solved

Target not playing...

Posted on 2007-03-30
2
135 Views
Last Modified: 2010-04-03
I've got some code written below that goes along with a movie functioning as a button. I want the "sound" movie to play which is "parent_EjectButton." It plays as long as I'm not going to an actual URL. If that's blank, I get my sound. If that field is blank, the link works fine, but there's no sound and I don't know why.

Here's the code:

on(rollOver){
      
      this.gotoAndPlay(2);
      
}

            
on(rollOut){
            this.gotoAndPlay(11);
}
on(release){
      tellTarget ("_parent.EjectButton") {
            play();
      }

      getURL("../Retail/index.asp");
}

What am I missing?
0
Comment
Question by:brucegust
2 Comments
 
LVL 13

Expert Comment

by:FLAASHER
ID: 18825669
on(rollOver){
     
      this.gotoAndPlay(2);
     
}

           
on(rollOut){
            this.gotoAndPlay(11);
}
on(release){
    this._parent.EjectButton.play();
      getURL("../Retail/index.asp");
}



make sure u have a MC iwth "EjectButton" name .... if this not work send me ur FLA

FLAASHER
0
 
LVL 4

Accepted Solution

by:
D3SIGN3R earned 500 total points
ID: 18833038
Your flash movie will lose focus, sometime too quickly for your mc to play or recieve instruction to play.

Have another mc as a run-off, with only actionscript in it, and lets say 20 frames. Call it ac_mc (the instance), and make sure its on the timeline.
Go into it, and in frame 1 put a stop() action.

 in frmae 20 put an action:
getURL(_root.destination);

on your button/mc in the root, put:

on(rollOver){
      this.gotoAndPlay(2);
}    
on(rollOut){
            this.gotoAndPlay(11);
}
on(release){
    this._parent.EjectButton.play();
      _root.destination="../Retail/index.asp";
_root.ac_mc.play();
}

// this will tell the noise to play, and tell the mc to play as well, giving you a 20 frame leeway (or less if you wish) before it launches the asp file.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now