Stopping and Playing some movie clips?
I have a problem with some AS3 code and i don't understand why.. my code looks like this:
stop();
halt.addEventListener(MouseEvent.CLICK, stopplaying);
function stopplaying(event:MouseEvent):void {
MovieClip(root).stop();
MovieClip(root).gun.stop();
MovieClip(root).gun.gt1.stop();
MovieClip(root).gun.gt2.stop();
MovieClip(root).gun.gt3.stop();
MovieClip(root).gun.gt4.stop();
MovieClip(root).gun.gt5.stop();
MovieClip(root).gun.gt6.stop();
gotoAndStop(1);
That code is set to listen to a pause button to pause all movieclips when pressed but the last 2 rows "MovieClip(root).gun.gt5.stop();
MovieClip(root).gun.gt6.stop();" doesn't work and gives me this output:
TypeError: Error # 1010: A term is undefined and has no properties. third_fla at::ppBtn_20/startplaying ()
But there shouldn't be a problem with this, cause the movieclips are the same as the others and has an instance name of gt5 and gt6 just like the other movie clips, and the code is obviously the same?
Try tracing the different objects on those lines and see if they are recognized. It may point to a misnaming or object absence.
function startplaying(event:MouseEvent):void {
MovieClip(root).play();
MovieClip(root).gun.play();
MovieClip(root).gun.gt1.play();
MovieClip(root).gun.gt2.play();
MovieClip(root).gun.gt3.play();
MovieClip(root).gun.gt4.play();
trace(MovieClip(root).gun.gt5, MovieClip(root).gun.gt6);
MovieClip(root).gun.gt5.play();
MovieClip(root).gun.gt6.play();
gotoAndStop(2);
Similar Messages
-
Idvd plays some movie clips in a widescreen preview
I can't figure out how to keep some clips from going into widescreen preview. They are marked to play in 4:3 mode. Of the 15 clips four play in widescreen preview in the preview mode. Help!
Whenever this happens to me it's usually because I didn't make the proper adjustment on my TV/LCD so it plays back in 4:3 as opposed to WS/ 16:9. But if that's not the case in your own situation then try the second download in the following link and feel free to post back:
http://homepage.mac.com/sith33/FileSharing34.html -
Play multiple movie clips - with sound
Hello Forum members,
I am a total new comer in terms of flash and action script,
self-educated and Adobe forum and internet educated. I can now
click a button and stop and start a movie clip, use attachMovie,
and even mute sound in a movie clip (not video). I am currently
using Flash 8, and waiting for CS3 (downloaded a trial, and like it
better than Flash 8).
Enough history - now to my question - I have an application
that had 3 scenes. I read in some Adobe article
"Flash Best Practices" that it was not a good idea to use
scenes in an application. I converted my Scene 2 and Scene 3 into
movie clips.
I figured I could either put each movie clip on a separate
layer in my timeline (mc_scene2, mc_scene3)
and play them, one after the other (did not quite work, more
later). Or...
copy the timelines from the scenes, and add those frames to
my Scene 1, making a application with both scenes staggered one
after the other in the main timeline. Or...
Keep Scene 1 and at the end of scene 1,
attacheMovie("mc_scene2", etc) and when scene 2 was done play and
or attach the final movie clip (mc_scene3).
I could not figure out how to tell when mc_scene2 was done
using the attacheMovie method, so I could then attach mc_scene3,
etc.
How would I be able to tell when one attached or loaded movie
clip is finished, and then start the next one?
Or what is the suggested way to use actionscript to load a
movie, play it, and when the clip is done, load and play the next,
etc.
Thanks for a good forum,
eholz1Hello Again - I guess there is much that I do not understand.
I followed the tip above - or so I thought.
I have "buttons" on my movie clips that play the clip when
clicked.
I have placed stop actions in frame 1 of each movie clip.
I tried placing mc_scene2 and mc_scene3 on their own layer
in the timeline,
and put the code above in my actions layer (Scene 1).
it seems that nothing really works - the _visible property
seems not to work,
etc - I must be doing something wrong. What layer should the
two mc's be
placed?
Thanks for the info
Eholz1 -
4.2.1 was supposed to fix problems, but it only created new ones. No video on some movies, no audio on others, and can't even play some movies. Can you please provide a means to restore 4.1.1?
Let me try again, Chenks. I'm a technical person by profession, and so can get deeper into things like this, but I have not attempted to use these methods of communication in the past. I'm trying to get some feedback to Apple on their worsening a product and really messing with existing customer configurations. I'll try to break things up below.
1. Configuration:
Existing Apple TV and Mac Mini configuration in place since December 2010.
Three Apple TVs, one in Family Room for music and movies, one in Master Bedroom for music and movies, the third one in the Living Room for music only.
I'm using iTunes as library. (Probably an obvious statement, but wanted to mention that.)
2. Pre 4.2.1
No problems at any location since configuration finalized and all equipment installed in December.
Since December, Family Room entertainment equipment was updraded to a new Sony Bravia 3D, and a new Pioneer receiver. The Master Bedroom still has the original Toshiba 32HLC56 TV. That unit has only one HDMI input. I'm using the built-in speakers. This TV/Monitor is about fives years old.
3. Problem
I updated the software in two of the Apple TVs to 4.2.1. I updated the Family Room device and the Master Bedroom device. I had not updated the Living Room device.
After updating to 4.2.1, the Family Room equipment works fine. That's the location with the newer TV and receiver.
The Master Bedroom has different problems with different movies: e.g. "The Little Mermaid:" video, no audio. "The Lion King:" movie wont start at all.
Additionally, in the Master Bedroom some movies work fine, other movies start but immediately go into pause mode. Pressing pause button on Apple remote will not initiate start of movie, screen does "flicker" for a moment but movie does not start to play, showing only the last frame that had been streamed.
4. Not really a problem for me.
Fortunately for me, I had not updated the Apple TV in the living room so I used it to troubleshoot the problem. Initially I thought it was a defective Apple TV in the Master Bedroom. I took the unit to the Apple Store in town and they exchanged it for me. I brought the replacement Apple TV home but I did not install it immediately.
While testing the Master Bedroom set up once again to make it was working for our afternoon movie watching, I was again reminded that a software update was available. That message came up because it was the unit I had brought over from the Living Room. I proceeded to update the Apple TV to the new software version (4.2.1).
As soon as I "updated" the software in the Apple TV to the new 4.2.1, the same problems manifested themselves. At that point I suspected that the problem was with 4.2.1, and not with the hardware.
I called Apple Support and went through a series of troubleshooting techniques. We tested the Apple TV with the new 4.2.1 installed in it. This is the unit which originially in the Living Room. Under the direction of the Apple TV support technician, I used the Family Room gear and the Master Bedroom gear to try and isolate the problem to hardware or software.
We eliminated the following as potential problems:
a. TV speakers in the Master Bedroom
b. HDMI cable
c. Ethernet connection
5: Conclusion:
Fortunately for me, again, the Apple TV that the Apple Store had given me that morning still had 4.1.1. So I installed that unit in the Master Bedroom and everything started working normal again.
6. Side note:
An interesting observation: In early March I copied several movies from the Mac Mini to my iPad and some to my wife's iPad. All movies worked fine on our flight out and while we were away.
My wife recently (about a week ago) updated the software in her iPad. and now some of the movies that played just fine on her iPad are exhibiting the same problems as the Master Bedroom TV when it is connected to an Apple TV with software 4.2.1.
Apple has been trying to fix some problems in 4.2 when it released 4.2.1. I make that observation based on recent articles I found on the web. Most likely the Apple engineers were trying to fix things in one place and broke them in another.
Clear as mud, isn't it?
7. In closing:
I'm good to go, I just need to remember not to update the software in the Master Bedroom Apple TV. I want to keep that unit at 4.1.1. It's possible that Apple might come to the realization that they hosed things for some of us. Because I do have three units in my home, I can experiement with the other two units should a "fix" come out. I can then update one of the two devices, connect it to the Master Bedroom TV, and see if the problem was corrected. If not, I stay with 4.1.1. But I'm not convinced that Apple will see this as their problem, it's always easier to point elsewhere.
Regards, -
Playing a Movie Clip within a Movie Clip on load
Hi,
I'm trying to play a Movie Clip animation that is within a Movie Clip after a button has been pressed in a different Movie Clip.
The issue is that all Movie Clip animations are playing as soon as the SWF is loaded.
I have a separate Main.as file that contains all of the coding except for the animation stops:
package
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Main extends MovieClip
var title1:Title1;
var scene1:Scene1;
var scene2:Scene2;
var scene3:Scene3;
var scene4:Scene4;
var scene5:Scene5;
var scene6:Scene6;
var scene7:Scene7;
var scene8:Scene8;
var scene9:Scene9;
var scene10:Scene10;
public function Main()
title1 = new Title1();
scene1 = new Scene1();
scene2 = new Scene2();
scene3 = new Scene3();
scene4 = new Scene4();
scene5 = new Scene5();
scene6 = new Scene6();
scene7 = new Scene7();
scene8 = new Scene8();
scene9 = new Scene9();
scene10 = new Scene10();
addChild(title1);
title1.buttonStart.addEventListener(MouseEvent.CLICK,onButtonStartClick);
scene1.buttonWalkOutside.addEventListener(MouseEvent.CLICK,onButtonWalkOutsideC lick);
//title
function onButtonStartClick(event:MouseEvent):void
addChild(scene1);
removeChild(title1);
Scene1(parent).gotoAndPlay("frame1")
//scene1
function onButtonWalkOutsideClick(event:MouseEvent):void
addChild(scene2);
removeChild(scene1);
So right now, I'm getting this error:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@46534041 to Scene1.
at Main/onButtonStartClick()
Any help is greatly appreciated... I've been grinding at this all night.I had been trying a bunch of different methods after searching for clues on Google, so it probably doesn't make sense with the parent.
I replaced the code with what you wrote, and I am given this error now:
Main.as, Line 44
1120: Access of undefined property scene1Text1.
Is there somewhere I have to declare scene1Text1 in Main.as? -
Rollover buttons that play a movie clip.
Hello,
I am new to Flash and I am trying to accomplish a simulation such as this example, http://www.its-about-time.com/investinesart/coalplantvirtualtour.swf. I have all of my movie clips done, but how do I tell a rollover button to play a specific movie clip? I also want to have all the movie clips to play simultaneously via a rollover button as shown in the example. I've attached a captured image of my timeline, if that helps. I've tried everything so far, but nothing is working! What is the simplest way of doing this?
I have this inside one of the movie clips (mc_2) in a seperate layer under - (actions)
RO_btn.onRollover = function(){
mc_2.play();
On the main timeline I have an actions layer with this:
stop();
Thinking that this may stop all of my movie clips but it doesn't.
Should I make an actions layer in each movie clip with this syntax huh? stop();?
I'm frustrated!!
Thanks, if you can help!
MGHi,
I have made something that you are looking for.
It will be of help to you.
basically you will have to create a few movie clips namely:
2 buttons: (name them a_btn, b_btn, c_btn, d_btn, e_btn)
3 movie clips (I am taking example image1_mc, image2_mc, image3_mc)
in each of these movieclips.place 2 frames and on second frame put your movieclip(one in one).on both the frames put stop()
now click on a_btn and write this script
on (rollOver) {
_root.image1_mc.gotoAndPlay(2);
_root.image2_mc.gotoAndPlay(2);
_root.image3_mc.gotoAndPlay(2);
on (rollOut) {
_root.image1_mc.gotoAndPlay(1);
_root.image2_mc.gotoAndPlay(1);
_root.image3_mc.gotoAndPlay(1);
with this all 3 animations will work simultaneously. if you need to run any one of the movieclips at a time the you can address that mc in particular
.Say if you want only 1 mc to move at a time then put this on btn 2
on (rollOver) {
_root.image1_mc.gotoAndPlay(2);
on (rollOut) {
_root.image1_mc.gotoAndPlay(1);
.Dont forget to give proper instance names to movieclips.(they are in properties panel.)
Cheers! -
Playing different Movie Clips onRollover?
I have several buttons that I would like to play different
movie clips
onrollover on the stage. So if button 1 is rolled over it
plays a clip
in the lower right corner and when rolled off it stops and if
button 2
is rolled over it does the same.
How is this done?
Thanks!This is the code I am currently using to play and stop a
movieclip:
myPlay_btn.addEventListener(MouseEvent.CLICK, playMc);
myStop_btn.addEventListener(MouseEvent.CLICK, stopMc);
function playMc(e:MouseEvent):void{
my_mc.play();
function stopMc(e:MouseEvent):void{
my_mc.stop();
1. How do I drag my movie clips onto the stage, but not have
them
display until the button is rolled over?
2. Would this code just be applied for each button and
modified from
CLICK to OnRollover?
Thanks!!!!
kglad wrote:
> assign a rollover listener to button 1 and in its
listener function apply the play() method to your right corner
movieclip. likewise for button 2. -
Unable to play some movies from Netflix on my iPad. When I click on a movie an error message comes up "Cannot play movie. Please try again later." I contacted Netflix but have not been able the help so I am wondering if it's my iPad. I didn't have a problem before but I have recently upgraded to iOS 7.1. Also is a certain amount of storage needed to play a movie? About how much is that?
Hello all,
I have an iPad 2 16GB with iOS 7.0.3 and Netflix version 5.0.2. I cannot watch netflix on an External LCD monitor that I have through VGA out. I use bluetooth speakers, so the AirPlay is going to that for Audio. Before this update, this combo worked without an issue.
So as of Friday Nov. 8/2013, I contacted Netflix support, and they said they fixed the problem on their end, and the fix is on the Apple side of things, and to contact Apple support.
So, I contacted Apple support, and the first person I spoke to said I would have to agree to pay a $35 fee for 30 days of support to this problem since my unit is out of warranty. I said this isn't a hardware issue, it's a software issue, and I'm not willing to pay to fix a problem you created. So I got a Senior Level advisor on the line, and she was helpful, and she's looking into the issue for me and said she'll contact me sometime on Tuesday or Wednesday (Nov. 12 or 13) to let me know of the issue.
Here's the thing: this is a combination of Netflix and iOS not working correctly with any of the Apple Authorized Dongles. This is truly a code error that some hot shot programmer had major oversight on, and their management didn't catch it either. There was no reason for Netflix to rush to get this Netflix update going until Apple sorted out the bugs in iOS 7.
Anyway, if I hear anything from Donna (the advisor), I'll post it and let you guys know. In the mean time, good luck! -
Using Canopus ADVC110 analog to digital converter.
VTR on.
Dipswitch 2 is on. Camcorder is NTSC.
Using RCA cables to connect to front of Canopus.
9pin firewire on MacBook Pro to 6pin firewire on back of Canopus.
Held the input select button for 25 seconds since copyright not an issue (home movies).
Opened Garageband and played some. Quit. Reopened IMovie.
Still can't get color. Can see video but color not solid.
Any ideas?Thanks for getting back to me. I've tried two different yellow RCA cables and went out and bought a yellow composite cable on one end and the S-video on the other to connect to the ADVC110. Still didn't work. The picture comes through but the color is not quite there. I tried connecting camcorder directly to the TV via the yellow RCA cables and same thing so now I'm wondering if it's the camcorder or the analog to digital tv issue. I'm almost ready to give up.
-
How come when I stop and start an audio clip before its done...
How come when I stop and start an audio clip when before its done, that when I play it it only plays part of the file?
I'm not sure if I got you right, but do you mean that it's like pausing...
I have never played an audio clip with java, but if this is the case, maybe you have to rewind the clip.
/J Lindroos -
Since upgrading to Yosemite I cannot get directly to Netflix. I get a to Netflix and there is a big message about having to download/install Microsoft Silverlight. I can't get that to work and don't want it anyway. I just want to open Netflix and play the movies. What should I do?
I can't get that to work and don't want it anyway.
You need Silverlight. That is the application that plays the Netflix movies.
http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx -
How do I get my music to quit scrolling and stop and play a song?
How do I get my music to quit scrolling and stop and play a song?
Basically it means that the files are not on the location where iTunes is expecting to be.
What you can do is remove those songs from you playlist, then try to locate them on your harddisk again, and then in iTunes you can choose file > Add folder to Library... , specify the location where you found them and they will be added again. -
Stop and play buttons...
How would I go about adding stop and play buttons to a slideshow?
stop1.addEventListener(MouseEvent.CLICK, stop1);
play1.addEventListener(MouseEvent.CLICK, play1);
function stop1(event:MouseEvent){
if(this.currentFrame == 1)
{ gotoAndStop(this.totalFrames);
function play1(event:MouseEvent){
if(this.currentFrame == 1)
{ gotoAndStop(this.totalFrames);well idk if the code is even right i need help? The way the slide show is working is i have it on the timeline.... With this code it doesnt play automatically and when i push play it goes through them in like 2 seconds and you can't see anything?
stop1.addEventListener(MouseEvent.CLICK, stopSlide);
play1.addEventListener(MouseEvent.CLICK, playSlide);
function stopSlide(event:MouseEvent):void {
stop();
function playSlide(event:MouseEvent):void {
play(); -
Podcasts stops and plays a previous one
In my itunes (latest update), my podcasts randomly stop and played the previous episode. This patterns seems random as well. I don't download podcasts, but stream them (right click, play). However, when I download the podcast and play it, its fine. But I would rather stream it.
Also, my internet is fine. I am on blazing fast university internet.
Does anyone have a fix for this?delete off any apps that are asking for the wrong apple id and download/sync them over from the correct one
-
How do I delete old email addresses, when I try and play some of my songs I get a not authorized pop-up with an old email address?
Edit the list the comes up when you go to the Window menu and select "Previous Recipients".
charlie
Maybe you are looking for
-
how do i edit my billing info if my credit card associated with apple id expired and i have a duty to app store from the time when i had the old credit card? so the thing is a few days ago i made an app store purchase and i didn't know i was running
-
VPN no longer working iPhone 5, possibly related to carrier settings 15.6
Based in the UK on the Three Network. Use my iphone's hotspot feature for internet at home. Use VPN for security and safety, using the OpenVPN protocol on my mac and pc. Since the 15.6 carrier update (4G), I have been able to connect to the VPN, but
-
XCODE WINDOW INVISIBILITY/Add images to background
is there any way you can get rid of the actual window or make it invisible to the user? Also how do i add pictures to background of my window? If i understand correctly, you have to add a UIImageView, and link it from the resources file, but then how
-
Monitoring Database with a Firewall
What's the recommended procedure for monitoring (via OMS) a database that has a firewall? Install a separate OMS on the same side of the firewall for the given database - or use a central OMS repository on the other side of the firewall? What are the
-
What happend to "just for you" in the iTunes Store?
This may be a stupid question...but I just downloaded the update (iTunes 9) and can't seam to figure out how to find the "Just For You" catagory. It used the Genius info from my library to find new music that I may enjoy. I LOVE that feture and purch