Swf Loader and changeing Frames
Hello all, i am loading a SWF i created using the SwfLoader component in Flex 3.
The code i am using is as follows - <mx:SWFLoader width="627" height="468" source="swf/walk.swf" id="loader"/>
The swf file contained 5 key frames and when you click on the the swf file, it progresses to the next frame.
I want to be able to achieve this by using buttons instead, that way i can add a forward and previous button.
Could anyone help me on achieving this ?
I have tried all sorts from
<mx:Script>
<![CDATA[
var myMovieClip:MovieClip = MovieClip(loader.content);
myMovieClip.gotoAndStop( 2 );
]]>
</mx:Script>
to everything i could think of.
ANy help would be great
Im sorry how do you mean in a "compltete" event handler,
could you show me an example ?
THanks
Similar Messages
-
New to flash, swf loaded while changing size
i'm trying to create a button that will replace the current
swf with another and i want the size to change between the various
sizes of each page. i'm currently using the following code in the
action inspector:
on(release){loadMovieNum("myfilename.swf",0);
i know there has to be a simple way to do this! a very
grateful thanks to anyone who tries to help!
b3autiful_dizaster wrote:
> i'm trying to create a button that will replace the
current swf with another
> and i want the size to change between the various sizes
of each page. i'm
> currently using the following code in the action
inspector:
>
> on(release){loadMovieNum("myfilename.swf",0);
> }
>
> i know there has to be a simple way to do this! a very
grateful thanks to
> anyone who tries to help!
You can't change size dynamically as it is defined by the
object embed tags.
You could use WMODE transparency which could help you fake it
tho not always best
solution to go with WMODE. It's a very buggy parameter.
WMODE will remove the background color so the flash movie
appear over the html and you
can see the HTML content trough the movie.
You could define some solid shape for the background on
bottom layer to make it look
like SWF background, than change it with the other loaded
movie making it appear as it
changed size while the over all flash size stats the same. As
said above - faking it.
Best Regards
Urami
!!!!!!! Merry Christmas !!!!!!!
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami>
b3autiful_dizaster wrote:
> i'm trying to create a button that will replace the
current swf with another
> and i want the size to change between the various sizes
of each page. i'm
> currently using the following code in the action
inspector:
>
> on(release){loadMovieNum("myfilename.swf",0);
> }
>
> i know there has to be a simple way to do this! a very
grateful thanks to
> anyone who tries to help!
You can't change size dynamically as it is defined by the
object embed tags.
You could use WMODE transparency which could help you fake it
tho not always best
solution to go with WMODE. It's a very buggy parameter.
WMODE will remove the background color so the flash movie
appear over the html and you
can see the HTML content trough the movie.
You could define some solid shape for the background on
bottom layer to make it look
like SWF background, than change it with the other loaded
movie making it appear as it
changed size while the over all flash size stats the same. As
said above - faking it.
Best Regards
Urami
!!!!!!! Merry Christmas !!!!!!!
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami>
SWF Loader and Power Point Slide
Hi Xcelsius Experts
I am using a tab set container and in each container i am trying to open another Xcelsius Dashboard - as soon as i provide the complete path of .xlf file the swf loader instantly says 100% but it doesnt show the xcelsius file and it does the same after hitting preview button.
so how can I show another Xcelsius file within Xcelsius and I would also like to see that working in powerpoint after export.
Many thanks in advance for your help
Kind Regards,
Waqas
Burn it to CD and re-import it.
This is not for a public presentation, correct? It's for your own personal (not job related) use?
Hi everybody,
I have a quick and general question for the following case:
I want to produce some transitions and effects for a kinetic typography project in After Effects and then import these parts into Flash Professional via XFL and Bridge.
So my actual problem is this one: my Flash application should be able to load these made transitions and effects dynamically at run-time and not from a pre-configured timeline made upfront. Because there should be dynamic text fields in these XFL data from After Effects I also need to be loaded at run-time for the kinetic typography thing.
So is there any possible way to do / load / change the dynamic text fields in these XFL data or the order of all transitions and effects in Flash Professional at run-time or anything else?
I know this is a special question, but I hope there would be an answer...
Thanks for your help in advance
Regards,
Kevin
Something along this model is what I had in mind:
public class MainPanel extends JPanel
private DrawPanel drawPanel = new DrawPanel();
private JComboBox comboLeft = new JComboBox();
private JComboBox comboRight = new JComboBox();
public MainPanel()
// add drawpanel and comboboxes to main panel
// add item listener to comboboxes
private class ComboListener implements ItemListener
@Override
public void itemStateChanged(ItemEvent arg0)
if (...) // both comboboxes changed
// get values from comboboxes
drawPanel.setValues(left, right); // call drawpanel's method
public class DrawPanel extends JPanel
private int left = 0;
private int right = 0;
public DrawPanel()
//setPreferredSize(....); // set panel size
@Override
protected void paintComponent(Graphics g)
super.paintComponent(g);
//... draw the line depending on the left and right value
public void setValues(int left, int right)
this.left = left;
this.right = right;
repaint();
}
Youtube is slow at loading and changing quality
Ok so lately i've been having lots of issue with YOUTUBE on mozilla 21.
I've got shockwave flash 11.7.700.224
The problems i'm having is that some videos takes forever to just load.. im staring at a blackscreen for 1-2min before it starts.. and after that i wanna change quality to 720p or 1080p and it takes 1 year to change quality.. i dont get it. It wasn't like this before.
Dont give me obvious answers like "clear your cache" "delete cookies" i've tried all this.. I've even reinstalled my windows completly and it didnt even fix it.
All my drivers are up to date.
help pls.
Same here: I have to stop the video, then change the quality and then continue the video. Changing the quality when the video runs does not work. And same here: disabled add ons and also did run FF in Safe Mode: no difference.
Hi all,
I have been using iframes in my application and they are working fine. Now, my application's swf file is loaded into another flex application using swfloader and now iframes are giving error? can any body let me know what went wrong?
thanks
Im sorry how do you mean in a "compltete" event handler,
could you show me an example ?
THanks
Bulk load to change deferred task date
We initially loaded users with password expirations and a defered task we created to send them emails starting 15 days before the password expires. We want to move these dates out. Can we do a bulk load and change the dates?
Thanks,
Larry
the deferred task scanner is expensive too. so much so in fact, that we dont use it. in fact, we keep a users "nextTaskDate" as a queriable attribute, which lets us get a result set of users that have tasks on that date. no more iterating through the users to find them. with this, its much easier to do what i had reccommended earlier.
--Dana
How to load and unload more than one external swf files in different frames?
I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
Thanks
Look into using the Loader class to load the swf files. If you want to have it happen in different frames then you can put the code into the different frames.
I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/removeChild()
at index_fla::MainTimeline/Down3()"
import nl.demonsters.debugger.MonsterDebugger;
var d:MonsterDebugger=new MonsterDebugger(this);
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);
// loader is the loader for portfolio page swf
var loader:Loader;
var loader2:Loader;
var loader3:Loader;
var loader1:Loader;
// resize content
function resizeHandler(event:Event):void {
// resizes portfolio page to center
loader.x = (stage.stageWidth - loader.width) * .5;
loader.y = (stage.stageHeight - loader.height) * .5;
// resizes about page to center
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
/*loader2.x = (stage.stageWidth - 658.65) * .5;
loader2.y = (stage.stageHeight - 551.45) * .5;*/
addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
function onEnterFrame(ev:Event):void {
var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
loader = null;
loader = new Loader();
loader.name ="carousel1"
//adds gallery.swf to stage at begining of movie
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader.load(requesterb);
} catch (error:SecurityError) {
trace(error);
addChild(loader);
loader.x = (stage.stageWidth - 739) * .5;
loader.y = (stage.stageHeight - 500) * .5;
// stop gallery.swf from duplication over and over again on enter frame
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
//PORTFOLIO BUTTON
//adds eventlistner so that gallery.swf can be loaded
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
function Down(event:MouseEvent):void {
// re adds listener for contact.swf and about.swf
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
//unloads gallery.swf from enter frame if users presses portfolio button in nav
var requester:URLRequest=new URLRequest("carouselLoader.swf");
loader = null;
loader = new Loader();
loader.name ="carousel"
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader);
loader.x = (stage.stageWidth - 739) * .5;
loader.y = (stage.stageHeight - 500) * .5;
removeChild( getChildByName("about") );
removeChild( getChildByName("carousel1") );
// remove eventlistner and prevents duplication of gallery.swf
MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
//INFORMATION BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
function Down1(event:MouseEvent):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
var requester:URLRequest=new URLRequest("contactLoader.swf");
loader2 = null;
loader2 = new Loader();
loader2.name ="contact"
loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader2.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader2);
loader2.x = (stage.stageWidth - 658.65) * .5;
loader2.y = (stage.stageHeight - 551.45) * .5;
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
//ABOUT BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
function Down3(event:MouseEvent):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
var requester:URLRequest=new URLRequest("aboutLoader.swf");
loader3 = null;
loader3 = new Loader();
loader3.name ="about"
loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader3.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader3);
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
removeChild( getChildByName("carousel") );
removeChild( getChildByName("carousel1") );
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
stop();
Andrei1,
Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
loader.unload();
loader2.unload();
loader3.unload();
I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
function killLoad():void{
try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
loader.unload(); loader2.unload(); loader3.unload();
I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly? Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
---- Here is my updated code ----
// variable for external loaders
var loader:Loader;
var loader1:Loader;
var loader2:Loader;
var loader3:Loader;
// makes borders resize with browser size
function resizeHandler(event:Event):void {
// resizes portfolio page to center
loader.x = (stage.stageWidth - loader.width) * .5;
loader.y = (stage.stageHeight - loader.height) * .5;
// resizes about page to center
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
//adds gallery.swf to stage at begining of moviie
Down();
//PORTFOLIO BUTTON
//adds eventlistner so that gallery.swf can be loaded
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
function Down(event:MouseEvent = null):void {
// re adds listener for contact.swf and about.swf
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
//unloads gallery.swf from enter frame if users presses portfolio button in nav
var requester:URLRequest=new URLRequest("carouselLoader.swf");
loader = new Loader();
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader.load(requester);
} catch (error:SecurityError) {
trace(error);
this.addChild(loader);
loader.x = (stage.stageWidth - 739) * .5;
loader.y = (stage.stageHeight - 500) * .5;
// sure this is not the best way to do this - but it is unload external swfs
loader.unload();
loader2.unload();
loader3.unload();
// remove eventlistner and prevents duplication of gallery.swf
MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
//INFORMATION BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
function Down1(event:MouseEvent = null):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
var requester:URLRequest=new URLRequest("contactLoader.swf");
loader2 = null;
loader2 = new Loader();
loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader2.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader2);
loader2.x = (stage.stageWidth - 658.65) * .5;
loader2.y = (stage.stageHeight - 551.45) * .5;
loader.unload();
loader2.unload();
loader3.unload();
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
//ABOUT BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
function Down3(event:MouseEvent = null):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
var requester:URLRequest=new URLRequest("aboutLoader.swf");
loader3 = null;
loader3 = new Loader();
loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader3.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader3);
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
loader.unload();
loader2.unload();
loader3.unload();
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
stop();
Loading and Unloading of swf files in SWF Loader
Hi all,
I have a doubt reg. SWF Loader.
I have created two mxml files A & B.
A. local.mxml
B. SwfSample.mxml
i have two labels and a button in A file and i have set values to those labels and have a method to handle the click event of the button. In B file i have loaded this A file and accessed the labels and methods using SystemManager Component and changed the values of the A file's label and accessed data from A file to B file.
Here comes the problem,
I have two buttons named LoadAgain and Unload
When i click the Unload button, the SWF Loader unloads its content by the method i handled for the Unload button, after that i have clicked on the LoadAgain button to load the same content of A's mxml to the SWF Loader, it loads succesfully,but i was not able to access its Label or Method from the B mxml. Please help me to solve the issue.
local.mxml
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml layout="absolute">
<mx:Script>
<![CDATA[
Bindable]
public var varOne:String = "This is a public variable";
public function setVarOne(newText:String):void
varOne = newText;
]]>
</mx:Script>
<mx:Label id="lblOne" text="I am here" x="28" y="88"/>
<mx:Label text="{varOne}" x="166" y="88"/>
<mx:Button label="Nested Button" click="setVarOne('Nested Button Pressed');" x="28" y="114"/>
SwfSample.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.managers.SystemManager;
import mx.controls.Label;
Bindable]
public var loadedSM:SystemManager;
private function initNestedAppProps():void
loadedSM = SystemManager(myLoader.content);
public function updateLabel():void
lbl.text = loadedSM.application[
"lblOne"].text;
public function updateNestedLabels():void
loadedSM.application[
"lblOne"].text = "I was just updated" ;
loadedSM.application[
"varOne"] = "I was just updated";
public function updateNestedVarOne():void
local(loadedSM.application).setVarOne(
"Updated varOne");
public function unload():void
myLoader.content.loaderInfo.loader.unload();
public function loadAgain():void
myLoader.load(
"../bin-debug/local.swf");
]]>
</mx:Script>
<mx:Label id="lbl" x="72" y="47"/>
<mx:SWFLoader id="myLoader" width="438" source="../bin-debug/local.swf" creationComplete="initNestedAppProps();" y="73" height="238" x="72" alpha="1.0"/>
<mx:Button label="Update Label Control in Outer Application" click="updateLabel();" x="72" y="319"/>
<mx:Button label="Update Nested Controls" click="updateNestedLabels();" x="72" y="349"/>
<mx:Button label="Update Nested varOne" click="updateNestedVarOne();" x="72" y="379"/>
<mx:Button label="Unload" click="unload();" x="72" y="409"/>
<mx:Button label="Load Again" click="loadAgain();" x="72" y="439"/>
</mx:Application>
Thanks & regards,
Sathish.K
creationComplete only fires once when the SWFLoader is created. Therefore you never reset your variables to point to the new sub-app. On a slow network, creationComplete may fire before the sub-app loads. It is best to use the COMPLETE event.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui
Change the SWF loading text for a single presentation
This question was posted in response to the following article: http://help.adobe.com/en_US/Presenter/7.0/WS8815BC0A-5D22-4f29-87B9-D9047B5B57E4.html
Hi,
I have Adobe Presenter 7.0.5, in which with recently updating to 7.0.7 version.
When I tried the fix of this "Change the SWF loading text for a single presentation" workaround fix, I passed to have the error:ReferenceError: Error #1069: Property ADOBE_PRESENTER not found on Pool_P75.Resource.UIText
But before this error comes, I see that the loading text is changes from the original 2Adobe Presenter" to the one defined by me on the UIText, as the fix said.
And what's happen is that the scrren with the loading text is not being changed by the learning first slide....
Is there any workaround to correct that error?
Many thanks in advance for any feedback from the adobe support team or from any other colleagues that are using Adobe Presenter (;-)).
FAQ: SWF's and loading external files in Flash Catalyst
How do I make the images in my Flash Catalyst project external to the published SWF?
You can choose whether images are embedded in your Flash Catalyst SWF, or loaded dynamically; this can help to keep your SWF's small. Simply right-click an image and chose "Externalize Image".
Answered by: Adam Cath.
See entire discussion.
How do I make the SWF I imported to Flash Catalyst load external files?
When importing a SWF, Flash Catalyst only pulls the SWF asset into your project. Many SWF's, such as slideshows and media players, rely on external data files, such as configuration files or media assets. If you would like to use such a SWF in Catalyst, then you will have to place these external resources into your Catalyst project as well as importing the SWF.
Let's assume you have a SWF source folder that contains your SWF file and all of the external files it needs. You can open the SWF file from this folder and it works fine. But, if you import the SWF into Catalyst, the Catalyst project doesn't display it correctly because it can't load the external files. Here's what you do:
1. Open your swf source folder, and copy all of the files/folders there except the SWF you imported.
2. In Catalyst, Run/Preview your project (Ctl/Cmd-Enter)
2. Note the file path to Main.html in your browser
3. In your OS, open the folder that contains /bin-debug/Main.html from above
4. Open the "src" folder
5. Paste all of the files from step 1 into the src folder.
6. Catalyst won't pick up that your project changed, so tweak it a bit (add a Rectangle), and save it.
7. Run your project. If it doesn't work, try closing and reopening your project and running again.
For an example, check out: Using an XML-driven SWF in Catalyst to create a slideshow.
See entire discussion.
Answered by: Bear Travis
You can make you swf a custom component with 2 states.
The first state will be empty and rename it "OFF" the second state will have your swf file and name it ON.
Then go back to your artboard/project, add your 2 buttons ON & OFF.
For the ON button add interaction "play transition to custom component ON"
For the OFF button add interaction "play transition to custom component OFF"
Here is an example swf_control
Need help loading and positioning a swf into a swf
This is the swf I'm trying to load.
These actions load and position a small simple swf just fine and the trace in the onLoadProgress function indicates that it loads completely
but I can't see it. What am I doing wrong?
this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
var my_listener:Object = new Object();
my_listener.onLoadComplete = function(target_mc:MovieClip) {
target_mc._x = 150;
target_mc._y = 100;
my_listener.onLoadProgress = function(target_mc:MovieClip) {
trace(target_mc.getBytesLoaded() + " out of " + target_mc.getBytesTotal());
var my_loader:MovieClipLoader = new MovieClipLoader();
my_loader.addListener(my_listener);
//my_loader.loadClip("little.swf", container_mc);
my_loader.loadClip("cam01.swf", container_mc);
do you see a rotated swf if you use:
this.createEmptyMovieClip("container_mc", 1);
var my_listener:Object = new Object();
my_listener.onLoadInit = function(target_mc:MovieClip) {
target_mc._x = 150;
target_mc._y = 100;
target_mc._rotation = 22;
var my_loader:MovieClipLoader = new MovieClipLoader();
my_loader.addListener(my_listener);
my_loader.loadClip("cam01.swf", container_mc);
if yes, either:
1. you are repositioning your swf and for some reason don't recognize that or
2. you're changing container_mc or one of its parents _x,_y properties elsewhere.
Load and consecutively play external swf's
Hi,
I have three external swf files - part1, part2 and part3. I
know how to load one clip but I would like to know how to
dynamically load them into an empty MC and then play them in full
consecutively without any fancy transitions so that it plays like
one big movie using Actionscript (no button triggers!).
I have some very BASIC actionscript knowledge but am not sure
which way is best. If someone could give me some "simple" step by
step advise it would be grately apreciated.
Danielle
Ok I followed your instructions and when I play the main swf
(I call - load_swfs) file it plays part1.swf fine but then it gets
to the first frame of part2.swf (which is blank) and just stops and
doesn't go any farther! Did I put something in the wrong place?
I've written what I did and where below.
// In my main file (load_swfs) it's just a single blank frame
with this code in it :-
tl=this;
swfA=["part1.swf","part2.swf","part3.swf"];
dep=0;
numLoaded = 0;
totalLoad=3;
lo=new Object();
lo.onLoadInit=function(target){
numLoaded++;
checkIfAllLoaded();
function checkIfAllLoaded(){
if(numLoaded==totalLoad){
holder1.play();
} else {
mc=this.createEmptyMovieClip("holder"+(numLoaded+1),dep++);
mcl.loadClip(swfA[numLoaded],mc);
mcl=new MovieClipLoader();
mcl.addListener(lo);
mc=this.createEmptyMovieClip("holder"+(numLoaded+1),dep++);
mcl.loadClip(swfA[numLoaded],mc);
// In part1.swf in the last frame is :-
tl.holder2.play();
this.removeMovieClip();
// In part2.swf frame 1 is blank with a stop(); and in the
last frame is:-
tl.holder3.play();
this.removeMovieClip();
// In part3.swf frame 1 is blank with a stop();
Let me know where I went wrong!
Thanks
How to access frame labels in a SWF loader?
I have a swfloader, which has a swf file embedded. It loads and plays, and stops at the frame in the swf where I have a stop().
In one of my app's functions, I need to send the playhead in the swf to another frame labe, but I seem to have forgotten how to talk to the swf.
<mx:SWFLoader source="@Embed(source='assets/thermal.swf')" id="diagram" />
diagram.gotoAndPlay("myLabel"); does not compile.
I know this is simple, but I can't find it anywhere...
I tried this:
import flash.display.MovieClip;
protected function accordion1_changeHandler(event:IndexChangedEvent):void {
var mc:MovieClip = diagram.content as MovieClip;
switch (event.currentTarget.selectedIndex) {
case 0:
currentState = "phase1";
mc.play();
break;
case 1:
currentState = "phase2";
mc.gotoAndPlay("start2");
diagram
break;
case 2:
currentState = "phase3";
break;
Maybe you are looking for
-
How do I use same MDB for multiple Queues? Deployment ?
Here is what I am trying to do I have written one MDB that I want to use for multiple queues. I have seen posting mentioning that code a new weblogic-ejb-jar.xml to define other queues as the solution.
-
Word import - hyperlinks work in one document, not in another
Hi all, I am aware that much has been written about broken links after importing, but there is a strange pattern to my problem I have not seen before. I have three language versions of one document (English, French, German). So I set up three indepen
-
i really could find a way out
-
How can I eliminate an I-Pod Touch app?
How can I eliminate an I-Pod Touch app? I want to eliminate a few but don't want to "restore" and lose all of them. Is there any way to trash apps one at a time?
-
Mail preview has no graphics...
Is this a setting somewhere in mail under 10.6? My preview pane no longer shows any images, and I can't find how to get them back. Thanks.