Importing & controlling external .swf in Captivate 5
Hi,
I have a main file built in Captivate 5. This file has static slides with text and graphics, in one slide, I have to insert a demo which is smaller in dimension.
So I have recorded this demo as a separate Captivate file and published as .swf.
I have then imported this demo .swf in the main Captivate file as Insert > Animation.
But I am not able to control this demo(Play/Pause, Slider) by the main Captivate control bar.
Please help me regarding this.
Regards,
Sachin
Hi,
Please publish the demo as FLV/F4V instead of swf.
Insert the FLV into the main Captivate movie as FLV object - Insert FLV or F4V file.
In the Properties panel for the FLV, Select
Skin - None
Timing -> Rest of slide. Uncheck "Pause slide till end of video" option.
Check "Synchronize with Project option".
Preview the movie.
Now it is possible to control the Play/Pause of the embedded FLV from the main Captivate movie timeline.
Do let me know if this helps.
Thanks,
Sushma
Similar Messages
-
Is this possible - Import Flash swf which then imports an external swf
Hi,
I was wondering if it's possible to (as the title says) to import an swf which itself imports an external swf?
Explanation - I've got an scrollbar created in flash...and to keep it tidy i've created the scroll 'content' as another swf which is imported into the scrollbar swf.
Whenever i publish/render the project the scroll bar appears but the content does not.
Is it possible to do this?
Captivate > imports flash > which imports external swf
Cheers
Craig.Yes that shouldn't be a problem at all. You probably won't be able to see it working when you preview the project from within Captivate but if you publish it and manually copy/paste the external swf to the publish directory, it should work just fine.
www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more.. -
Control external SWF file?
Is it possible to control an external SWF file with buttons
on the main clip?
I have an external SWF loading into the stage, but I wanted
to control "play" "stop" and "goto" with buttons outside that
SWF.I need to do the same thing, but i get an error.
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at page2sub1page1_fla::MainTimeline/frame1()
TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::AVM1Movie@3dcb7359 to flash.display.MovieClip.
at page2sub1page1_fla::MainTimeline/finished_loading()
here is my code:
var external:MovieClip;
//LOADER//
var request:URLRequest = new URLRequest("slideshow.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE,
finished_loading);
loader.load(request);
function finished_loading(e:Event) {
external = MovieClip(loader.content);
LoadMov.addChild(external);
external.my_ssp.xmlFilePath="images.xml";
why do i get that error? -
[F8} Control External SWF
Hey everyone, its been a while since I have done this. Can
someone plz help me control the timeline of an external swf loaded
into a holder from the main movie? I need a button in my main movie
to tell the external swf to gotoAndPlay a frame, and I can't
remember how this is done.thanx for the help. this is just a shot in the dark but what
would my "mc " name be? Its an externally loaded swf. Is it the
holder instance name? -
Control external swf file that is loaded into main movie
I've loaded an external movie into Scene2 of the main movie,
I want a button in the main movie, in scene two, which shows
up right now under the external loaded movie, to be able to
onRelease gotoAndStop at the first frame of the external movie
which is loaded into that scene. Do I just write that as:
AssociateSelected_btn.onRelease = function() {
gotoAndStop("RGSassociate.swf","frame1")
? I thought I tried this, but since the ext.movie is loaded
automatically on entering the scene it is not put into a level
(which would be easier to navigate)....
Any help/thoughts would be much appreciated, thanks!Just a thought- can i refer to the external movie through the
loading component instance name?
Still wondering if I can control the time line inside the
external movie from the main movie... -
hello - i am running into a problem and was wondering if someone could point me in the right direction. I am using AS3 / CS3 - I have a FLEX component that is complied into a swf and i am loading it into my Flash file. This component has some properties that you can set, but I am not sure how to reference the newly loaded SWF file. I have my current code below - with one of the properties the FLEX programmer sent over:
var request:URLRequest = new URLRequest("qagGauge.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);
/* PROPERTIES
[Bindable] public var fontColor:Number = 0xFFFFFF;
Thanks in advance!solved:
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.TimerEvent;
import flash.display.MovieClip;
var _swfTimer;
var _loader:Loader = new Loader();
_loader.load(new URLRequest("qagGauge.swf"));
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadIt);
addChild(_loader);
function loadIt(e:Event):void
_swfTimer = new Timer(10);
_swfTimer.addEventListener(TimerEvent.TIMER,checkSwfLoader);
_swfTimer.start();
function checkSwfLoader(e:Event):void
var myclip:MovieClip = _loader.content as MovieClip;
if (myclip.application != null)
_swfTimer.stop();
myclip.application.maxVal = 1000;
myclip.application.faceColor = 0x000000; -
Controlling external .SWF...Possible??
Hello,
I have an .SWF file which I created using the Flash Slide
Presentation document type. It consists of a number of screens. I
need to load this .SWF file into another Flash movie and control it
with actionscript, but I do not know the code. Could someone please
give me a hint at the code needed for simply getting this movie to
jump from one slide/screen to another? Or point me to a good
tutorial?
Thanks in advance.Yes, the loaded movie is accessible via the name of the
movieclip it gets loaded into. E.g., if you have an MC called
'ballMC', and load the second movie with
ballMC.loadMovie("ball.swf");
you can access it with
ballMC.moveBall();
But the movie has to be completely loaded, so you should make
sure it finished loading before calling it's methods. Also, code in
the frame of the loader movie will execute before the code in the
loaded movie. E.g., if frame 1 of the ball movie says
this.foo = "bar";
the variable will only be set after all code in the frame of
the loader movie is executed, so you can't use 'foo' in that frame.
To make sure the movie is loaded, use preloading code or the
MovieClipLoader class, which provides events that signal when the
movie is loaded (onLoadInit).
hth,
blemmo -
LOADING/CONTROLING external SWFs
I'm sure this has been asked before but i cant find anything
that works for me. i have one MovieClip (View14) and i need to load
lots of different things into it. I know you're supposed to use
something with variables and addChild but i cant get anything to
work.
How do you reference a file that's not on the internet? (in a
flash document that's also not online)
How do you load SWFs into a movieclip? (and unload/switch
them)
Thank you :]
i'm sorry i couldnt find this anywhere else.
I've looked at the flash docs for MovieClipLoader and
Component and they arnt helping me.just using the Loader class does the trick
var movie:MovieClip = new MovieClip();
addChild(MovieClip);
var loader:Loader = new Loader();
loader.load(new URLRequest('path to the swf'));
movie.addChild(loader);
that will work. and you can do that as many times as you
want -
Controlling multiple external swfs from main timeline
Hi, I've been trying to combine the features of two tutorials I found, one that deals with controlling external swf's from the main timeline and the other that explains how to load and unload multiple external swf's. I'd like to be able to load and unload multiple external swf's, and control these swf's buttons from the main timeline.
I asked this same question on the forum of the site where I found these tutorials, and receive only one reply saying that "it should'nt be hard to do." but they did not elaborate any further. This left me think that I was missing something very obvious and I've spent too much time now trying to work what it is now. I understand pretty much how both pieces of code work, but just can't work out how to combine them.
If someone could explain it to me, I'd much appreciate it.
Tutorial One code - controlling an external swf from the main timeline.
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("swfs/balls.swf");
ldr.load(urlReq);
function loadHandler (event:Event) {
var myClip:MovieClip = event.target.content;
addChild(myClip);
function myClipOver(event:MouseEvent):void {
myClip.myBlueBalls.stop();
function myClipOut(event:MouseEvent):void {
myClip.myBlueBalls.play();
// set listeners
myClip.addEventListener(MouseEvent.ROLL_OVER, myClipOver);
myClip.addEventListener(MouseEvent.ROLL_OUT, myClipOut);
// listener
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);
Tutorial Two code - loading and unloading multiple external swfs.
var Xpos:Number = 110;
var Ypos:Number = 180;
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");
loader.load(defaultSWF);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
// Btns Universal function
function btnClick(event:MouseEvent):void {
removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
// Btn listeners
eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
stingray.addEventListener(MouseEvent.CLICK, btnClick);
demon.addEventListener(MouseEvent.CLICK, btnClick);
strongman.addEventListener(MouseEvent.CLICK, btnClick);I will not be able to help you with whatever relaxatraja provided though it is purported by relaxatraja to be clearly explaining what I was explaining (???).
Your loadHandler function appears a bit confused. For the code you show I don't see you assigning any event listeners for the events that will be dispatched in the loaded file. As I showed earlier, your loadHandler function should be assigning a listener for the event that will be dispatched (modified slightly below). and if you have three different events being dispatched in the loaded file, then you'll do better to have three different listeners. I show only one below for one of the events you dispatch...
function loadHandler (event:Event) {
// assign a listener for the loaded file's goExit function's event
MovieClip(event.currentTarget.content).addEventListener("close", event1Handler);
// I can't make sense of what you have here
removeChild(myClip); // why ?? - it hasn't been added yet as far as I can see - error 2007?
var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf"); // the event.target is the Loader
ldr.load(newSWFRequest); // this will load over the file you just finished loading??
ldr.x = Xpos;
ldr.y = Ypos;
addChild(myClip); // why?? it has nothing in it
function event1Handler(e:Event):void {
// do whatever is involved with what the "close" event is supposed to do
trace("goExit function executed");
As far as what you have in the loaded file, you appear to be trying to pass the files names as if they were parameters. The file naming should be done at the receiving side for the event handler function for the event listener. While you could create a custom event that include parameters that you can pass, that's another level of coding that is better left for a future experience.
Study the following - understand it before you try to use it.
Below is a link to some files I made for another posting that demonstrates what I have been explaining. The neurope file is the main file. Publish the netherlands file so that you have an swf to load for it, and then run the neurope file. The file that gets loaded (netherlands) only has a button in it that when clicked dispatches an event for which the main file (neurope) has assigned a listener. The main file displays a message when the button gets clicked in the loaded file.
http://www.nedwebs.com/Flash/neurope.zip -
Getting external swf to stay visible?
Hi
I have an external swf that contains a button that controls my main swf's timeline.
I can get it to navigate fine, but as soon as it navigates, my external swf disappears, because my main swf is no longer on the frame my external swf was imported on.
How do I get the external swf to stay visible along all the frames of my main swf's timeline?
Here's the code I use to import the external swf:
var external_swf:MovieClip;
var loader:Loader = new Loader();
var import_me_SWF:URLRequest = new URLRequest("external_mc.swf");
loader.load(import_me_SWF);
loader.x = 0;
loader.y = 0;
addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataOnLoad);
function dataOnLoad(evt:Event): void {
external_swf = MovieClip(evt.target.content);
Thanks guys.
ShaunSOLUTION:
Ok - here's a solution I experimented with for anyone that needs a similar fix:
1. Create a new layer where you would like the external swf to go (in my case, the layer is on the top).
2. Draw a rectangle (doesn't matter what it is really), convert it to a movieclip symbol, and give it a color effect APLHA of 0 so it's invisible. Give it an instance name - I named mine 'external_swf_holder'
3. Adapt the external loader code like this...add 'external_swf_holder' to the beginning of the external clip name, with a dot in between:
var external_swf:MovieClip;
var loader:Loader = new Loader();
var import_me_SWF:URLRequest = new URLRequest("external_mc.swf");
loader.load(import_me_SWF);
loader.x = 0;
loader.y = 0;
addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataOnLoad);
function dataOnLoad(evt:Event): void {
external_swf_holder.external_swf = MovieClip(evt.target.content);
4. That's it. Now Flash should always keep your swf on the layer that 'external_swf_holder' is on.
Cheers
Shaun -
Hi,
I have the following issue:
I have a master Flash file into which I have imported six
external swf files (which i do not have a .fla for)
I have added a button to each of the six files (buy double
clicking on the file and then adding layers to its timeline) to
appear at the end of the animation which I want to use to move the
master timeline on 1 frame and onto the next imported swf movie
file.
However when I publish the file to test it and I click the
button the movie will not progress, but if I click the next frame
in the menu bar at the top of the player window the movie
progresses.
Can anyone give me a hint on what the code should be for the
button??
CheersFrom your description, my guess is:
_parent.gotoAndStop(_parent._currentframe + 1); -
I'm using the code below in a movieclip in Flash CS3 to
import an external swf into my project. However, every time I
upload the site to the server (
http://www.kimandbrett.com),
when I click on Gallery, the Gallery.swf is stretched out & the
image is too big. I tried uploading the same exact thing to
http://www.personal.kent.edu/~nglase/FlashSite/index.html
& it works just fine. The site that is not working is hosted by
GoDaddy. Are there any server settings that might be causing it to
behave differently?
Thanks,
Nataliestage.StageScaleMode.NO_SCALE;
/* put this line in all your code */
The entire Flash application is fixed, so that it remains
unchanged even as the size of the player window changes. Cropping
might occur if the player window is smaller than the content. -
Importing fl.controls causes external .swfs to crash
Hello,
I've discovered that if I use fl.controls.* classes in my AS3
code, and then load an external .SWF that uses something like
fl.controls.combobox, I will get a crash when clicking on the
combobox.
The crash is as follows:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at fl.containers::BaseScrollPane/drawBackground()
at fl.controls::List/draw()
at
fl.core::UIComponent/drawNow()[fl\core\UIComponent.as:1198]
at fl.controls::List/scrollToIndex()
at fl.controls::SelectableList/scrollToSelected()
at fl.controls::ComboBox/open()
at fl.controls::ComboBox/onToggleListVisibility()
I am not creating new fl.controls.* objects in my AS3 code, I
am merely trying to type them correctly so I can reference them in
code. For example, with the following code, the app crashes:
public function getButton(buttonNum:int):Button
return mDialog["button" + buttonNum];
If I change that code to return Object instead of Button, the
code works fine.
Any thoughts???thanks….maybe it isn't a actual kernel panic….I was not sure what to call it….the old kernel panic were in UNIX code…this is a SYSTEM NEEDS TO BE REBOOTED
and it is only with LIGHTROOM
no other app causes this.
I can't find the copy paste of the actual SYSTEM REPORT
I will try to repeat it…..and copy it for everyone to see today….
thanks
I greatly appreciate your help
jsm -
AS3: How to access and control embedded sounds in an external swf?
I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can't seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF.
It's easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF.
I read several solutions, but none seem to work.
I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 import tool and then open the actionscript properties panel on flash to select the class name: SoundSegment1. Then I edit the class code and create a file called SoundSegment1.as and it's saved right next to my document class main.as in the same directory. The code of the SoundSegment1 class looks like this:
package {
import flash.media.*;
public class SoundSegment1 extends Sound
public function SoundSegment1 ()
// no code in here
public function playSound()
var soundSegment1:Sound = new SoundSegment1();
var channel:SoundChannel = soundSegment1.play();
Then, in my main.as, I have done several attempts to play this sound such as:
var fileLocation:URLRequest = new URLRequest(SWFToLoad); loader.load(fileLocation); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener); loader.contentLoaderInfo.addEventListener(Event.INIT, initListener);
function initListener(e:Event):void // I also placed this code on the completeListener and it didn't work { loader.content.soundSegment1.playSound(); // doesn't work. }
I get:
Line XXX 1061: Call to a possibly undefined method playSound through a reference with static type flash.display:DisplayObject.
or, I also read that I should be able to do something like this anywhere in the Main.as file:
var theClass:Class = Class(loader.content.getDefinitionByName("SoundSegment1")); var theSound:theClass = new theClass(); theSound.play() //doesn't work either.
I also tried on the completeListener:
var TheClass:Class = e.target.applicationDomain.getDefinition("SoundSegment1") as Class; var theSound:TheClass = new TheClass();
theSound.play() //doesn't work either.
I get:
ReferenceError: Error #1065: Variable SoundSegment1 is not defined. at flash.system::ApplicationDomain/getDefinition()
I am stuck and I really need to get this to work. I would be genuinely grateful for your help.
Thank you in advance for any help provided. I really need to get it to work, because I can't simply embed them in the main SWF or load them individually externally one by one.
Thanks again!THANK YOU!
I think your code may be over my head though. I think you are using an anonymous function which is not something I am familiar with (but I want to learn about if it's useful).
I also don't know where the classS came from. I see that it's a parameter sent along with the event, but I don't really see where that came from.
Someone at: http://www.kirupa.com/forum/showthread.php?305098-Playing-a-embedded-sound-in-an-external- swf&p=2658098#post2658098
Is showing what seems to be an easier solution, but my problem there is I can't access the source file of the "child" swf.... ayayay.....
I am going to tinker with your solution and see if it gets me anywhere. Thanks so much for your help again. -
Successfully imported external swf, can not put it into movie clip
Hello all,
I have started learning AS3 and gradually getting used to, trying to put external swf into movie clip.
Successfully imported target swf and put into stage, when I publish this I see target swf is playing.
import flash.display.MovieClip;
var BGLoader:Loader = new Loader();
var BGurl:URLRequest = new URLRequest("HomeBG.swf");
BGLoader.load(BGurl);
BGLoader.y = 0;
BGLoader.x = 0;
addChild(BGLoader);
As next step I want to put this swf into movie clip and get more control, but when I publish bellow only I see is empty background, without any errors.
import flash.display.MovieClip;
var BGLoader:Loader = new Loader();
var BGurl:URLRequest = new URLRequest("HomeBG.swf");
BGLoader.load(BGurl);
BGLoader.y = 0;
BGLoader.x = 0;
//addChild(BGLoader);
var animMC = MovieClip(BGLoader.content).getChildAt(0) as MovieClip;
addChild(animMC);
Is anything missing?
Any help would be appreciated, thanks.You can only access Loader.content after Load completed successfully.
Try this,
import flash.events.Event;
var BGLoader:Loader = new Loader();
var BGurl:URLRequest = new URLRequest("HomeBG.swf");
BGLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
BGLoader.load(BGurl);
BGLoader.y = 0;
BGLoader.x = 0;
//addChild(BGLoader);
var animMC:MovieClip;
function completeHandler(event:Event)
animMC = event.currentTarget.content;
addChild(animMC);
Maybe you are looking for
-
Can I have two itunes accounts on one laptop
Can I have both my husbands and my account (2 seperate ids) on one laptop
-
SAP Tables for FI Accounts Payable
Hello gurus, Does anyone know what are the SAP Tables for FI Accounts Payable and what TCodes to display these A/P tables? Thanks in advance. Best regards, Gab
-
Error 485680 reservation warning(node_join) - Unable to lookup local_only f
SETUP 3xT5220 1xStorageTek 2540 FC RAID SC 3.2 OS 10 Patchlevel 137111-08 Two of the 3 cluster nodes are directly connected to the RAID. Multipathing enabled on all cluster nodes (stmsboot -e). PROBLEM On the node, which was added to an already estab
-
Itunes 11 on Windows 8 won't recognize by i touch
When I connect my itouch or ipad itunes does not recognize. I have a Windows 8 operating system and Itunes 11. I have been through the troubleshooter without success.
-
Greetings... Having some trouble with java performance on T1000s. Has anyone attempted to run WebSphere 6.0 on the T1000? The box is sitting pretty much idle while the web apps are extremely slow to respond and any time of administration process (con