Buttons To Control Separate Loaded Movie Clip
I have a slideshow with two versions -- one auto-advance and one manual-advance. I need to make some buttons in the main movie to control the slideshow movie clips separately, but in the same space. I made a new movie for the auto-advance one that plays straight through. So I think I can write the code for that one.
The manual advance one, however, is a little bit trickier for me. I have a series of keyframes with an image on each keyframe. I've done this before, but not quite like this. The one I did before was self-contained with the buttons in the same movie. For this one, though, I need to set it up so that depending on which set of buttons is clicked, either the auto-adv or the manual-adv will load in the same area (I have a masked layer behind a TV screen). For the one I did before, this is the manual button code:
For the forward button
Code: on (release) { if (this._currentframe == this._totalframes) { gotoAndStop(1); } else { nextFrame(); } } and for the back button
Code: on (release) { if (this._currentframe == 1) { gotoAndStop(this._totalframes); } else { prevFrame(); } } I hope this is clear. How do I apply the above code to my desired scenario? Any assistance or direction will be greatly appreciated.
Summarah
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 12-16-2005, 06:49 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Need 'if Frame Loaded' For A Separate Movie Clip
I would like tell a movie in a different level to go to frame 2. The problem is, I load the movie and then immediately tell it to go to frame 2 and it doesn't execute the last part of it (it gets loaded, but doesn't go to frame 2).
This is the sequence:
level 10 is loaded (first frame is blank, I don't want it seen yet),
when level 10 is loaded, I would like it to go to frame 2 (which isn't blank)
Does anyone know how to tell another movie to go to a particular frame?
... or does anyone know how to use the ifFrameLoaded for a different movie level? (tellTarget won't allow an 'ifFrameLoaded' command inside of it).
thanks in advance,
tracee
Movie Clip Control From Loaded Swf
Hi,
I cannot seem to figure out (after 3 months of trying researching, reading posts) how to get a Loaded SWF to control an MC within an MC in the Host (root) swf. (I use flash mx 2004 Pro)
Please advise. Cheers
Control Loaded Movie Clip
I'm making a site that loads different external swf's (based on which button was clicked). There is an empty movie clip called imageArea that the swf's are loaded into. This is based on the image load tutorial here on Kirupa.com (http://www.kirupa.com/developer/flas...ge_as3_pg1.htm). Everything is working well up to this point.
I can't seem to figure out how to control (stop, play) the movie clip once it's loaded.
Seems like it should be something like: imageArea.content.play();
Anyone know how I can do this?
Control Movie Clip Loaded With MovieClipLoader
Code:
this.createEmptyMovieClip("tester_mc", 1);
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
target_mc.startTimer = getTimer();
};
mclListener.onLoadComplete = function(target_mc:MovieClip) {
target_mc.completeTimer = getTimer();
};
mclListener.onLoadInit = function(target_mc:MovieClip) {
var timerMS:Number = target_mc.completeTimer-target_mc.startTimer;
target_mc.createTextField("timer_txt", target_mc.getNextHighestDepth(), 0, target_mc._height, target_mc._width, 22);
target_mc.timer_txt.text = "loaded in "+timerMS+" ms.";
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("http://kameny.bresco.cz/images/ref/img/img_1.png", tester_mc);
Can I use this to control mc tester_mc?
Code:
tester_mc.onRelease = function() {
this._visible = false;
};
Because this not works.
Control The Play On The Main Timeline From Within A Loaded Movie (not A Movie Clip)?
Question... I have a movie (main movie) that loads another movie (movie 2) automatically. Movie 2 contains a button that loads yet another movie (movie3). Now I’m having trouble with this next part... When movie3 loads I want "main movie" to stop where it’s at in the timeline and stop all other loaded movies until the user clicks another button where upon movie 3 will go away and "main movie" will resume. Movie 2 is like the paper clip guy in Word and movie 3 is my help movie. Therefore, it can be accessed at any point during the main movie and I don’t want to use a goTo command to jump to a frame label or scene. Does anyone have any idea how to control the play on the main timeline from within a loaded movie (not a movie clip)?
Control From A Nested, Dynamically Loaded Movie Clip
Hi everyone!
This is probably a real simple problem to solve, but the answer eludes me:
I have a site that basically stacks dynamic movie clips together to form the site. I need to control them all from a deeply nested clip, and here's the problem: It won't work.
The clip is dynamically loaded like this:
Main Lobby Clip|_Games Room|_The Menu!I need a button in the menu clip to unload the Games room (and with it the menu clip as well)
I actually had a pretty good function going where a button in the games room clip would unload it, but that doesn't fit in with the design anymore!
Can anyone help?
Thankyou!
(PS, the site's at www.tflash.co.uk/MainIndex.htm. Click on games to see the movie i'm talking about)
Control From A Nested, Dynamically Loaded Movie Clip
Hi everyone!
This is probably a real simple problem to solve, but the answer eludes me:
I have a site that basically stacks dynamic movie clips together to form the site. I need to control them all from a deeply nested clip, and here's the problem: It won't work.
The clip is dynamically loaded like this:
Main Lobby Clip|_Games Room|_The Menu!I need a button in the menu clip to unload the Games room (and with it the menu clip as well)
I actually had a pretty good function going where a button in the games room clip would unload it, but that doesn't fit in with the design anymore!
Can anyone help?
Thankyou!
(PS, the site's at www.tflash.co.uk/MainIndex.htm. Click on games to see the movie i'm talking about)
Control Slide Based FLA With Buttons On A Loaded Movie
I'm loading a navigation bar (next/prev/close buttons) into a simple Flash8 slide presentation (using loadMovieNum("navengine.swf", 2); ) so that the navigation is always on top of the content. I chose that method because I couldn't figure out another way to always float anything on top of the slides as they display.
The problem I'm having now is I can't get the buttons on the loaded swf to communicate with the parent timeline and actually get the slide to advance (using the special object methods). I've found lots of info on going the other direction and have got that direction working in tests (ie. the main timeline communicating with the loaded buttons), but can't get the buttons to tell the main presentation to advance slides.
I suspect it has something to do with the complicated object that is used for the slide based fla.
1. Is there another way to put a nav bar on a higher level of a slide based fla? (a floating navbar that stays on top of content)
2. If loading a navbar using loadMovieNum is the only way, any help on getting a button to trigger the gotoNextSlide method?
Thanks for any help.
Rob
Buttons To Control Movie Clip?
This is a very basic question, but it has eluded me for a while. How can I get a button to play a movie clip that is in my library? I'm just trying to have a menu button activate a submenu movie clip, I've tried onMouseEvent and loadMovie and it keeps giving me an error saying it can't find URL. I really need to be walked through it. I am a moron, I know.
How To Control 1 Movie Clip With 2 Buttons?
Do you know how to control 1 movie clip with 2 buttons?
Example:
Have movie clip (instance name MC) with 10 frames.
stop() on frame 1 and 5.
Have 2 similar buttons with opposite action.
BTN1
If movie clip is on frame 5 than play it from 6
If movie clip is on frame 1 than nothing.
And opposite action on second button:
BTN2
If movie clip is on frame 1 than play it from 2
If movie clip is on frame 5 than nothing.
So button action is affected by currentframe of movie clip.
I try to use this code:
BTN1.addEventListener(MouseEvent.MOUSE_DOWN, down1);
function down1(event:MouseEvent):void {
if(MC.currentframe == 5) {
MC.gotoAndPlay(6);
} else {}
}
And it doesnt work.
It seems that function cannot work with MC.
How can i do it?
How Do Use Buttons To Control Movie Clip?
hi ppl, i am flash newbie, i am trying to use buttons to stop, play, go forward, go backward and go back to start and i cant seem to make it successful. help anyone?
Control Movie Clip Using Buttons
Hello,
I am new to Action Script or any kind of programming language, but determined to try and understand it.
My question is probably very simple, all I am trying to do is control "myMovie_mc".
I have created four buttons "up_btn", "down_btn" etc.
I can get the movie clip to move each time I rollover a button.
How do I get continuous movement when I keep my cursor over a button?
Thanks in advance for your help.
up_btn.onRollOver = function() {
_root.myMovie_mc._y -= 10;
updateAfterEvent;
}
How Do Use Buttons To Control Movie Clip?
hi ppl, i am flash newbie, i am trying to use buttons to stop, play, go forward, go backward and go back to start and i cant seem to make it successful. help anyone?
[help] Using Buttons In Clip To Control Main Movie
Newbie Flash MX Actionscript question.
Kinda new at programming.
Constructing main movie (lets call it "main").
Constructing a movie clip within the main movie (lets call it "navbar").
Inside the clip are various buttons set to take me to different scenes in the main movie on release. Problem is, they're not working.
Actionscript applied to the buttons within the movie clip reads:
on (release) {
gotoAndPlay("Scene 2", 1);
}
have also tried
on (release) {
_root.gotoAndPlay("Scene 2", 1);
}
and
on (release) {
_parent.gotoAndPlay("Scene 2", 1);
}
Any idea what I'm doing wrong?
Any help is greatly appreciated. Thanks.
Control Movie Clip In Movie Loaded
hi guys...
quick and simple...
i loaded swf in movie clip ... no problem
in the swf there are 10 keyframes and every one take a lable frame... i can control this lables from the main swf but i need to control a movie clip in the SWF and it's own a lable inside it.
ActionScript Code:
loadMovie("bgDataHolder.swf", "_root.mc_holder")
load bgDataHolder.swf in mc_holder..it's ok
ActionScript Code:
_root.mc_holder.gotoAndPlay("label1")
it's working
but in bgDataHolder.swf there is a movie clip calls mc_lighting and it's own lables in it... how can i control mc_lighting which in bgDataHolder.swf
Control Movie Clip In Movie Loaded
hi guys...
quick and simple...
i loaded swf in movie clip ... no problem
in the swf there are 10 keyframes and every one take a lable frame... i can control this lables from the main swf but i need to control a movie clip in the SWF and it's own a lable inside it.
ActionScript Code:
loadMovie("bgDataHolder.swf", "_root.mc_holder")
load bgDataHolder.swf in mc_holder..it's ok
ActionScript Code:
_root.mc_holder.gotoAndPlay("label1")
it's working
but in bgDataHolder.swf there is a movie clip calls mc_lighting and it's own lables in it... how can i control mc_lighting which in bgDataHolder.swf
Make Buttons Loaded From Separate Swf Connect To Current Timeline
Okay I'm using the Loader component to load a .swf that has several buttons inside it that point to locations on the main timeline. I've tried using this code on the buttons to no avail:
on (press) {_root.gotoAndPlay("av")
}
Does anyone know what I could be doing wrong? Thanks.
-Jay
Control A Movie Cliip On A Separate Level?
I think I may have made a mistake in the way I've structured the path, Here's what I'm working on:
FRAME1
MC_CLIP ON STAGE OF BASE LAYER LOADS SWF ON NEW LAYER...
loadMovieNum ("silly.huge.swf", 15);
ROOT TIMELINE OF BASE LAYER..
_level15.movie1.stop();
_level15.movie1._visible = false;
FRAME2
_level15.movie1._visible = false;
if (_level15.movie1._framesloaded ==_level15. movie1._totalframes) {
gotoAndPlay ("Start Movie");
}
FRAME11
gotoAndPlay ("Loading Loop");
FRAME12
_level15.movie1._visible = true;
_level15.movie1.play();
stop ();
I have a feeling it's one of those small irritating mistakes!
Thanks in advance,
JB
CanU Control A Movie From A Separate Window?
Can you control one flash movie in one window from another open browser window. My Client would like to have the navigation pop up in a separate browser window. Can i have the nav buttons tell the movie in window 2 to load unload movies?
Thanks for any help,
James
How Do I Control An External Movie In A Separate Browser Window?
i am creating a website for a band, with an mp3 player. i want to be able to make an mp3 player that pops up in a separate browser window. the mp3 player would have a "playlist" that can be dynamically changed from the main window, which gives a list of albums & tracks to choose from. the model for this is Rhapsody's web interface.
so, how would i go about creating & dynamically changing the playlist (while music is playing) across multiple browser windows? the "playlist" would be an array of references to mp3s, i guess-- so is there a way to pass events & variables across the windows?
Buttons In A Loaded Movie Clip Does Not Work
help,
the buttons in my loaded movie does not work!
is it prolly due to my pathing?
i realized that when i click on the button when the movie is loaded into the main movie, that the output shows "0"
and when view that loaded movie by itself, it works and the output shows "f1, f2, f3, etc."
can anyone help me with this?
Detect _currentframe In Separate Movie Clip
i'm trying to have a button detect the current frame for a separate movie clip before performing it's action. i know the file path i'm using is right b/c i works for other commands. but it won't detect the _currentframe for the other movie clip. this is the 'if' command i'm using now:
on (release) {
if (_root.main.portfolio.logos.ess_currentframe>"open ") {
tellTarget ("_root.main.portfolio.logos.ess") {
gotoAndPlay("close");
}
}
}
i also tried to use a frame number instead of a frame label but had no change in results. can anyone help me out here.
thanks, dave
Flash MX Change Large Movie Clip To Separate Swf's?
Hi all! My intro swif to a site is way too big. When using the bandwidth tester, it comes to a total halt for a VERY long time. The swf is currently almost 400k.
In the intro is a movieclip that is the big culprit for the most part. It has five pictures that fade in and out on separate layers. I wonder .. these are right now staggered so that one layer with picture fades out as the next fades in.
Can I make these layers with pictures separate swf's, and if I can..can I then put action to load sequentially these swf's one at a time? would this work all inside a MOVIE CLIP?? Would this help get my movie started faster? These clips are masked on the main timeline, etc. I will gladly provide more info if my question isn't clear. I need help with code
lin
Control Clip That Has Been Loaded Externally Into An Empty Clip
I have a clip that I have externally loaded with visibility set to 0. I want to be able to change the visibility to 1 when I click on a link, but no matter what I do I can't get my main movie to talk to the loaded clip? I gave my empty clip an instance name of "clients" does the clip from the other movie need an instance name too? The button is not in the main movie, but in a clip, and then I need that button to change the visibility of the externally loaded clip that is loading into the clip with the button which is called "menu".
Thanks in advance,
Mike
Referencing Duplicated Movie Clip In Separate Code Block
I have the following code:
ActionScript Code:
bubble_mc._visible = false;var bubbleCount:Number = 40;var vertMaxSpeed:Number = 10; // will be used in calculating maxiumum vertical speed for bubbles' movementdupMovie = function () { for (i=0; i<bubbleCount; i++) { bubble_mc.duplicateMovieClip("bubble"+i+"_mc", i, {_x:Math.random()*bubble_mc._x, _y:Math.random()*bubble_mc._y, _visible:true}); with (eval("bubble"+i+"_mc")) { _height = _width = Math.random()*bubble_mc._height; } }};dupMovie();onEnterFrame = function() { for(i=0; i<bubbleCount; i++) { var randomSpeed:Number = Math.random() * vertMaxSpeed; "bubble"+i+"_mc"._y += randomSpeed; if ("bubble"+i+"_mc"._y < 28) { delete "bubble"+i+"_mc"; bubble_mc.duplicateMovieClip("bubble"+i+"_mc", i, {_x:Math.random()*bubble_mc._x, _y:Math.random()*bubble_mc._y, _visible:true}); with (eval("bubble"+i+"_mc")) { _height = _width = Math.random()*bubble_mc._height; } } }}
The problem is that Flash whines when I call
ActionScript Code:
"bubble"+i+"_mc"._y += randomSpeed;
Because it won't let me reference the duplicated movie clips that way.. is there any other way to do this?
Cannot Control The Loaded Clip
I have loaded an swf using loadclip inserting listener to check load event, my target is to stop and play the loaded swf through buttons.
I can do this using standalone application and the same code hereunder, when i import the application into the global one I'm developing I cannot handle the loaded swf, it doesn't stop on loadinit.
I don't understand why....
i have a simple movieclip into the stage with a another movieclip as box where to load the swf. there i create an emptymovieclip where load the swf,
please help me to understand the point
Code:
var flvPLstatus:Number;
var tmc:MovieClip;
function loadvideohere2(val:String)
{
var ext:String=getExtension(val);
swfply._visible=true;
loadmeswf(val)
}
function loadvideohere(val:String){
nc8.call("loadVideo", null, val);
}
function loadme( str:String){
_global.PLAYER.loadFLV(str)
vp._visible=true;
}
function removeVideo(){
video=false;
if (flvPLstatus == 2){
_global.PLAYER.integration(1);
vp._visible=false;
}
}
function inttest(val:Number){ // ho ricevuto il comando play/pause dal player lo mando a tutti
nc8.call("ctrlVideo", null, val);
}
var image_mcl3:MovieClipLoader = new MovieClipLoader();
function loadmeswf(str:String)
{
swfply.backv.createEmptyMovieClip("container6",swfply.backv.getNextHighestDepth());
var mclListener3:Object = new Object();
mclListener3.onLoadStart = function(target_mc:MovieClip)
{
writeln("www2"+target_mc._currentframe)
tmc=target_mc;
//target_mc.stop();
//target_mc.goToAndStop(0);
}
mclListener3.onLoadInit = function(target_mc:MovieClip)
{
writeln("www"+target_mc._currentframe)
//_parent.target_mc.goToAndStop(0);
//target_mc.play();
}
mclListener3.onLoadComplete= function(target_mc:MovieClip)
{
writeln("sss" +target_mc._currentframe)
//target_mc.play();
//target_mc.goToAndStop(1);
//target_mc.stop();
}
image_mcl3.addListener(mclListener3);
image_mcl3.loadClip(str, swfply.backv.container6);
}
swfply.plswf.onPress=function(){
tmc.play();
}
swfply.paswf.onPress=function(){
tmc.stop();
}
Flash MP3 Player And Separate Flash Movie Control
Hi Everyone,
I am not sure this has been talked about as I have looked into Mp3 stuff on this forum so here goes. I have a basic Mp3 player on an html page. It is the "Theron_Parlin-Mp3_Player-614" Player. Currently I have it playing as soon as someone hits the page. I want people to hear the comedian in the backgroun as they surf the site. I currently have two video pages, one with Quicktime, the other with Windows Media files. When a person clicks one of the video the appropriate player opens and plays the video. The problem I have is that I have to instruct my visitors to pause or stop the Mp3 player on the main page. I'd like to have the player pause on some type of mouse click in the Video sections.
I have given thought to taking the videos and just making them some sort of Flash video so that I can cut down on storage space and have more control over stopping the Mp3 player. The problem I have is that I am going to be using html pages as I am now and the site won't be a full Flash site(that will come later). I have no idea how to connect the two "players" in order to have control over how the play is stopped on the player. I want the Mp3's playing all of the time, unless there is user interaction. If a person clicks the new video files in some type of Flash file I want the Mp3's paused until each clip is complete. Then the Mp3 player will start back up. Is it possible?
I am thinking that I will have an html page with links to the Flash movies on a single page/player. How do I connect the two Flash entities to have control?
Thank you,
Don
Control Inside Of A Loaded Clip
Hi friends;
I have a clip that loaded in my main movie, my loaded clip has 4 frame that I want control that from main movie.
I mean that I want gotoAndStop(2) or 3, 4 or 1 but I want do this from Main movie but I cant do this. Please help me. Its important to me to do that.
Flv File Loaded To Control Next Clip
Hi there,
I wonder if any of you out there can help with this. Im relatively new to AS and especially AS3. I have loaded an flv into my main stage movie using an external call to load the flv.
However once the flv video file is finished i need to call yet another external swf file to play.
I've called the flv file (which is in labs_clip.swf) from my main movie by using this...
stop()
var myrequest:URLRequest=new URLRequest("labs_clip.swf");
var myloader:Loader=new Loader();
myloader.load(myrequest);
function swfLoaded(myevent:Event):void{
stage.addChild(myloader);
var mycontent:MovieClip=myevent.target.content;
mycontent.x=0;
mycontent.y=30;
}
myloader.contentLoaderInfo.addEventListener(Event. COMPLETE, swfLoaded);
Can anyone help I have to have this done by Monday....no pressure then : )
Thanks in advance
Making A Draggable Movie Clip Control The Location Of Another Movie Clip
http://www.kineticz.net/jba/residental.jpg that is a picture of what i am trying to do. the white bar at the bottom is the draggable movie clip and the group of 3 pictures right above that is the movie clip that i am trying to control w/ the draggable clip. I am having trouble writing a script that will do this. any help you can give will be much appreciated.
Control Movie Clip In Container From Button Inside Other Movie Clip
There are three movie clips involved in this question.
1. A main movie clip that has a target empty movie clip where an external swf loads.
2. A menu movie clip that is built from button symbols and has its own timeline.
3. The external movie.
When a user clicks on the menu, the external swf loads into the empty movie clip target. This part works fine. Here's the code:
on (release) {
loadMovie ("Lesson1.swf", "_root.container");
}
I want to use one external swf for all lesson, versus 20 external swfs. The problem I'm having is controling at what frame the external swf loads. I've tried adding --gotoAndStop (15) -- for example. I've also tried adding, gotoAndStop "_root.container" (15), but that doesn't work either. The gotoAndStop action ends up controlling the menu movie clip timeline instead of the movie loaded into the container. I figure this is because the menu mc has "embedded" buttons and it's own timeline.
Any help you can offer will be much appreciated.
Thanks
Sheila
Buttons Dont Work, Loaded Swf Resizes Out Of Control ,ugg
i can click forward thru the buttons but they seem to loose it when i click backwards, not only that everytime i load a swf into this if it has masks it changes the actual dimentions of the swf i know i need to change the code and create the empty movie clip to fix this but im having alot of trouble finding the right arrangement of code to make it happen I could use a hand.
flash 8
Code:
code:
spacing = 20;
picture._alpha = 0;
preloader._alpha = 0;
MovieClip.prototype.loadPic = function(pic) {
this.loadMovie(pic);
preloader.what.text = "No:"+p;
preloader._alpha = 100;
//picture._alpha = 0;
picture.stop();
onEnterFrame = function () {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
preloader._alpha = preloader._alpha+10;
} else if (loaded == filesize && filesize != 0) {
var t = picture.getBytesTotal(), l = picture.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1) {
var w = picture._width+spacing, h = picture._height+spacing;
border.resizeMe(w, h);
//if (link[p] != undefined) {
//}
preloader._alpha = preloader._alpha-10;
if (border._width eq picture._width+spacing) {
picture._alpha = picture._alpha+10;
if (preloader._alpha<=0 && picture._alpha>=100 && border._width eq picture._width+spacing) {
image_mcl.removeListener(mclListener);
picture.gotoAndPlay(1);
delete onEnterFrame;
delete this.onEnterFrame;
delete border.onEnterFrame;
picture.onRollOver = function() {
ino.dino.auton.play();
border.gotoAndStop(2);
};
picture.onRollOut = function() {
border.gotoAndStop(3);
};
picture.onRelease = function() {
getURL(link[p], "_blank");
delete onEnterFrame;
};
}
}
ino.nrr.onRollOver = function() {
ino.dino.io.gotoAndStop(2);
};
ino.nrr.onRollOut = function() {
ino.dino.io.gotoAndStop(3);
};
ino.nrr.onRelease = function() {
if (ino.dino.htmltxt != null or undefined) {
ino.dino.play();
}
};
}
}
};
};
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
//this.onEnterFrame = function() {
yy = picture._height;
var w = picture._width+spacing, h = picture._height+spacing;
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
//mks._width += (w-mks._width)/speed;
keepup._width += (w-keepup._width)/speed;
if (Math.abs(this._width-w)<1) {
this._width = w;
this._height = h;
picture._x = this._x-this._width/2+spacing/2;
picture._y = this._y+8;
msk._width = w-spacing;
msk._height = h-10;
msk._x = this._x;
msk._y = this._y;
keepup._width = w;
mks._width = w;
keepup._x = picture._x;
//mks._x = picture._x;
//}
}
};
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
link = [];
info = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
link[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
info[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
//gotoAndPlay(24);
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
preloader.what.text = "XML";
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
function nextImage() {
//preloader._visible = true;
if (picture._alpha>=100) {
this.onEnterFrame = function() {
picture._alpha = picture._alpha-10;
preloader._alpha = preloader._alpha+10;
if (picture._alpha<=0 && preloader._alpha>=100) {
picture.stop();
delete this.onEnterFrame;
//var dingo = true;
if (p<(total-1)) {
p++;
if (loaded == filesize && filesize != 0) {
picture.loadPic(image[p]);
ino.desc_txt.text = description[p];
ino.dino.htmltxt.text = info[p];
picture_num();
}
} else if (p>0) {
p--;
if (loaded == filesize && filesize != 0) {
picture.loadPic(image[p]);
ino.desc_txt.text = description[p];
ino.dino.htmltxt.text = info[p];
picture_num();
}
}
}
};
}
}
function prevImage() {
if (p>0) {
p--;
picture.loadPic(image[p]);
ino.desc_txt.text = description[p];
ino.dino.htmltxt.text = info[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture.loadPic(image[0]);
ino.desc_txt.text = description[0];
cap.desc.text = " "+link[0];
ino.dino.htmltxt.text = info[0];
picture_num();
thumbnail_mc.attachMovie("thumb3", "tram", thumbnail_mc.getNextHighestDepth());
}
}
function picture_num() {
current_pos = p+1;
ino.pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_ymouse>=thumbnail_mc._y) && (_ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
//hit_right.gotoAndStop(2);
_x;
} else if ((_xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
k = 0;
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
//target_mc.gx._x = (target_mc._width+5)*k;
tlistener = new Object();
tListener.onLoadStart = function(target_mc) {
target_mc._alpha = 0;
};
tListener.onLoadStart = function(target_mc) {
target_mc._alpha = 0;
};
tListener.onLoadProgress = function(target_mc) {
target_mc._alpha += 10;
preloader.preload_bar._xscale = bytesLoaded/bytesTotal;
};
tListener.onLoadComplete = function(target_mc) {
target_mc._alpha = 100;
};
tlistener.onLoadProgress = function(target_mc, bytesLoaded:Number, bytesTotal:Number):Void {
//trace(target_mc+".onLoadProgress with "+bytesLoaded+" bytes of "+bytesTotal +);
preloader._visible = true;
preloader.what.text = k+"thumbs";
kl = k+1;
if (kl eq total) {
preloader.what.text = "Done!";
}
};
tlistener.onLoadInit = function(target_mc) {
target_mc._x = (target_mc._width+5)*k;
target_mc.pictureValue = k;
pop = eval("thumbnail_mc.tram"+k);
target_mc.onRelease = function() {
p = this.pictureValue-1;
po = eval("thumbnail_mc.tt"+k);
po._x = this._x;
po.gotoAndStop(2);
trace(po);
//fadde();
//picture._alpha = 0;
nextImage();
preloader.what.text = "No:"+k;
};
target_mc.onRollOver = function() {
thumbnail_mc.test.gotoAndStop(2);
thumbnail_mc.test._x = this._x;
thumbNailScroller();
captionFN(true, description[k], this);
};
target_mc.onRollOut = function() {
thumbnail_mc.test.gotoAndStop(3);
captionFN(false);
};
thumbnail_mc.attachMovie("thumb", "test", thumbnail_mc.getNextHighestDepth());
thumbnail_mc.attachMovie("thumb2", "tt"+k, thumbnail_mc.getNextHighestDepth());
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
captionFN = function (showCaption, captionText, bName) {
if (showCaption && loaded == filesize) {
cap.gotoAndPlay(1);
cap.crap.setMask(cap.msk);
cap.msk.gotoAndPlay(1);
createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = " "+captionText;
cap.crap._width = 6*cap.desc.text.length;
cap._alpha = 100;
if ((bName._width+bName._x+cap._width)>border.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _xmouse+xo;
cap._y = _ymouse+yo;
cap._visible = true;
};
} else {
cap.gotoAndPlay(14);
delete hoverCaption.onEnterFrame;
}
};
stop();
Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.
So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)
But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip
thaks
Vakarm
Control A Movie Clip From A Drag N Drop Movie Clip
I need a script that allows the user to control the timeline of a MC from a drag-able MC.
Basically I want a MC that drags is constrained to the x position with a limited movement of say 100 Pixels, as the drag MC is moved along it controls the play position of a tween in a different MC.
So when you push the Drag MC back and forth it moves the second MC play position back and forth.
a great example of this is at http://fable.lionhead.com/fable.html
on the pop up book parts
Movie Clip Inside Movie Clip - Control From Timeline
hello all.
i have a movieclip (instance name: mov1) with a movieclip (instance name: mov2) inside of it.
mov1 is on my main timeline. I want to control mov2 from the main timeline. how can i do it?
i am trying what i thought would work which is
_root.mov1.mov2.stop();
HELP - Converting A Clip To Control A Movie Clip Raher Than Getting A Url - HELP
I've downloaded a movie from the FLASHKIT open source which scrolls to a link when the user types what they are looking for which is great!- see details below
+ + + + + + the clip im trying to convert + + + + + +
Search Window
http://www.flashkit.com/movies/Utili...27/index.shtml
2000-05-03 8.91
Search window with complete funcionality; resizable window with resizable scrollbar , arrow and enter keys functionality implemented, word find. Open source modified from Active Search by Degrees. By Nenad Markovic
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NOTE- IM USING flash 5 so its automatically updating the scripting when i open the fla file
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
But i want the clip to give a Teltarget and goto comand in order to allow the user to navigate a flash movie rather than linking to external URLs
but i cant get the bastard thing to play ball- ive tried email the original author if the script but their eamil address in no longer valid
please help im on deadline
ross
ross@sevencreative.co.uk
NOTES
HERE IS THE SCIPT I THINK I SHOULD BE CHANGING
on (press) {
n = substring(getProperty("", _name), 7, length(getProperty("", _name))-6);
pressTime = getTimer();
trace (pressTime);
if (Number(n)<>Number(/:selectedButton)) {
setProperty ("over", _visible, true);
setProperty ("../button" add /:selectedButton add "/over", _visible, false);
/:selectedButton = n;
/:selectButtonNew = n;
} else if (Number(pressTime-pressTimeOld)<200) {
// extract button number
n = substring(getProperty("", _name), 7, length(getProperty("", _name))-6);
location = eval("/:link" add n);
getURL ("http:/ /" add location, "_blank");
}
pressTimeOld = pressTime;
}
on (release, keyPress "`") {
setProperty ("../button" add n, _visible, true);
}
on (keyPress "`") {
k = 0;
while (Number(k)<Number((1300-CPUlag))) {
k = Number(k)+1;
}
setProperty ("../button" add n, _visible, true);
setProperty ("over", _visible, false);
}
AND THIS IS WHAT IM TRYING AND IT DOESN'T WORK
on (press) {
n = substring(getProperty("", _name), 7, length(getProperty("", _name))-6);
pressTime = getTimer();
trace (pressTime);
if (Number(n)<>Number(/:selectedButton)) {
setProperty ("over", _visible, true);
setProperty ("../button" add /:selectedButton add "/over", _visible, false);
/:selectedButton = n;
/:selectButtonNew = n;
} else if (Number(pressTime-pressTimeOld)<200) {
// extract button number
n = substring(getProperty("", _name), 7, length(getProperty("", _name))-6);
location = eval("/:link" add n);
tellTarget ("nav") {
gotoAndPlay ("http://" add location);
}
}
pressTimeOld = pressTime;
}
on (release, keyPress "`") {
setProperty ("../button" add n, _visible, true);
}
on (keyPress "`") {
k = 0;
while (Number(k)<Number((1300-CPUlag))) {
k = Number(k)+1;
}
setProperty ("../button" add n, _visible, true);
setProperty ("over", _visible, false);
}
Control 2 Separate Windows
i have 2 browser windows, is it possible for one movie to load movies into the other one? i have tried using a loadMovie command but how do u specify the path?
cheers
Separate Volume Control
What I need to do is to show the difference between what we hear and what an unborn baby might hear while the mother reads a book. I need to start off with the mother's reading, then with a button click muffle the reading and hear the squishy body sounds with heartbeat (I have that as a separate sound file). So I made 2 sound objects:
var playing = false;
readingSnd = new Sound();
readingSnd.attachSound("reading");
bodySnd = new Sound();
bodySnd.attachSound("body");
readingSnd.start(0,999);
Linkage is set in the library for both sounds.
Here is the code for the button:
on (release) {
if (playing!=true) {
bodySnd.start(0,999);
readingSnd.setVolume(5);
playing=true;
}
}
My problem is that when I set readingSnd volume low, they're both low. If I set the volume for the bodySnd to 100 so it's more prominent than the readingSnd, then they're both full volume. I can't seem to separate the 2 sound volumes. Other than making a premixed version of the combined reading/body sound is it possible to separately control the 2 volumes, or does setVolume only control the computer's sound output?
Music Control In Separate MC
in the main scene, i have a music control tab, that when you mouse over it will display the Music Control MC. I have tried following the directions in several tutrials but my problem is, everytime i RollOver the MC, it will play the track, So if i roll over the MC 5 times , it will overlap the music 5 times. Can anyone help me with this problem, or know of a good tutorial that can lead me to the way?
THANKS!!
Control Volumes By Separate
Hi friends,
I import 2 mp3 file to my Flash movie and i try to control the volume by separate volume controls. just i made two buttons. when i click on the first button the first mp3 volume will reduce to 10% that mean the second mp3 sound only can hear. If you click on the other button the volume for the first mp3 will increase to 100%.
But when you click on the first button It's reducing the master volume. so the both volumes come to 10%. I did deferent way but it's not possible to me.
Flash expert.... please help me....
Control FLV Playback With Separate SWF
So, I have an HTML file with three Iframes. Just know that due to the nature of my project I need to use iframes. Basically, in one iframe is a bar with playback controls. play, pause, stop. In a second iframe is a video, in a third iframe is a you tube style panel that allows you to select different videos to watch. I need to control the video in iframe A with the controls in iframe B. If using iframes makes this solution untenable, a solution sans iframes is welcome.
Is this possible? and if so, could someone direct me to some resources?
I know a tad of actions script, and a decent amount of javascript, so I'm not a script expert by any means, but I understand the language enough to be functional.
Thanks
luke
"Crossfading" Components Without Creating A Separate Movie Clip
I'm trying to figure out how to fade two components into each other without creating a seperate movie clip (i.e.:
allow the decreasing alpha channel of one image to coincide with the increasing of
another so that it looks like a crossfade.) I couldn't find anything in the tutorial about this, so I'm hoping someone can help.
Preloader In Externally Loaded Swf Stops Working (loaded Into An Empty Movie Clip)
SEE BOTTOM OF THREAD FOR CURRENT PROBLEM
1. I have my navigation buttons in level0
2. When a button is pressed it loads an external .swf into the highest empty level
3. There is an MC in this loaded .swf called loadmovie and inside that another MC called empty.
4. Inside the 'loadmovie' MC, there is a frame action that loads another external .swf file into the 'empty' MC.
The problem I am having is that the preloader that is on the external .swf that is loaded into the 'empty' MC does not work.
It works fine if you test it on its own. But not when loaded into a Movie Clip.
MY SCRIPT:
iBytesTotal = _root.getBytesTotal();
iBytesLoaded = _root.getBytesLoaded();
iBytes = (iBytesLoaded/iBytesTotal)*100;
percentageNumber = Math.round(iBytes)+"%";
setProperty("progressBar", _xscale, iBytes);
Do I have to refrence it differently? Because of where it is situated?
e.g
iBytesTotal = _level32._root.loadmovie.empty.getBytesTotal();
confesed!
Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.
in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:
Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}
thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:
Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}
The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.
the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.
thanks!
How To Control A Movie Symbol In A Movie Which Is Loaded Intro Another Movie?
HI guys,
I need help with some script. I have a movie, which is my main movie, and to which I load all other movies, like sound clips, other related movie which load on request. the problem is with the sound movie which I created, it's a separate file and it has a sound loop which starts and then if an button is clicked it stops, and then starts again if the buttons is pressed again. Also in this sound movie I have another movie symbol with audio bars animation which plays only when the sound is playing, and then it stops when the sound is stopped. It works fine with this code:
on (release) {
if (i==1) {
s.start(0,999);
i = i*(-1);
tellTarget ("/sound_bars") {
gotoAndPlay (1);
}
} else {
s.stop();
i = i*(-1);
tellTarget ("/sound_bars") {
gotoAndPlay (10);
}
}
}
...on it's own, but when it is loaded into another movie it works only partially, the sound stopps but the audio bar animation which you see here as instance name "sound_bars" is not working, it keeps playing even when the button is pressed. but like I said the sound stopps. So what I need to know is how to control that movie symbol which is inside a movie called soundloop1, which is loaded into my main movie. I know it's a level / tell target issue, but I just cannot figure out how to control it from another movie. If you can help me that would be greatly appreciated Thanks.
--
elfe.
Movie Clip Control Other Clip, Actionscript Help
How do I make a movie clip control another movie clip? In this case, when I click on the green box(Movie1), the blue box(Anim1) will move. I added "Stop()" to the first frame of Anim1. I think I got the actionscript right, any idea what's wrong?
|