Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[FMX]Play And Stop Controls For Dynamically Loaded Movie



Hi

I'm sure this is an easy one, but i can figure it out.

i got a swf, which i've dynamically loaded into an mc called pitch_mc . After loading it want flash to stop the file from automatically playing, then have play and stop buttons that trigger the movie.

Could ya point me in the right direction? I can load movies fine, but i havent used transport buttons yet :S



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 03-31-2004, 04:04 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

[FMX]Play And Stop Controls For Dynamically Loaded Movie
Hi

I'm sure this is an easy one, but i can figure it out.

i got a swf, which i've dynamically loaded into an mc called pitch_mc . After loading it want flash to stop the file from automatically playing, then have play and stop buttons that trigger the movie.

Could ya point me in the right direction? I can load movies fine, but i havent used transport buttons yet :S

Play/stop Dynamically Loaded Swf
I had this same question a couple weeks ago with an AS2 carousel, I have since changed it to AS3 and solved many of my problems, but I'm still having this one last problem before this will be complete. I need the swf that is loaded from the xml to play only once it has reached the front position. if it's not in the front position I need it to be stopped. Right now I have it playing on click, but I need it to just play when it gets to it's position.

Right now I have a function called checkFront that on complete of the rotation needs to check which movie clip is in the front and if its the swf, then play, but I don't know what names/variables to use. I'm having a lot of syntax issues, and I'm not exactly an actionscript guru, but I'm attempting to llearn! Any help would be awesome!

My Document class:
Code:
package {

import caurina.transitions.Tweener;
import com.becca.Carousel;
import com.becca.CarouselItem;
import flash.display.Bitmap;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MouseEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.events.KeyboardEvent;


public class CarouselDoc extends MovieClip {

// on stage of .fla
public var rightAd:MovieClip;
public var leftAd:MovieClip;
//public var right_mc:MovieClip;
//public var left_mc:MovieClip;
public var holder_mc:MovieClip;
public var loading_txt:TextField;

public static const XML_URL:String = "images.xml";

private var carousel:Carousel;
private var imageList:XMLList;
private var numImages:int;
private var currentImage:int = 0;


public function CarouselDoc():void {

carousel = new Carousel(500, 250, 220);
carousel.useBlur = false;
holder_mc.addChild(carousel);

stage.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
rightAd.addEventListener(MouseEvent.CLICK, leftClickHandler);
leftAd.addEventListener(MouseEvent.CLICK, rightClickHandler);
//right_mc.addEventListener(MouseEvent.CLICK, rightClickHandler);
//left_mc.addEventListener(MouseEvent.CLICK, leftClickHandler);

var uloader:URLLoader = new URLLoader();
uloader.addEventListener(Event.COMPLETE, xmlHandler);
uloader.addEventListener(IOErrorEvent.IO_ERROR, xmlHandler);
uloader.load(new URLRequest(XML_URL));
}

private function xmlHandler(event:*):void {
event.currentTarget.removeEventListener(Event.COMPLETE, xmlHandler);
event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR, xmlHandler);
if (event is IOErrorEvent) {
loading_txt.text = "could not load xml file";
} else {
var xml:XML = new XML(event.currentTarget.data);
imageList = xml..image;

numImages = imageList.length();
loadImage();
}
}

private function loadImage():void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, imageHandler);
loader.load(new URLRequest(imageList[currentImage].toString()));

}

private function imageHandler(event:*):void {
event.currentTarget.removeEventListener(Event.COMPLETE, imageHandler);
event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR, imageHandler);
if (event is IOErrorEvent) {
loading_txt.text = "could not load image" + currentImage;
} else {
var image:Loader = event.currentTarget.loader;
carousel.addItem(image);
}

if (++currentImage < numImages){
loadImage();
} else {
loading_txt.text = "";
}
}

private function rightClickHandler(event:MouseEvent):void {
carousel.targetRotation += 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic", onComplete:checkFront } );
}

private function leftClickHandler(event:MouseEvent):void {
carousel.targetRotation -= 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
}
private function keyHandler(event:KeyboardEvent):void {

if(event.keyCode==37){
carousel.targetRotation -= 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
} else if (event.keyCode==39){
carousel.targetRotation += 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
}

}
private function checkFront(event:*) {


}

}
}
My XML:


Code:
<menuItems>
<item>
<image>pics/VS Home Page Animation.swf</image>
<link>http://www.ema-eda.com/training/seminars.aspx</link>
</item>

<item>
<image>pics/CadenceWebinar.jpg</image>
<link>http://www.cadence.com/cadence/events/Pages/allegro_webinar_series.aspx?CMP=cbnr20081006</link>
</item>

<item>
<image>pics/Class.jpg</image>
<link>http://www.ema-eda.com/training/orcadtraining.aspx</link>
</item>

</menuItems>

Keyoboard Controls To Play / Stop / Pause Movie
Hello,

I am attempting to create a presentation in Flash.

I will be creating flash movie animations but would like to control them just by a click of a mouse button or by pressing some keys on the keyboard.

eg. N = stop ; M = play ; space bar = pause.

Can someone tell me how I would do this?

thanks,
andrew

How Can I Stop/play A Dynamically Loaded Movieclip
I've loaded my swf and everything work fine, but I want to be able to stop it and to know when it is finished. How can I do that ?

var myLoader:Loader = new Loader();
myLoader.load(new URLRequest("animation775-300.swf"));

addChild(myLoader);

var logoAnim:MovieClip = MovieClip(myLoader.content);
logoAnim.stop();

The last line doesn't work.

TypeError: Error #1009: Cannot access a property or method of a null object reference.

Anyone Know Of A Tutorial To Create "play / Stop" Movie Controls?
I'm using FLASH 8 PRO if that matters. I would like to have a "Play", "Stop", and maybe even some volume control, too, but if I can just get the above 2 things, that would be awesome (so whatever tutorial that you know of that could help me in this would be spectacular!).

(stop / Play) Loaded Movie
Hi.

I load an external movie by using:

loadMovie ("movie1.swf", "_root.movieHolder");

where 'movieHolder' is an instance created to specify the location for the movies to be loaded... and it works fine.

Now, when I try to use some buttons from the initial movie to stop or play the movie loaded using this:

on (release) {
tellTarget ("_level1") {
stop ();
}
}

it doesn't work....x-(

Can someone tell me what the problem is?

Play Once And Stop Loaded Movie
I am loading into a container MC multiple .swf's (QT videos compressed to SWF with Sorenson). I am able to the loadmovie and control its playback. However the SWF once "played" will loop until I press a "stop" button.

How can I get it to play once and stop.

I have looked all over and can't find a workable solution.

Thank you in advance for your patience and help.

Scott:

Play, Stop Controls For SWF
I need to give users controls to this movie.

http://www.policetales.com/videos.html

The only way I can hide the sensative information is to import the mpeg and put a layer over it. I have MX 2004. Can someone tell me how to make that an FLV file from MX 2004?

Also, a simple FLA file that can do the start stop would be the most help....

Also, enjoy the video, I arrested the 19 year old gangbanger and played him a one of my 3 year olds Wiggles tunes from my Ipod while I took him to jail. He probably was singing it all day in county lockup!

;-)

THANKS

Pause/Stop/Play Controls
HI all,
I'm trying to program nav controls for a flash presentation I am working on. Pause button is supposed to freeze the frame very much the same way a vcr would pause a tape. Play should "unfreeze" the presentation and stop should "turn it off" (may be take them to a frame of "black"). Please help!!! I am under a deadline and my brain is fried.
Thanks,
Inna

Stop And Play Controls For Video
hi ya'll,

i'm kind of a copy and paste actionscripter. i don't usually understand exactly what i'm doing!

Anyways, is there a simple way to make a video clip, which is placed into an fla and embedded into a swf, play and stop?


thanks!

tara

Need To Add Controls Like Play, Stop, Pause
where can I find information about this please? I just want to add controls so that people can control if they play or pause or stop the animation.

Can anyone point me to a tutorial or somewhere about howe to do this please? Thanks.

Need To Add Controls Like Play, Stop, Pause
I just want to add controls so that people can control if they play or pause or stop the animation when I export the fla.

Can anyone point me to a tutorial or somewhere about how to do this please? Thanks.

Mouse Location Controls A Mv To Stop Or Play
hi all:

how do I go about this:
I have a movie (called picmv) on frame 1 layer 1, it plays picA to picB by fading to it alternately.

PicA and picB is a button, when clicked will open a page in html which shows a bigger picture of what has been selected.

What I would like to do is the following.
When a mouse goes over the area of the pic, it will tell the picmv to stop while at the same time keeping the pic buttons active so that you can press on it to open the html page conatining a bigger picture of it.

What I am doin currently is making an invisible button the size of the pic, so when the mouse goes over it, i have placed an action on it to tell the picmv to stop on rollover and play or rollout. The problem with that is that it makes the pic buttons inactive to open the html page of the bigger pictures.

Is there another way to tell picmv to stop or play without placing a button on the pic area. Maybe using scripting, saying if mouse goes over this pic area it will tell picmv to stop or play without having to place a button there.

Can someone tell me how its done or have a flash sample or tutorial of it.

Thanks all

AS2 - Flv Player Stop/play Controls That Slide Up On Mouseover
I've created an flv player with the standard stop/play/pause/etc. buttons in a control panel movieclip called "controls_mc." When the play button is pressed, I want to leave the controls_mc panel up for 2 seconds, then side down. When the user hovers over the bottom half of the flv player(the stage) I want the controls_mc movieclip to slide back up. When stop is pressed I want the controls_mc panel to stay up until the user presses play again. What code will make this function?

Trully Advanced Play Pause Stop Controls Question
Hey there!

Have an issue.
I'm working on a technical animation. Info about it:
There are about 30 mc on my movie, distributed into their own layers.
Three mc of them control the rest ones (including themselves), using several pointers and variables.
The main timeline (_root) has just 1 single frame.
The AS logic (in a ludic way, no sintax needed to show it):
if _global.varX (varX is redefined thru mcs) == value1
{
_root.mc4.gotoandplay(1)
_root.mc5.gotoandstop(45)
_root.mc9.gotoandplay(45)
}
if _global.varX (varX is redefined thru mcs) == value2
{
_root.mc4.gotoandstop(45)
_root.mc3.gotoandplay(45)
_root.mc10.gotoandplay(1)
}
Just to position you, reader: in almost all mcs, from frame 1 to 45 means open the related valve or closure, and 45 to 60 means closing the related valve or closure.

Those to say that the transitions of the movie is provided by a scope of variables and pointers, and it get on loop as this scope reaches a certain level, ie, no timeline involved.

And here's the issue. I didn't get how to control de movie play pause stop using play() or stop(), or gotoandstop(), or gotandplay(). I've tried hard, getting vars values, passing new values, tons of tries. It losts its params, and the move get malfuncion, lost its logic.

Any ideas?? There is an answer whuch I don't know, because when testing the movie (Control -> Test movie) esc and enter buttons works perfectly. Fscommand could be used?

Well ppl, I don't know what to do, and I do need a solution. Or a flash of light that clarifies some way to try another solution.

Thank u all!
-gooloo (egidio)

How Do I Get The Play, Stop, Volume Controls To Appear In My Embedded Flash Object?
Hello,
I want to show .swf or .flv videos on my website--like youtube.com. I want to use the standard Flash Player object embedded in a web page, however, I cannot seem to find the exact params that make the standard controls appear (ie, Play, Stop, Pause, Volume, etc). I just want to show a video and have the Play, Stop, Pause, Volume controls visible at the bottom. What do I need to do to get these controls to appear?

Here's my current code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="

Play Back SWF Movie With Controls
I would like to import SWF movies into another SWF host movie that has playback controls like the media or FLV playback components. Note: these are not video clips embedded in a SWF but simply SWF animations.

These media components don't seem to accept SWF movies as a format. Are there any ready made solutions or do I need to use custom controls? Can you point to any examples or templates that would help?

Thanks!

Can You Sync Sound With Star/stop Controls Of A Movie?
I need to know how to stop the sound when the stop button is clicked on the movie, and then how to start the sound from the point it was stopped when the start button is clicked.

Any takers? - this has been puzzling me!

Cheers!

PAUSE Dynamically Loaded Mp3 (not Stop)
Hi all, I did a search and looked at tons of threads including Voetsjoba mp3 player.

This is way more complicated than what i need / want. i already have an mp3 player I've built that uses dynamic text (song title and track info) and variables to load an mp3 dynamically through .php & FlashVars. I only need 1 mp3 playing at one time and so this method works great for me. This way I can update it without going into Flash at all (but XML is overkill so no need for that either).

Thing is, I would like to have a play and stop button that actually stops and starts the track where it last was stopped / paused, rather than resuming from the beginning.

I also have built in a volume slider.

Here is the Actionscript I've been using:


ON VOLUME SLIDER MC [mySlider]:


ActionScript Code:
onClipEvent (load) {    mySound = new Sound();    mySound.loadSound(mp3Title,true);}onClipEvent (enterFrame) {    mySound.setVolume(_root.volume);}


ON PLAY BUTTON:


ActionScript Code:
on (release) {        _root.mySlider.mySound.start();}


ON STOP (PAUSE) BUTTON:


ActionScript Code:
on (release) {    _root.mySlider.mySound.stop();}


ON DRAGGER INSIDE VOLUME SLIDER MC:



ActionScript Code:
this.ratio = 0;dragger.onPress = function() {    this.startDrag(true, 0, 0, line._width, 0);    this.onEnterFrame = function() {        ratio = Math.round(this._x*100/line._width);            _root.volume = ratio;    };};dragger.onRelease = dragger.onreleaseOutside=stopDrag;


works ok, but like i said...stop does not "pause" the mp3 but rather stops it irrecoverably.

play starts from the beginning which I would like to avoid.

thanks in advance.

Flash Controls Not Showing During Movie Play
I've been importing mov's just fine and now im trying an AVI but no matter how much i mess with my size, the player's control do not show up. I can see barely get the height right but the width is off. what am i doing wrong?

Stop & Play A MC You Have Loaded Into Another MC
When my flash mc starts it loads an mc into an emty mc I named...
ie
loadMovie("nameofmcbeingloaded.swf", "mcbeingloadedinto");
that works fine, it loads the external mc into my flash mc. what I am trying to do is contol that mc that i have now loaded into another mc. I want to stop the loaded mc right away, and then when I click a button have it play... Here's what I was thinking with no luck;

_root.nameofmcbeingloaded.stop();
or
mcbeingloadedinto.stop();
or
_root.mcbeingloadedinto.stop();

I really have no clue how to control my loaded mc, I haven't created any variables or anything, iv'e litterally only loaded the clip just like i showed, and it works, but it plays and I cant stop or play it like I want to
thnx for your help....

Stop/Pause MovieClip In Dynamically Loaded Swf?
I have a movieclip playing within a swf that is dynamically loaded into another swf as a movieclip and I want to make a button that tells the internal swf to pause not just the main timeline (which it does now) but also pause the movieclip within the internal swf (which it isn't doing).

Is there a global movieclip stop/pause action I can use?

Here is what the pause button says now if it helps (the part in red is to stop dynamically loaded audio and works fine):

on (press) {
paused02=true
playing02=false
stopped02=false
voiceOverPosition=_root.voiceOver.position/1000;
_root.voiceOver.stop();
}

on (press) {
this._parent.placeHolder.stop();
this.gotoAndStop(2);
}

placeHolder is the name of the internal swf

thanks for the help

Play Dynamically Loaded SWF File
I am working on a Mad-Libs type application. When all the words are loaded, I want to be able to press play, and have audio read the words. So, I have external SWFs with the words recorded. My question is, how can I reference those dynamically loaded SWFs to play when I am not sure what the first one will be? Can anyone help? I can supply what I've done so far if that will help.

Play A Dynamically Loaded Mp3 A Second Time
i'm using some of Kenny Bellews code to create a button that launches an external MP3, the code works great and preloads the sound correctly but i am not able to play the sound for a second time after the initial load and play. He mentions in his tutorial 'How to Build a Preloader for Dynamically Loaded MP3's'(http://kennybellew.cowfly.com/tutori..._preloader.htm)
that "You could add an additional conditional test to see if the sound had already been loaded once, which would then only start the sound. However, this is a judgment call. Because the sound is cached on the user system, the sound will load much more quickly." I just cannot get this to work though.

I am currently using this code:

on the play button:

ActionScript Code:
on (press) {
    if (playing != true) {
        playing = true;
        preloadNow = 1;
        mySound.loadSound("flash/soundone.mp3", false);
    }
    //Close If-statement
    mySound.onSoundComplete = function() {
        playing = false;
    };
}
//END

the stop button:

ActionScript Code:
on(press) {
    if (playing==true) {
        mySound.stop();
    }//Close if-statement
}//END

and on the timeline:

ActionScript Code:
this.onLoad = function() {
    mySoundLoading = 0;
    _root.loadBar._xscale = mySoundLoading;
};
//END onLoad
this.onEnterFrame = function() {
    mySoundBytesTotal = _root.mySound.getBytesTotal();
    mySoundBytesLoaded = _root.mySound.getBytesLoaded();
    if (preloadNow == 1 && mySoundBytesLoaded>0) {
        mySoundLoading = Math.round((mySoundBytesLoaded/mySoundBytesTotal)*100);
        if (mySoundLoading == 100) {
            preloadNow = 0;
            _root.mySound.start();
        }
        _root.loadBar._xscale = mySoundLoading;
    }
    //Close if-statement 
};
//END onEnterFrame

and

ActionScript Code:
//
mySound = new Sound(mySoundMc);
mySoundVolume=100;
mySound.setVolume(mySoundVolume);
//

As i say, on the first click of the play button the mp3 preloads properly and then plays but if i press the button a second time it doesnt play at all. I tiried adding mySoundHasPlayed = 1 to the if (mySoundLoading == 100) conditional and then checking for this with the on(press) but that didnt work either, any ideas?

Thanks a lot.

Controlling Play Of Dynamically Loaded Swf
I've been working on this one problem for weeks now. I have made small simple AS3 and As2 projects, but nothing to this extent. I have created a carousel and I need my swf to play only when it is in the front position. I have a function checkFront that is called on on complete, I just don't know how to call that specific file from my xml to tell it to play when it is its position.

here is my document class:


Code:
package {

import caurina.transitions.Tweener;
import com.becca.Carousel;
import com.becca.CarouselItem;
import flash.display.Bitmap;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MouseEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.events.KeyboardEvent;


public class CarouselDoc extends MovieClip {

// on stage of .fla
public var rightAd:MovieClip;
public var leftAd:MovieClip;
//public var right_mc:MovieClip;
//public var left_mc:MovieClip;
public var holder_mc:MovieClip;
public var loading_txt:TextField;

public static const XML_URL:String = "images.xml";

private var carousel:Carousel;
private var imageList:XMLList;
private var numImages:int;
private var currentImage:int = 0;


public function CarouselDoc():void {

carousel = new Carousel(500, 250, 220);
carousel.useBlur = false;
holder_mc.addChild(carousel);

stage.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
rightAd.addEventListener(MouseEvent.CLICK, leftClickHandler);
leftAd.addEventListener(MouseEvent.CLICK, rightClickHandler);
//right_mc.addEventListener(MouseEvent.CLICK, rightClickHandler);
//left_mc.addEventListener(MouseEvent.CLICK, leftClickHandler);

var uloader:URLLoader = new URLLoader();
uloader.addEventListener(Event.COMPLETE, xmlHandler);
uloader.addEventListener(IOErrorEvent.IO_ERROR, xmlHandler);
uloader.load(new URLRequest(XML_URL));
}

private function xmlHandler(event:*):void {
event.currentTarget.removeEventListener(Event.COMPLETE, xmlHandler);
event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR, xmlHandler);
if (event is IOErrorEvent) {
loading_txt.text = "could not load xml file";
} else {
var xml:XML = new XML(event.currentTarget.data);
imageList = xml..image;
numImages = imageList.length();
loadImage();
}
}

private function loadImage():void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, imageHandler);
loader.load(new URLRequest(imageList[currentImage].toString()));

}

private function imageHandler(event:*):void {
event.currentTarget.removeEventListener(Event.COMPLETE, imageHandler);
event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR, imageHandler);
if (event is IOErrorEvent) {
loading_txt.text = "could not load image" + currentImage;
} else {
var image:Loader = event.currentTarget.loader;
carousel.addItem(image);

}

if (++currentImage < numImages){
loadImage();

} else {
loading_txt.text = "";
}
}

private function rightClickHandler(event:MouseEvent):void {
carousel.targetRotation += 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic", onComplete:checkFront } );
}

private function leftClickHandler(event:MouseEvent):void {
carousel.targetRotation -= 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
}
private function keyHandler(event:KeyboardEvent):void {

if(event.keyCode==37){
carousel.targetRotation -= 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
} else if (event.keyCode==39){
carousel.targetRotation += 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
}

}
private function checkFront() {


}

}
}
and my xml:

Code:
<menuItems>
<item>
<image>pics/VS Home Page Animation.swf</image>
<link>http://www.ema-eda.com/training/seminars.aspx</link>
</item>

<item>
<image>pics/CadenceWebinar.jpg</image>
<link>http://www.cadence.com/cadence/events/Pages/allegro_webinar_series.aspx?CMP=cbnr20081006</link>
</item>

<item>
<image>pics/Class.jpg</image>
<link>http://www.ema-eda.com/training/orcadtraining.aspx</link>
</item>

</menuItems>

Stop Button For Dynamically Loaded Slide Show
Hi all-

I used R. Berdan's tutorial to create a slide show that dynamically loads 14 images from an external file onto a stage ("square"). It has autoadvance (ssOn) and back buttons and works great. Now I want to add a stop button. Can anyone tell me how to do this? Here is the actions code for the show:

square._alpha=0
mypic=1;

_root.onEnterFrame = function()

{
if(square._alpha<10)
{
loadMovie("images/shower"+mypic+".jpg","square")
fadeOut=false;
fadeIn=true;
}

if(square._alpha>10 && fadeOut)
{
square._alpha-=10;
}

if(square._alpha<100 && fadeIn && !fadeOut)
{
square._alpha +=10;
}
else
{
fadeIn=false;
}
}

back.onPress= function()
{
if(mypic>1 && !fadeIn && !fadeOut)
{
fadeOut=true;
mypic--;
}
if(mypic==1 && !fadeIn && !fadeOut)
{
fadeOut=true;
mypic=14;
}
}

ssOn.onPress=function()
{
autoAdvance();
setInterval(autoadvance, 5000)
}

function autoAdvance()
{
if(mypic<=14 && !fadeIn && !fadeOut)
{
fadeout=true;
mypic++;
}
if (mypic>14)
{
mypic=1
}
}



Thanks very much,

jolo75

Flash Flv Movie File Doesn't Play In Dreamweaver With Controls
Hi, my swf files plays great with the external Mojave play controls, but when I import the swf into dreamweaver and publish with the all file places and setting correct, the external controls don't show although the swf file is the size it should be with the controls.

Can anyone tell me what I need to do to get the controls to show?

Thanks
Stoo

How Do You Play And Stop External SWFs Loaded
Hi,

I am seeking advice or help on how to control the Playback, Volume of an externally loaded SWF.


PHP Code:



var slideRequest:URLRequest = new URLRequest("YourMovie.swf");

var slideLoader:Loader = new Loader();

slideLoader.load(slideRequest);

addChild(slideLoader);

slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);

function onComplete(event:Event):void{

slideLoader.stop();

}




Can anyone help or point me to a useful tutorial. Basically I want to emulate a FLVPlayback class that only plays SWF movies.

Thanks for your help.

[F8] Movie Plays > Stop > Reverse > Stop > Play
I am fairly new to involved action scripting. I have successfully scoured flashkit threads for years to get my answers but this one has been driving me crazy for the past couple days. I have tried numerous solutions but none of them do exactly what I am trying to do.

I am creating an online portfolio that I want to control with two buttons that will play forward on release and stop at every piece unless the user is pressing and holding down - I also would like the scrolling animation to play in reverse on press and stop at every piece unless press and hold which happens to be skateboards in this section. I am posting the .fla for this section. This is what I have been able to accomplish so far. I moved everything into the main timeline from a movie clip because I could not get that to work at all. Should I move it back to movie clip? I also want it to stop at the first board.

here is the code I was able to peice together that just plays continously without stops.

Empty movie clip on second frame.

PHP Code:




onClipEvent (enterFrame)
{
    if (_root.goBack)
    {
        _root.prevFrame();
    }
    else
    {
        _root.nextFrame();
    }
    _root.frameNo = "Frame : " + _root._currentFrame;
}







Forward button.

PHP Code:




on (press)
{
    _root.goBack = false;
}







Reverse Button.

PHP Code:




on (press)
{
    _root.goBack = true;
}







I have only done basic stops; goToAndPLay, getURL and such I am a little out of my league here but I started the ball rolling and would like to make this work as I intended. Any help making this do anything close to what I am describing would be much appreciated

Control (Stop/Play) External Swf Loaded On Top Level?
Hey guys this is what I am trying to do
I have main movie and I am loading external swf on level 20 on top of my movie

No trouble with that

My problem is I have button on main movie trying to stop and play my External movie on level 20

( Note not unloand/loadmovie just play or stop )

Thank u in advance !!!

Controlling A Loaded SWF File , Play , Stop , Rewind ...
Hey Guys ,

I am loading in a video into my movie clip which I converted to SWF with sorrenson squeeze & Want to know how to control the movie from my main timeline , basically I just want to stop and play , and possibly have a timeline , BUT I know that to do a timeline I would have to have the movie embedded ?

Any thoughts ? I have herd about using the 'tell-target' command , but I am not sure how to use it ...

basically my files are called "movie.swf" and my place holder is called "loader"

Any thoughts , links , something would be good.

Thanks
Chris

Controlling Loaded MovieClip (play/gotoAndPlay/Stop)
Hi all, i have an empty movie in _level0, and i load an animated movieClip inside it with LoadMovie. Everything was ok on loading, it loads good, but i want to control timeline of this loaded movie, and i cant.

Something like this:
currentwork.loadMovie("fondos/1.swf");

In principal timeline, if a push a button for example telling:
currentwork._alpha=50;

it works, but if i say:
currentwork.gotoAndPlay(2);
or
currentwork.stop();

it doesnt play. Whats the problem? cant i control loaded movieclip?

Thanks in advance

I Need A Movie Clip To Play, Stop And Play Again In The Next Frame
I need a movie clip to play, stop and play again in the next frame. So pretty much i have to get the movie clip to play once and stop then when you go to the next frame it should play again once and stop again. What i have is a slide show type thing where you click on the next button to advance to the next frame and in each frame i have all the animations in their own movie clips.

-Thanks

Loaded Movie Controls Root Movie ?
Hi there,
In the first frame of my root movie[with a stop action on it] I'm loading another *.swf into a target mc.At the end of my loaded movie I want my root movie to play on.
I tried (almost?) everything....

_root.play() i.e.
in the last frame of my loaded movie doesn't work.
Why? Stupid?

Cheers Cherry

Dynamically Stop A Movie Clip
hello,
Newbie here and had a hopefully easy question. I'm, currently trying to stop a movieClip dynamically but not sure what way to take. Presently I've loaded seperate movieClips all have there own instance names. Here's a sample of my code:
function moviePicker(num)
{
switch(num)
{
case 1:
linkage = "home";
break;
case 2:
linkage = "local";
break;
case 3:
linkage = "search";
break;
case 4:
linkage = "more";
break;
case 5:
linkage = "driving";
break;
default:
trace("not picked");
break;
}
holder_mc.attachMovie(linkage, linkage+"_mc", this.getNextHighestDepth());
}

I'm also using the Key class to load the movie which is:
var keyListener_obj:Object = new Object();
keyListener_obj.onKeyDown = function()
{
switch (Key.getCode())
{
case Key.SPACE :
startStopMovie();
break;
case Key.LEFT :
leftArrow();
break;
case Key.RIGHT :
rightArrow();
break;
}
}
Key.addListener(keyListener_obj);

The "space" command calls to a function called startStopMovie(); which is:
function startStopMovie()
{
demoMovie = sections[0] + "_mc";
if(!stopping)
{
trace("is stopped "+ stopping);
holder_mc[demoMovie].stop();
stopping = true;
}else{
trace("is playing "+ stopping);
holder_mc[demoMovie].play();
stopping = false;
}
}

which stops the first movie clip fine and I'm passing an array for "sections[0]" as:
var sections:Array = new Array("home", "local", "search", "more", "driving");

Is there a way to dynamically pass a number for that sections array when pressing the left or right key.

Here's the code in all it's glory - Thanks for any help!!!!

stop();
_quality = "BEST";
//////////////////////////////////////////////////
//declare variables
_global.demo = this;
var stopping:Boolean = false;
var section:String = home;
var linkage:String;
var newID:String;
var whereAmI:Number = 1;
var sections:Array = new Array("home", "local", "search", "more", "driving");
/////////////////////////////////////////////////
//Initialize
function init()
{
demo.createEmptyMovieClip("holder_mc", demo.getNextHighestDepth());
holder_mc._x = 0;
holder_mc._y = 0;
moviePicker(1);
}
/////////////////////////////////////////////////
//show movie
function moviePicker(num)
{
switch(num)
{
case 1:
linkage = "home";
break;
case 2:
linkage = "local";
break;
case 3:
linkage = "search";
break;
case 4:
linkage = "more";
break;
case 5:
linkage = "driving";
break;
default:
trace("not picked");
break;
}
holder_mc.attachMovie(linkage, linkage+"_mc", this.getNextHighestDepth());
}
/////////////////////////////////////////////////
//stop/play movie
function startStopMovie()
{
demoMovie = sections[0] + "_mc";
if(!stopping)
{
trace("is stopped "+ stopping);
holder_mc[demoMovie].stop();
stopping = true;
}else{
trace("is playing "+ stopping);
holder_mc[demoMovie].play();
stopping = false;
}
}
/////////////////////////////////////////////////
//Left Arrow
function leftArrow()
{
if(whereAmI > 1)
{
whereAmI--;
moviePicker(whereAmI);
}
}
/////////////////////////////////////////////////
//Right Arrow
function rightArrow()
{
if(whereAmI < 5)
{
whereAmI++;
moviePicker(whereAmI);
}
}
//////////////////////////////////////////////////
//keyboard
var keyListener_obj:Object = new Object();
keyListener_obj.onKeyDown = function()
{
switch (Key.getCode())
{
case Key.SPACE :
startStopMovie();
break;
case Key.LEFT :
leftArrow();
break;
case Key.RIGHT :
rightArrow();
break;
}
}
Key.addListener(keyListener_obj);
//////////////////////////////////////////////////
//initialize
init();
trace("sections: "+sections[0]);

Play A Frame In A Loaded Movie From Another Loaded Swf
this is driving me crazzzzy []
i have the main movie which is 1 frame (containing the menu navagation for the site), under the 1 frame i have an MC (called scoot) that is 8 frames long and each frame has a stop action. I have set the site up to use browser back/forward button <script>
varPass=location.search.substring(1,location.searc h.length); //grab variable from cgiPass
if (parent.main.num == 1)
{parent.main.num = 2;}
else
{parent.main.num = 1;}
parent.main.controlFlash(varPass);//call controlFlash funct in main.html
document.write(varPass); //for testing purposes
</script>

the above script is a sample from the back/forward function/procedure.

Now... I labled the 5th frame of scoot as "map" and under the 5th frame, when it is played, is a button to open another swf, i'll call swf2. In swf2 is a button that i'm trying to action to go back and play map of scoot. But what ever i try nothing seems to work. Swf2 is loaded into level3 of the main movie and the loading action is in the first frame (and only frame) of the main movie. Someone please help me..... ???? Thanks a gekadrazillion in advanced !

Play Movie 3x, Then Stop
How can I get my movie to play 3 times and then stop?

I think there must be a simple solution - maybe 1f/else?

I'm lost...

anybody willing to rescue me?

How Can I 'Stop' The Movie Then Play The Next
My probelms is within a layered set of short movies. The buttons are all animated and move around the page but i cannot get it to stop the movie playing and move onto the next one it just plays behind it which is what i don't want it to do.

I need the buttons to play the next movie as well as stop the current one playing. If you view the flash file you may get a better idea of what i mean.

Any ideas appreciated.

Movie To Play Twice And Then Stop?
Does anyone know gow I can have my timeline play twice and then stop? trying to figure this one out but with no luck!

Help!

Yossarian

Movie To Play Twice And Then Stop?
Does anyone know gow I can have my timeline play twice and then stop? trying to figure this one out but with no luck!

Help!

Yossarian

Play Movie Twice Then Stop.
What's the easiest way to get a movie to play twice and then stop. I can get it to loop or to stop after one play, but I'd like to let it play twice and then stop. Thanks

MX 2004 : Dynamically Stop Movie Clips?
Hi.

I have a series of movie clips, content1, content2, content3, etc.

I also have a pause button.

I want the pause button to pause the movie clips dynamically, i.e the pause button will .stop the movie clip that is being shown.

I have the code below for the function which is called from the pause button, I have tested all the variables, and its all accurate, but it wont .stop the 'content' movie clips.

The hard coded version worked - _root.content1.stop();

function pauseContent() {
MyContent = "content"+_global.MyLocater;
trace("MyContent :"+MyContent);
_root.MyContent.stop();
//_root.content1.stop();
}

the first trace prints out MyContent : content1

So how come _root.MyContent.stop() does not work??

Cheerz,
Dwayne

Rollover Play Movie, Rollout Stop Movie - Help
just starting out with Flash/Action Script

I have a simple progessive flv player. I am displaying a thumbnail size video snippet's on my web page.

I want it to load and pause on the first frame so there's something showing on the page load. Then when someone mouse's over (on RollOver) start playing the clip, let clip loop forever. On mouse out (on RollOut) go back to frame 1 and pause.

This is the flv code I have to play the video, it is working in this basic mode:


Code:
// Create a NetConnection object
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection
netConn.connect(null);
// Create a NetStream object and define an onStatus() function
var netStream:NetStream = new NetStream(netConn);
netStream.onStatus = function(infoObject) {
status_txt.text += "Status (NetStream)" + newline;
status_txt.text += "Level: "+infoObject.level + newline;
status_txt.text += "Code: "+infoObject.code + newline;
};
// Attach the NetStream video feed to the Video object
my_video.attachVideo(netStream);
// Set the buffer time
netStream.setBufferTime(5);
// Begin playing the FLV file
netStream.play("my.flv");
Thanks for any help!

Script To Tell A Movie To Play And Stop At A Particular Frame Of That Movie?
Can you add a script on a button that will tell ballmv to play where it is positioned and stop at frame 50.

eg.
I have buttonA.

I have a movie called ballmv that has 100 frames in it which is of the ball sliding from left to right over 100 frames.

I do not want to use MC tween for this. I just want buttonA when pressed to enable ballmv to play from its current frame inside and play till it reaches frame 50 and then stop there. So regardless if inside ballmv, the ball animation is at frame 25. When I press buttonA the ballmv will play from 25 and stop at 50.

I may also have other buttons, thats tells ballmv to stop at frame 80 or 100 which I would like to add this script in.

Hope this makes sense.

Help--How Do You Stop/play/pause A Movie?
hey guys:

i'm sure this has been covered before but, i tried doing a search throughout this site and couldn't find the answer so i'm turning to you flash experts for help! i've created an offline flash demo (.exe) in Flash 5 that is broken up into 7 separate scenes...basically i want to have interactive controls in each scene to be able to let the user stop/play/pause a scene-- ex: < o II > Also, if you know of any tutorials or samples online covering this topic...please post up here or feel free to email me.

yikes! my boss is breathing down my neck to get this done asap! so any help or information would be greatly appreciated...

thank you.

aquan@lycos.com
[Edited by clownalley on 05-29-2002 at 03:15 PM]

How Do I Stop An Load Movie Then Play
I need a script to stop the time line then load movie after load
then play.
Can anyone help me

Stop/play Movie Control From Different .swf
is it possible to do this:

banner.swf
movie.swf


banner.swf:
frame 1; "stop"

movie.swf:
frame 65 has an action; "play frame 2 in banner.swf"

thx.

How Do I Stop/play Movie Symbols From Anywhere?
How do I stop/play Movie Symbols from anywhere?
this is really frustrating me right now, but here sthe situation:
I currently have 2 movie symbols within my scene, both have animations in them,and I would like to add actionscript to one of them which can stop or start the other's animation

I thought it would be something similar to this after my on Press command

clip1.gotoAndPlay(10)
^instance name

but it seems it wont work...

Help me please!!

Play Movie Three Times & Stop- Help
Please help, this is due today!!!!

I have two Scenes : Scene 1 and Scene 2.

On the action layer's last frame of Scene 2 I have:

(++x<3) ? gotoAndPlay("Scene 1", 1) : stop();

I want this movie to play three times and stop.
IT DOES NOT WORK and has worked in previous versions of Flash (I'm now on MX 2004).

PLEASE HELP!!!! [b]

Copyright © 2005-08 www.BigResource.com, All rights reserved