Controlling Imported Swfs
i can not seem to find a way to control an swf (whatever.swf) that i imported into a movie clip (container clip)using "loadmovie" :
loadMovie ("whatever.swf", "containerClip");
is there a way to add an instance name to an imported swf? i want to have some navigation tell the swf to stop, play or go to a label, i just can't find a way to identify the movie once i load it.
hopefully someone out there has an answer.
thanks.
FlashKit > Flash Help > Flash ActionScript
Posted on: 03-15-2002, 03:00 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Controlling Imported .swf
I have imported an .swf in level 1 of a main .swf. Now, how do I use a button on the main .swf to control things in the imported .swf???
Any help would be extremely helpful and could even make me smile.
Cheers.
Chris.
Controlling An Imported Swf
i have an external swf called load.swf, in it there is a mc called curser which is set to follow my mouse using a smartclip widget. It works perfectly when opened on its own.
When i import this load.swf into a container movie called box in the big main movie, the follow curser can be seen but doesn't move.
how do i target this curser in load.swf,
realy stuck
cheers
ratboy
Controlling Imported AVI With AS
I am trying to control an imported AVI clip with AS
When I import this AVI with the option to place on the stage, the resulting
movieclip has the timeline expanded to accomodate the relevant numver of
frames.
Now when I Insert-NewSymbol-MovieClip and then drag the AVI from the
Library to ste new MC, stage it is just one frame and it does not as whether
to expnand the clip tilmeline.
What I am doing wrong?
Controlling Imported Flv's
Hi.
I want to have a video imported in flash and controlled through action script for pause and resume actions and maybe replay.
I converted a .mov into a .flv and imported the flv in flash. I did it that way because i need it to be in a certain spot with a mask and only pauseble by click.
So is there any way to control the flv by click or i have to load at runtime the whole thing and trigger it through action script?
--> Centering Imported SWFs Within An MC?
Ok, I don't understand why this is happening..maybe somebody could help me out....
I have a draggable window bar (similar to Windows OS), under this bar is an empty MC in which i load various .swfs. The swfs that are being loaded are various widths, so I want to center each swf under the window bar when it is loaded. I've placed the following code in the window bar MC:
onClipEvent(enterFrame) {
_root.width=getProperty(_root.window.loader, _width);
if (_root.width>597.5) {
_root.difference = (_root.width - 597.5) / 2
_root.window.loader._x= "-" + Number(_root.difference)
} else if (_root.width<597.5) {
_root.difference = (597.5 - _root.width) / 2
_root.window.loader._x = _root.difference
} else {
_root.window.loader._x = 0;
}
}
This centers the swfs perfectly fine, but if there's any animation in the swf that goes outside of the document size, this actionscript takes that into affect and adjusts the MC accordingly (therefore making it look like its not centered). I thought this code would consider only the document size (what is typed in the properties) of the imported swf but it included everything -- even if its outside of the document bounds. Are there any commands I don't know about, or ways to set up the imported swfs so that it will only consider the set document size of the swf when centering? Keeping all symbols within the bounds of the imported swfs is not an option.
Any help would be greatly appreciated.
Imported Swfs Control...
Hello!
I have an AS question....
I have four sets of 6 buttons on my stage. Each set will have an imported mc of images that will be held by an empty movie clip. My question is this...
If a user is looking at images on MC 1 by clicking on the buttons that pertain to that mc and he decides to click on a button in another set, how can I make it so that the mtClip calls the swf for that set and automatically goes to that image in the swf?
Does this make sense?
Furpants
Manipulating Imported SWFs
(MX 2004)
I have a flash file that imports an external SWF.
More specifically, the main flash loads, then an image (another SWF) loads inside that file.
Is there a way to manipulate the image from within the first flash file?
For instance, the image is a movie clip with instance name "pano." Ideally, I'd like to call it like _root.panoLoader.panoGoesHere.pano and work with it that way, but this doesn't appear to be working. Am I doing something wrong?
I've right-clicked on the movie clip and said "Export for ActionScript" with the identifier "panoMainEntrance."
Why Don't My Imported .swfs Work?
I've got 2 different .swf movies that I imported into another project; one with scrolling text, and the other with scrolling thumbnails. When I test the new project, neither of the .swfs scroll, and the one with the text doesn't show the text. What's up with that?
Thanks
Re-size Imported Swfs?
I have a html site that I want to change to Flash.
I like the fact that I can import live working mini versions of my web sites in html pages.
Can I import a swf file into a main movie but change its dimensions to have the swf that might be 780 x 450 pixels appear in say just 550 pixel width?
If so, how??
Sincerely,
ggaarde
Controlling Loaded Swfs, From Other Swfs....
alright on my site, i have a loaded movie clip with sound, which is the main bg music, and i have a samples page, and i want each sample to load up on press or whatever. now i need to know how to not just unload the mian bg music swf, but make that swf go to and stop on frame 3 (1 is loader, 2 is play, and 3 is stop) thanks alot!!
Controlling An Imported Swf Timeline
I have an external swf which I load into my main movie. The problem that I have is that I cannot find a way to target the swf properly once loaded so that I can navigate through it.
I want to use buttons, ones in the main movie, to navigate to specific frames within the imported swf.
Is there something I am missing or is this just not possible? Any help is appreciated.
Thank You -
Controlling Imported .swf Files
Hey guys!
need some advice regarding controlling an imported .swf animation file. i need to control it using actionscript so that it both my imported animations run at the same time for the same length then stop and don't keep re-playing..
any helpful hints??
many thanks!!!
Controlling Imported MovieClips?
How do I find out which frame an external movieClip is passing?
for Instance I have a movieClip imported onto my main flash project. But it keeps looping repeatedly, I want it to play every 5 seconds, so I need it to know that if its on the last frame it will stop, wait 5 sec, GotoAndPlay on first frame of this movieClip?
Could anyone show me an example code for this?
Controlling Imported SWF File
I have looked throughout the Forum for a resolution to my problem. I know it's something SUPER simple, but I'm just at the end.
Can someone tell me how to control an imported SWF file inside an empty MC_Loader?? I need to play an exit section of the SWF and it's not working!!
I have sections that I need to load "IF" the drop-down is already loaded. If it's not I need to play the "close" part of the links drop-down movie.
on(release){
_root.MC_Loader2.gotoAndPLay("resources.swf", "closelinks");
}
Tips please?? I just want to make this Darn thing work!!
Reusing Swfs Imported With LoadMovie?
Hi there,
I've got a question about the loadMovie function. If anyone could help
me out here it would be great!
Here's my situation:
I start my main movie with loading a bunch of swf files into a movieclip
with a preloader. The movie continues playing but at the backend the
swf files are still loading into the main movie. I use loadMovie to get the
swf files in my main movie.
Later on I want to reuse those swf files at different target levels. How do
I do that because when I duplicate them I duplicate the preloader mc's
and not the already-loaded swfs? And when I call the loadMovie function
again I load everything twice and there's no point of loading them at the
beginning in the first place, right?
The reason I definitely want to preload the swf files beforehand is because
they direct-interactive interface elements and not just content items.
Anyone?
Thanks in advance
Reusing Swfs Imported With LoadMovie?
Hi there,
I've got a question about the loadMovie function. If anyone could help
me out here it would be great!
Here's my situation:
I start my main movie with loading a bunch of swf files into a movieclip
with a preloader. The movie continues playing but at the backend the
swf files are still loading into the main movie. I use loadMovie to get the
swf files in my main movie.
Later on I want to reuse those swf files at different target levels. How do
I do that because when I duplicate them I duplicate the preloader mc's
and not the already-loaded swfs? And when I call the loadMovie function
again I load everything twice and there's no point of loading them at the
beginning in the first place, right?
The reason I definitely want to preload the swf files beforehand is because
they direct-interactive interface elements and not just content items.
Anyone?
Thanks in advance
Dynamic Text In Imported Swfs
so i have a movie that imports another movie. the imported movie calls on dynamic text from a text file. the text shows up fine if i view the imported movie by itself, but when i view my main movie, and import the other movie, just the scroll bars, etc show up....not the dynamic text.
is this an issue with flash 8 or is there something more i need to do?
thnx
Controlling Volume On An Imported Clip
I've imported a .mov file into my flash document. What I'm trying to do is make a volume controller for the imported movie. I know how to control sounds that are imported on their own and I know that I can splice the video from its sound and do it that way, but is there an easier way? Please help!! I'm looking for a quick fix. I would hate to write a bunch of code when I don't have to.
Flash, Controlling An Imported Swf With The Main Swf..
Hi, I could use a little help..
I'm making an mp3 player in Flash that looks like a turntable (record player). I've got all of the mp3 player to work but:
1. I want the record to stay still when nothing's playing and the arm to be at rest
2. The record to start spinning and the arm to move across before the sample plays and then to keep moving while its playing etc..
I've got all the graphics done and I can pretty much work out how to animate them. However, as a newbie, no matter how hard I try, I can't get the animation to play what I want when I want when it's in with all the other layers that control the mp3 player (going to frame 16 on the animation makes the mp3 player stop etc.
So, I thought the answer might be to make the record player animations into a seperate swf and load it into a Loader in the mp3 player swf and then somehow remotely play the animations through the main swf using the stop/play buttons. Is there any way to do that? To be quite honest, I can't work out how to make a 'divider' so that I can have more than one animation in the same layer. I've been trying to follow many tutorials but tutorials don't even seem to translate from Flash MX to Flash MX 2004 (which I am using)
Thanks in advance for any advice given!
Controlling Sound Of Imported Video
Hi I've imported video via .flv I have sound effects and background music within the flash movie and need to be able to control the sound in the imported video. Is this possible? If so how?
Oh using MX 2004 by the way, any help would be greatly appreciated.
dabush
Drag And Drop Target On Imported SWFs
Hi All,
I am in a bit of a bind here, I am doing a finals for my Flash class in college and our assignment is to make a portfolio that show cases our past work, well I had made an easter egg hunt SWF where object is to find eggs and drop them into a bucket, main use of action script is the drag and drop target, By itself the SWF runs just fine but when I try to import that swf by method LoadMovie ( I am loading all my shows externally) my drag and drop target breaks. I can drag the egg over to the bucket but it dont "drop" the intial code for the drag and drop is this
code -->
on (press) {
startDrag("");
}
on(release) {
stopDrag();
if (eval(this._droptarget) == _root.EasterBasket) {
setProperty(this, _visible, false)
_root.count --;
tSound = new Sound(this);
tSound.attachSound("thump");
tSound.start(0,0);
}
}
<-- end code
I have tried using the lockroot command to keep the timelines seperate but that didnt help, I changed the _root.EasterBasket to this._parent.EasterBasket to get rid of root reference but that didnt work either. is there a better mousetrap out there that I can use for this drop and drag target that will work when it is imported to another SWF, I need help fast please, this project is due here pretty quick, thanks all, D-Wiz
Trying To Align Imported Swfs To Scale With Browser
I have a swf (fullscreen.swf) that scales to fit the full size of the browser windo wquite nicely (it has a background image dynamically loaded into it).
However, I need much more than a background image. I would like to import another swf for the menu and all that kind of stuff (including content that would have another image). I want all these individual elements to scale properly as well. I would like to be able to tell them exactly where on the stage to be positioned.
basically, I just want my site to be the size of the full browser window, no matter what size (or aspect ratio) the browser window is in.
any help, or even a link to a good tutorial would be amazing.
Accessing Movie Clips Of Imported SWFs
Hi everyone,
I'm new to AS3 (well, AS in general really) and I'm working on a small Flash piece for a client. I thought it would be straightforward, but I've got a couple of questions for you experts.
I'm writing an AS3 app that will read in a SWF which was created in Flash 8, I believe. The SWF simply contains a couple of movie clips and just one frame. All I want to do is load this SWF and change the fill color of each of its movie clips.
I have the Loader functionality working just fine, but I'm unclear how I access the movie clips of the SWF. It appears to be of type AVM1Movie when I load it and I believe there are limitations with how an AVM2Movie can interact with it. I'm hoping what I want to do is basic enough and that this is possible.
Any advice is appreciated.
Thanks!
Jason
Using And Controlling Sound In An Imported Movie Clip
I would really appreciate some help cos i've lost the plot here.
One movie clip (a basic interface)imports another into level 1. The sound object works fine when i play the .swf alone but once imported nothing. I tried
"_level1.mySound1.start();" and even setting up the sound objects in the interface movie. Linkage from the interface movie?? Or linkage from the imported level1 .swf. No luck.
Any help will be bought a virtual beer.
thanks,
Mandy C
Controlling Imported Variables In Nested Movies
help!
I am using a loadvariable command to bring in a variable from a php script I wrote which uses ODBC to query an access database.
loadVariables("checkstatus.php", "_root.controlmovie1");
I have created a dynamic text box to display the variable and called the variable:
_global.statuscheck
I am loading the variable into a movie nested into the main/root movie. I am using this nested movie to control other nested movie's. The dynamic text box called _global.statuscheck is in another movie nested into the _root movie. Despite loading the variable into the _root.controlmovie1 it does get displayed in the other nested movie, which presumably means that the variable has successfully been created/assigned as a _global one. BUT when I play it in debug the variable is not appearing in the _global section, only in the control movie.
this is where I need help please...
I have the following actionscript in the first frame of my control movie (_root.controlmovie1):
play();
gomarker = "go";
loadVariables("checkstatus.php", "_root.controlmovie1");
if (_global.statuscheck == gomarker) {
gotoAndPlay("playsquare");
}
I have named a frame "playsquare" in the control movie.
the variable _global.statuscheck is displayed as go but the movie is not moving to the frame "playsquare" for some reason... I can't understand this as I have not only made the variable global but also loaded it into the control movie where the if statement is written... I figure I must have overlooked something silly, but what? arg!
tks dudes =p
Problem In Controlling Audio In A Imported .mpg Video File To Flash
Hi there
I have imported a MPG clip to my flash movie, I am able to control movie adding PLAY a nd PAUSE buttons, but couldn't control the audio of the video file, if I used "stopallsounds" script it is only works to OFF the sound but it is not starting sound ON.
Anyone help me in controlling the audio of a video with Sound ON/OFF button
waiting for a quick reply
Thanks
Chary
SWFs Controlling Other SWFs?
I am working on a pretty simple menu and have come across a layout issue. As is, I have the buttons display an icon in a "fire circle" at the top of the menu bar when rolled over. It would be great though if I could have 2 SWFs: One which contained all the buttons and another with that "fire circle" (see link). Buttons.swf would of course have to tell FireCircle.swf to "on rollover goto frame x in scene x". Is this possible? So I guess my question is can you have one swf file control another?
Here is an example of the menu bar, as one swf, if you need to visualize it: http://www.blownheadlight.com/menu.swf
Thanks.
Controlling Swfs With Other Swfs
I am trying to make one main SWF movie that calls on other individual SWF movies (one being a "menu" movie). The catch is that I want the main movie to tell the menu movie where it is and have the menu movie button that corresponds to that section of the main movie to show the button in an "over" state.
Controlling SWFs
My Question:
I have a SWF file (called: home.swf) which contains 3 buttons (button 1, button 2, & button 3).
When you click on button 1, I want home.swf to goto frame 15 and stop. At the same time when clicking on button 1, I want a new SWF (portfolio.swf) to load on top of home.swf.
The above is pretty simple and I have no problem doing that, but here comes the problem..
When you push a button (lets call it exit) in portfolio.swf, I want it (portfolio.swf) to send a message which tells home.swf to go and play frame 5 (remember it was parked at frame 15),(and then portfolio.swf will unload it self).
I am not (yet) very good at variables and how to send and recieve these between SWFs, so please be specific.
Thank you, and I really appreciate the help..
Controlling Different Swfs?
hi
On the main time line i've got a stop and a loadMovie to load a .swf.
Is it possible to let the main timeline carry on, once the loaded .swf is done?
cheers
Controlling Other SWFs
I am working on a flash navigation "shell". I am loading external SWFs onto the stage using the Loader class and AddChild. I have to problem getting the SWF on the stage but I can't control playback. It loads playing and nothing I do stops or pauses it.
I have code on my "menu" button to removeChild. the movie goes away, but the audio continues to play.
Can someone tell me where I'm going wrong?
Attach Code
var myRequest:URLRequest = new URLRequest("myMovie.swf");
var capLoader:Loader = new Loader();
myLoader.load(myRequest);
myMovie_mc.addChild(myLoader);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, playMov);
pause_btn.addEventListener(MouseEvent.CLICK, pauseMov);
pause_btn.visible = true;
function playMov(event:Event):void
{
event.target.content.y = 0;
event.target.content.x = 0;//(stage.width/2)-(event.target.content.width/2);
//event.target.play(0);
}
function pauseMov(event:MouseEvent):void
{
//resumeTime = event.target.currentFrame;
myMovie_mc.stop();
resume_btn.visible = true;
resume_btn.addEventListener(MouseEvent.CLICK, resumeMov);
pause_btn.visible = false;
pause_btn.removeEventListener(MouseEvent.CLICK, pauseMov);
}
function resumeMov(event:MouseEvent):void
{
//soundControl = sound.play(resumeTime);
myMovie_mc.play();
pause_btn.visible = true;
pause_btn.addEventListener(MouseEvent.CLICK, pauseMov);
resume_btn.visible = false;
resume_btn.removeEventListener(MouseEvent.CLICK, resumeMov);
}
Controlling Other MC's In Ext. Swfs
Hi, I have a question that will take two seconds to answer, but I can't figure it out!
So here goes, I have a main.swf that loads in..... home.swf, ab0ut.swf, contact.swf, etc via a standard loader setup. If I would like to control a MC with an instance of "homeVid" in my home.swf how would I target that from my main.swf? I'm so confused, please help. All I need is pointers, I'll figure the rest out myself. Thank you so much for you help.
Controlling Loaded SWFs
Is it possible to control SWFs that you have loaded into your main movie? Like tell it to change frames for example?
Controlling Loaded SWFs
Can anyone help?
I'm new to actionscripting.
I am loading several SWFs into a target successively, each one calling the next. Call them MC1-MC4. Each has several scenes.
Here is my challenge:
I need to program a Rewind, Stop, Play, and Foward button on the host movie that control whatever movie is currently loaded in the target.
NOTE: The Rewind and Foward button only need to take the user to the begining of the previous/next scene.
Like I said I'm very new to ActionScripting. Does anyone have an example script I can look at? Can this be done simply?
Thanks!
Controlling Swfs With Buttons
Hi,
My main movie is called site.swf and it contains 5 buttons, each of which loads a separate swf when released.
Each swf is loaded into the root timeline using the loadMovie command and loads into an empty MC in site.swf. So far so good.
All is well and each swf loads in to site.swf as a nice expanding window.
The problem I'm having is the transition between each swf. Currently, when a given button is pressed, the swf it triggers appears ok, but when I then click another button, the previous swf instantly disappears and the new one fades in.
What I want to achieve is an even transition between one loaded swf and another, but I can't seem to see how to achieve this.
For a visual understanding of what I'm talking about, have a look at
http://www.formiscontent.co.uk enter the site, and if you wait a few moments the relevant buttons will fade in...
Hope someone knows what I'm on about and can help!
Thanks in advance
Controlling External Swfs
Hi all:
I have an external swf loaded into a movie using the LoadMovie function. When the external swf finishes playing, I need to direct my main movie to go to a specific frame in the scene.
Any help would be appreciated.
Thanks
Controlling External .SWFs
hey guys..
if I have
_root.content.loadMovie("services.swf");
and inside services i have a movie clip called mc_split that does something at keyframe 20 how would i go about writing this in actionscript to make mc_split go to the frame from my main movie where i make the call to load the services.swf
i cant think if a single way to do it.. lol
any help would be greatly appreciated
thanks in advance
Help With Controlling Loaded Swfs
Hey guys,
I'm making a site in mx, and I have got it set up so it loads and external swf when you click on each section. I have an animation coming into each section and going out aswell. I have each swf with a stop at about frame 10, where the page stays for viewing. I want it so that when you are viewing a section, lets say the "about me" section, and you click on say "links", it will play the rest of the about me.swf, when it gets to the end, load links.swf in its place.
Controlling Loaded Swfs
I have a main clip, and inside of it I'm loading movies externally (into an empty clip called "host".)
I have frames labeled "01", "02" and "03". After I've loaded externalMovieA into the host clip in frame "01", I want externalMovieA to play to its end. When externalMovieA is ended, I want the main clip's root timeline to go to lable "02" and load externalMovieB.
I can't seem to control an externally loaded clips.
Any help? I'll include the main FLA.
Thanks.
Controlling External .swfs
Hi there,
I have a bit of a problem with a flash webzine that I'm building. In it I have a flash movieclip. This movieclip is contained in an external swf and the movieclip plays using loadMovieNum. However I am having trouble controlling the movieclip. I want to be able to stop, fast forward and rewind. I have tried heaps of different things and nothing seems to work. I know I could use unloadMovieNum but I don't want to get rid of it. I just want to be able to control it.
Any ideas?
Controlling External Swfs
I have a web page with a flash nav menu bar and a flash header. when you click on the contact us button in the nav bar I would like the header to gotoAndPlay ("Contact") which is the contact us header. the problem is i dont know how to do this. The page is html using tables not frames
Please Help.
Brandin
My passion as a designer is not to impress the world, but to give my clients the confindence to present my work to the world.
-Me-
Controlling External SWFs
Hello,
I am having some issues working with external SWF. When the external SWF is finished playing, I want it to remove it from the stage and play the next one, similar to a slide show, but the time the slide is on screen is determined by the length of the SWF.
I have absolutely no idea how to set it up to a.) unload the external SWF or b.) How I would go about loading the next SWF.
Here is my code:
ActionScript Code:
var request:URLRequest = new URLRequest("content.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completed)
function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
}
function completed(event:Event):void{
trace("I AM COMPLETE");
}
loader.load(request);
addChild(loader);
Any help would be greatly appreciated.
Thanks!
dougt
Controlling Loaded Swfs
Hi,
Complete noobie here and just getting to grips with AS 3.0 so apologise if this is a dumb question.. Anyway, trying to load and then control an external swf with this code:
var myrequest:URLRequest = new URLRequest("Left.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);
//check loads completed
function swfLoaded(e:Event):void{
stage.addChild(myloader);
var mycontent:MovieClip = e.target.content;
trace(mycontent);
mycontent.x = 100;
mycontent.y = 100;
mycontent.gotoAndStop(10);
}
//add event to loader class
myloader.contentLoaderInfo.addEventListener(Event. COMPLETE, swfLoaded);
evrything works - x and y of movieclip get set but problem is that the movie doesn't stop at frame 10 - it just keeps playing through?!
Anyone any idea why this could be so??
Controlling Loaded Swfs
Hi All,
I tried yesterday to sort this out, but didn't explain it very well and I think everyone lost interest. So I'll try once more.
What I'm trying to do is create buttons in one swf that load another swf and also give instructions to begin playing from a certain frame in that swf. The target swf has a preloader on frame 1 and then a movie clip that contains a video in frame 2. Depending on which button the user presses the video will be cued up ready to play at different frames.
I think it may need an if statement ie if x=34 then goto frame 34, but I can't seem to pass the variables to the loaded swf.
In the zip file is an example of what I'm trying to do. I would really appreciate any help on this.
Controlling Loaded Swfs
Hi All,
I tried yesterday to sort this out, but didn't explain it very well and I think everyone lost interest. So I'll try once more.
What I'm trying to do is create buttons in one swf that load another swf and also give instructions to begin playing from a certain frame in that swf. The target swf has a preloader on frame 1 and then a movie clip that contains a video in frame 2. Depending on which button the user presses the video will be cued up ready to play at different frames.
I think it may need an if statement ie if x=34 then goto frame 34, but I can't seem to pass the variables to the loaded swf.
In the zip file is an example of what I'm trying to do. I would really appreciate any help on this.
[AS] Controlling External .SWFs
hey guys..
if I have
_root.content.loadMovie("services.swf");
and inside services i have a movie clip called mc_split that does something at keyframe 20 how would i go about writing this in actionscript to make mc_split go to the frame from my main movie where i make the call to load the services.swf
i cant think if a single way to do it.. lol
any help would be greatly appreciated
thanks in advance
|