Control a swf loaded dynamically

Hi I am using the code below to add a swf file from an
external folder to a TileList. All works fine but would like to
know if it is possible to add a stop() command to each swf as it
loads. Do I actually have any access to the swf or is the object
just pointing to the url. Any ideas??
Cheers
private function onSwfDirSelect(e:Event):void {
swfList.removeAll();
var fileRef:File = e.target as File;
var dirListing:Array = fileRef.getDirectoryListing();
for each (var file:File in dirListing) {
if (!file.isDirectory && !file.isSymbolicLink
&& file.type == ".swf") {
var o:Object = new Object();
o.data = file.nativePath;
o.source = file.nativePath;
swfList.addItem(o);
}

This is what I've tried, based on searching for
SWFLoader.content:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
width="100%" height="100%">
<mx:Script>
<![CDATA[
import mx.managers.SystemManager;
public function resetFlash():void {
loadedSM.application.resetAll();
[Bindable]
public var loadedSM:SystemManager;
// Initialize variables with information from
// the loaded application.
private function initNestedAppProps():void {
loadedSM = SystemManager(equipFlash.content);
]]>
</mx:Script>
<mx:SWFLoader id="equipFlash"
source="assets/equipment.swf" width="746" height="550"
creationComplete="initNestedAppProps();"/>
</mx:Canvas>
And the line "loadedSM.application.resetAll();" is flagged as
an error. "resetAll" is the name of the public function I'm trying
to trigger.

Similar Messages

  • Controlling SWF loaded through MovieClipLoader

    Hello AS gurus,
    I have a two-level site for a portfolio where users can view
    still images and videos for different projects. The top level SWF
    file can be considered as the "parent SWF" and within this file,
    the user navigates by choosing which project he/she wants to
    explore. After choosing, the "parent SWF" loads in a "child SWF"
    via MovieClipLoader of the selected content. It is within this
    "child SWF" that the user can view the various images and videos
    (with sound) of the selected project. To go back out and choose a
    different project, the parent SWF is used and the user navigates to
    and chooses another project.
    The problem is that I can't figure out how to communicate
    from the child SWF to the parent SWF (and vice versa)...well not
    really...this is difficult to explain...hmmm... It would be better
    to explain it with an example...
    If you go to:
    http://www.culshaw.info/junk_drawer/xdin/swf/
    (1) Choose the "Examples" square (when this box zooms up, you
    are presented with a way to navigate to various projects -- this
    SWF that loads as the zoom up happens is what I am calling the
    "parent SWF").
    (2) Choose the second project, labelled "Ford : Ti-VCT" by
    clicking on it (after clicking on the Ford project, the "child SWF"
    is loaded via a MCL from the "parent SWF").
    (3) You can see that the Ford project has 8 images and one
    video that the user can view. Choose the video and ensure that it
    begins to play and hit the mute button so that you hear sound
    (sound is default muted. It is within this "child SWF" that the
    video is NetStream(ed) and the sound is controlled. (there is a bug
    with my code here so you may need to hit play/pause to get the
    video going).
    (4) Now, as the video is playing and you hear sound, click on
    the "Other Examples" button that is located below the video player.
    This button is actually embedded in the the "parent SWF" that
    allows the user to navigate back up to see other projects and not
    in the "child SWF" which contains all of the content. Notice that
    you continue to hear the sound and that the net connection is still
    streaming the video within the "child SWF". I don't want this to
    happen. I want the "parent SWF" to tell the "child SWF" to stop
    streaming and stop all sounds when this "parent SWF" - embedded
    "Other Examples" button is pushed.
    I can't figure out how to do this. Any info that may help
    would be appreciated...
    -john

    Hi,
    It looks to me that the example you are going by has a main
    navigation in the parent swf that is controlling which child movie
    is loaded in and each child swf has its own internal navigation. If
    this is what you are trying to achieve and you are using
    _root.MoveClipName to target things you need to use the lockroot
    code so the flash player knows what root you are talking about.
    Place on the first frame of each Child swf
    this._lockroot = true;
    Hope this helps

  • Flex 4.6 IOS Mobile packager - can it load and play swf's dynamically at run time?

    I have an app that shows the viewer slides in a SWFLoader object.  I load the slides at runtime from a remote server.  When I package the app for IOS using 4.6 the swf slides load and play fine in the IOS emulator on the PC.  They don't load, however, when I deploy to a provisioned iPad. 
    My guess is that IOS can handle doesn't know what to do with dynamically loaded swf data.  I'm not positive though because it plays in the emulator.  Is that emulator truly emulating xcode or is it running flash?
    Note:  this same app plays an rtmp flash stream just fine even on the device itself.  Just can't handle a dynamically loaded swf.

    The correct answer to this question appears to be that Apple's terms of service *do not* prohibit the loading of swf's on IOS from remote servers dynamically at runtime.  They prohibit the loading of swf's that *contain executable ActionScript code*. 
    I loaded a PPT into Adobe Connect and then retrieved the resultant slide swf's from the Connect server.  I took these swf's and loaded them into my iPad app, dynamically at runtime, from a remote server.  The swf's loaded and animations played.  I made no changes to my code.  I'm just using a plain old SWFLoader object.
    Loading swf's dynamically at runtime from remote servers into IOS works - if you make the swf's right.  How to do that I'm not sure.

  • 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

  • A swf loader bug?

    It looks like I may have found a bug in the swf loader.  Before I submit this problem I want to make sure there is not something I'm missing in my code. I wrote this class to load a tutorial when the user first launches a sub application in a project I'm working on. This is a simplified version of the class that exemplifies the problem.  The same methods I use to launch the swf from within an mxml work just fine, but when I externalize the process in this class, I can hear the tutorial, but I get no visual.  Is this a bug or am I missing something?
    Here is the tutorial launcher class:
    package proj.fuego.utils
         import flash.events.Event;
         import mx.controls.SWFLoader;
         import mx.flash.UIMovieClip;
         public class TutPlayerSimple extends UIMovieClip
              private var gutLoader:SWFLoader;
              public function TutPlayerSimple(fullTutorialPath:String)
                 gutLoader = new SWFLoader();
                 gutLoader.addEventListener(Event.COMPLETE, addToStage);
                 gutLoader.load(fullTutorialPath + ".swf");
                 //addChild(gutLoader);
              private function addToStage(evt:Event):void
                 addChild(evt.target.content);
    This is my mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" minHeight="768" applicationComplete="application1_applicationCompleteHandler(event)">
         <mx:Script>
              <![CDATA[
                 import mx.controls.SWFLoader;
                 import mx.events.FlexEvent;
                 import proj.fuego.utils.TutPlayerSimple;
                 private var fullTutorialPath:String = "ll_tut";
                 private var tutPlayer:TutPlayerSimple;
                 protected function application1_applicationCompleteHandler(event:FlexEvent):void
                      // TODO Auto-generated method stub
                      var context:LoaderContext = new LoaderContext();
                      tutPlayer = new TutPlayerSimple(fullTutorialPath);
                      //context.checkPolicyFile = true;
                      //gutLoader.loaderContext = context;
                      trace("Loading Tut:", fullTutorialPath + ".swf");
                      addChild(tutPlayer);
              ]]>
         </mx:Script>
    </mx:Application>

    That didn't look right.  You'll need to addChild SWFLoader.  Not sure what will happen if you just try to add its content.  There might also be issues putting Flex components inside a UIMovieCip.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • I need help with controlling two .swf's from third.

    Hi, thanks for reading!
    I need help with controlling two .swf's from third.
    I have a problem where I need to use a corporate designed
    .swf in a digital signage solution, but have been told by the legal
    department that it can not be modified in any way, I also can't
    have the source file yada yada. I pulled the .swfs from their
    website and I decompiled them to see what I was up against.
    The main swf that I need to control is HCIC.swf and the
    problem is it starts w/ a preloader, which after loading stops on a
    frame that requires user input (button press) on a play button,
    before the movie will proceed and play through.
    What I have done so far is to create a container swf,
    HCIC_container.swf that will act as Target for the HCIC.swf, and
    allow me to send actionscript to the file I'm not allowed to
    modify.
    I managed to get that done with the help of someone on
    another forum. It was my hope that the following script would just
    start HCIC.swf at a frame past the preloader and play button, and
    just play through.
    var container:MovieClip = createEmptyMovieClip("container",
    getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("MCIC.swf", container);
    function onLoadInit(mc:MovieClip) {
    mc.gotoAndPlay(14);
    But unfortunately it didn't solve my problem. Because there
    is a media-controller.swf, that is being loaded by HCIC.swf that
    has the controls including the play button to start HCIC.swf.
    Here's a link to a .zip file with all 3 .swf files, and all 3
    .fla files.
    http://www.axiscc.com/temp/HCIC.zip
    What I need to do is automatically start the HCIC.swf file
    bypassing the pre-loader and play button without editing it or the
    media-controller.swf in anyway. So all the scripting needs to be
    done in HCIC_container.swf.
    I know this is confusing, and its difficult to explain, but
    if you look at the files it should make sense.
    ActionScripting is far from my strong point, so I'm
    definitely over my head here.
    Thanks for your help.

    Got my solution on another forum.
    http://www.actionscript.org/forums/showthread.php3?t=146827

  • 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!

A: new to flash, swf loaded while changing size

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>

  • Load dynamic text into Captivate form external file

    Is it possible to load dynamic text into a Captivate file from an external file like an XML using Javascript.
    I see there's a way to get it form the query scring of the URL ( http://captivatedev.com/2011/05/01/how-to-jump-to-a-specific-slide-in-a-separate-course/ ), but I have a project where I want  several pieces of text to be replaced and we want to be able to edit it externally from the Captivate file.
    Thanks!

    Hi Ned,
    What I'm doing is using a yahoo map to load addresses and
    place custom swf files as the placemarkers. The main stage has an
    instance of myMap, which is the map that yahoo sets us to display
    the ACTUAL map. They have also provided coding for placing markers
    on the map, which is what I'm using.
    I have the addresses throughout multiple xml files, which I
    am actually loading through 1 single xml file. These addresses are
    being stored in an array, then called by the AS below to place
    markers. All the markers are placed correctly, however, I am trying
    to have them actually say the address - this is where the problem
    lies.
    The marker that is being located and placed has a text field
    called load_text in it. I want that field to load the same address
    that is being used to place it (from the array addressA).
    I'm very confused because every loop through the * for (i=0;
    i<addressA.length; i++) * loop the marker is placed at the
    correct addressA
    location, but I cannot actually get the address to load into the
    load_txt field in the marker. I can even run a trace during that
    loop and it traces addressA for each address, but I can't seem
    to actually load those values into the load_txt box.
    Do you have any ideas?

  • Facing problem while unloading the SWF file in SWF Loader

    Facing problem with SWF Loader.
    Background:
    I've 4 SWF files (demo1.swf, demo1_skin.swf, demo2.swf and demo2_skin.swf).
    These swf files are created throgh Adobe Captivate.
    Playing demo1_skin, will play the demo1.swf with the controls at the button such as "Play", "Pause", "Stop", "Forward", "Backward" and Seekbar.
    Playing demo2_skin, will play the demo2.swf with the controls at the button such as "Play", "Pause", "Stop", "Forward", "Backward" and Seekbar.
    Scenario:
    1. Clicked on the video1 leaf of the tree. Video1.swf is getting played.
    I am able to click on the seek bar to take the video pointer to the desired position. I can drag the seek bar forward and backward also.
    2. Clicked on the video2 leaf of the tree. Video2.swf is getting played.
    I am not able to click on the seek bar to take the video pointer to the desired position. Also, I am not able to drag the pointer on the seek bar either forward or backward also.
    Play, Pause, Stop, Forward, Backward buttons on the skin works properly.
    3. If I again, click on the video1 leaf, point 1 observation is found.
    4. clicking agian, on video2 leaf, point 2 observation found.
    Please suggest.
    I tried with Loader also. But, nothing fruitful. Same result, as I am getting from SWF Loader.
    Please find the below used code.
    dp.xml
    <?xml version="1.0" encoding="utf-8"?>
    <root>
        <gallery label="All">
              <file label="video1" src="demo1_skin.swf" />
              <file label="video2" src="demo2_skin.swf" />
        </gallery>
    </root>
    Sample1.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white">
    <mx:Script>
        <![CDATA[
                  import mx.events.ListEvent;
                  private function tree_itemClick(event:ListEvent):void {
                        var t:Tree = event.currentTarget as Tree;
                        var dataObj:Object = event.itemRenderer.data;
                        swfLoader.load(null);
                        if (dataObj.hasOwnProperty("@src")) {
                            swfLoader.load(dataObj.@src);
              ]]>
    </mx:Script>
    <mx:XML id="dp" source="dp.xml" />
        <mx:HDividedBox width="100%" height="100%">
              <mx:Panel width="200" height="100%">
                  <mx:Tree id="tree" dataProvider="{dp}" labelField="@label"
                        showRoot="false" width="100%" height="100%" itemClick="tree_itemClick(event);" />
                  </mx:Panel>
                  <mx:Panel id="panel" width="100%" height="100%" backgroundColor="white">
                        <mx:SWFLoader id="swfLoader" width="100%" height="100%" />
                  </mx:Panel>
        </mx:HDividedBox>
    </mx:Application>
    log in the console
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\Sample3.swf - 951,034 bytes after decompression
    Clicked on the video1 leaf of the tree
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1_skin.swf - 31,309 bytes after decompression
    this.getSWFVersion() = 7
    contentSWFFullPath = file://C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1.swf
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1.swf - 323,414 bytes after decompression
    incrementWait = 1
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    decrementWait = 0
    Clicked on the video2 leaf of the tree
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2_skin.swf - 31,311 bytes after decompression
    [Unload SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1.swf
    this.getSWFVersion() = 7
    contentSWFFullPath = file://C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2.swf
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2.swf - 477,273 bytes after decompression
    incrementWait = 1
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    decrementWait = 0
    Clicked on the video1 leaf of the tree (Again)
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1_skin.swf - 31,309 bytes after decompression
    [Unload SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2.swf
    this.getSWFVersion() = 7
    contentSWFFullPath = file://C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1.swf
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1.swf - 323,414 bytes after decompression
    [Unload SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2_skin.swf
    incrementWait = 1
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    decrementWait = 0
    Clicked on the video2 leaf of the tree (Again)
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2_skin.swf - 31,311 bytes after decompression
    [Unload SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1.swf
    this.getSWFVersion() = 7
    contentSWFFullPath = file://C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2.swf
    [SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo2.swf - 477,273 bytes after decompression
    incrementWait = 1
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    onLoad m_movie = null
    decrementWait = 0
    [Unload SWF] C:\Java_Flex_Practice\FlexPractice\Sample\bin-debug\demo1_skin.swf

    Try calling unloadAndStop() before loading a new swf.
    http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html#unloadAndStop()
    http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#unloadAndStop()
    Note that unLoadAndStop()is FP10 only.

  • External swf loader probs

    HI, we have a situation which has done our heads in for two
    days non-stop,
    We have a pre-loader loading the area's and then have the
    loadmovienum to load in additional swf's now when we use the nav
    bar at the top of the page, it opens the right file but when it
    loads the page it moves onto the next load movie for some reason
    with out stopping, even though the stop command is in place....
    We have uploaded the dodgy version which you can test and see
    what problems we are having, the contact page is the same as the
    service page for the moment, but you will see the contact page
    display the "cloned" service page then it restarts the whole movie
    Here are the URL's to the zip file with all the swf's and
    fla's including the live what we have done so far online version.
    http://www.drsolutions.co.uk/premiere/wwwroot/
    http://www.drsolutions.co.uk/premiere/fla/premiere.zip
    Please reply asap thanks
    PS WE ARE USING FLASH 8

    Ok... I figured out how to get the swf to play correctly. I
    changed my publish settings to Flash 8 Player. This worked in
    getting the external swf to load... Now I ran into a new problem,
    hopefully someone can help me with this.... I need the swf to load
    in a VERY specific location, and at the EXACT scale as the original
    swf file. I have attempted to accomplish this by opening the
    original file that I am attempting to load. I selected all of the
    elements on the page, and looking at the X and Y coordinates, as
    well as the over all pixels measurement... then I placed these in
    numerals in the fields for the loader component in the "mother"
    file. I previewed it, and the placement and scale are wrong... how
    do I overcome this?? How can I control where the loader component
    loads and at what scale?
    Ken

  • Alternative scrollpane to load dynamic content

    I'm trying to load jpgs to my scrollpane dynamically. I
    noticed the compiled scrollpane component in flash 8 is very large
    in size (> 130kb) which i cannot afford to use. Instead I'm
    using the flash 6 scrollpane which is not precompiled and only
    several kbs after compiling to swf. However, I have problem
    rendering loaded dynamic contents onto the pane. The first load
    after starting flash 8 was always successful. After that, it fails.
    In case anyone's interested, I have simple test code to demonstrate
    the problem, and have uploaded it to
    http://www.filesend.net/download.php?f=1c5d80093f0b68cdcf7fe4cca0e0c923
    (you'll need to wait for 10 secs before the download button appears
    on that linked page)
    I'm just wondering what is the best choice of a small size
    scrollpane that handles dynanimic MovieClip.loadMovie() well. Any
    suggestions?

    i just found out that scrollpane component is not that huge
    (only 38kb). Does anyone know why when I add it to my project my
    swf increases by 130kb?

  • Tab navigator and swf loader issue

    I have written two flex applications. Each of the
    applications contains a tab navigator control. The direct children
    of this tab navigator are canvases, sized to max.
    i.e.
    <mx:Canvas label="WhateverLabel" width="100%"
    height="100%">
    <!--whatever additional children here-->
    </mx:Canvas>
    Everything works fine, the navigator, all its children and
    grandchildren Application does exaclty as it should ... untill I
    load it into another application using swf loader.
    Our main application is a menu driven app that loads
    individual swf files based on user selection. When either one of
    these programs (using the tab navigator described above) is loaded,
    I get a White Bar across the top of the screen, sized as the Tab
    navigator width.
    the white bar goes away as soon as the user interacts with
    any control, but it still is there on application load. Here is a
    picture of what I am speaking about.
    http://members.cox.net/dragon.magik/whitebar.jpg
    You can see the menu atop the screen as the base application.
    You can then see the panel right beneath it, that is the main panel
    of the application i am having problems with. The white bar, as you
    see, is as wide as my tab navigator. The TN labels are positioned
    correctly, but I don't know why I am getting the white bar. I am
    having the exact same problem with tab navigators in two different
    applications I load into this one control panel. Any help would be
    greatly appreciated. Thanks in advance.

    There is an unsolved bug in adobe.
    You have to solve it manually overriding the function:
    package
         import mx.containers.TabNavigator;
         public class TabNavigatorFixed extends TabNavigator
             public function TabNavigatorFixed()
                 super();
             override protected function  commitSelectedIndex(newIndex:int):void
                 super.commitSelectedIndex(newIndex);
                 if(tabBar.numChildren > 0){
                     // Select the corresponding Tab in the Tab Bar (this  fixes a bug in Flex)
                     tabBar.selectedIndex = newIndex;

  • Table to load dynamically using sqlloader.

    how to specify which table to load dynamically using sqlloader. We are using sqlldr in a script as given below...
    sqlldr user/pass control=/control/loader.ctl log=/log/logger.log bad=/bad/badrec.bad data=/data/d1.txt

    Hello, you'd need to build the necessary control files through a shell script, here is an example:
    # Write sqlplus commands to control_file.sql
    echo "set head off
    set feedback off
    set pagesize 0
    set termout off" > control_file.sql
    # read table and column list from table.dat
    more table.dat |awk '{print $1}' |
    while read TAB
    do
            echo "Table ${TAB}"
            read COLUMNS
            STR="nothing"
            if test "$TABLE_LIST" = "empty"
            then
                    TABLE_LIST="'$TAB'"
            else
                    TABLE_LIST="$TABLE_LIST,'$TAB'"
            fi
    # construct select to load data - creating SQL*Loader control files
            echo "set head off\n
            set feedback off\n
            set pagesize 0\n
            select column_name||' '||
            decode(data_type,'VARCHAR2',' char ('||DATA_LENGTH||')',
            'CHAR',' char ('||DATA_LENGTH||')','DATE',' date (20) \"DD-MON-YYYY HH24:MI:SS\"','')
            from user_tab_columns
            where table_name ='$TAB'
            order by 1;\n" | $ORACLE_HOME/bin/sqlplus -s $USR | awk '{print $1" "$2" "$3" "$4" "$5}' |
    # read the columns in and concatenate them together to form the control file select
            while read COLUM
            do
                    if test "$STR" = "nothing"
                    then
                            STR="\nspool $TAB.CTL\nselect 'LOAD DATA\nINFILE \"$TAB.DMP\"\nBADFILE \"$TAB.BAD\""
                            STR="$STR\nDISCARDFILE \"$TAB.DIS\"\nDISCARDMAX 99\nTRUNCATE"
                            STR="$STR\nCONTINUEIF LAST != \"$FIELD_ENCLOSURE2\"\nINTO TABLE $TAB"
                            #STR="$STR INTO TABLE $TAB"
                            STR="$STR\nFIELDS TERMINATED BY \"$FIELD_DELIMITER\""
                            STR="$STR ENCLOSED BY \"$FIELD_ENCLOSURE\" AND \"$FIELD_ENCLOSURE2\""
                            STR="$STR\n TRAILING NULLCOLS"
                            STR="$STR\n($COLUM"
                    else
                            STR="$STR,\n$COLUM"
                    fi
            done
            STR=" $STR)'\nFROM DUAL;\nspool off\n"
            echo "$STR" >> control_file.sql
    done

  • 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?

  • External swf loader

    Hey all,
    In the site that I am designing. I am using a Loader to load
    extenal swf's onto the background of my site.... I created the
    loader, gave it an instance name, and then gave it a content path
    to the swf file that I want to load. I previewed the page, and it
    all loads fine in the "mother" file, but when the content is
    supposed to load into the Loader, the loader simply turns opaque
    white and nothing happens... what am I missing here?
    Best,
    Ken

    Ok... I figured out how to get the swf to play correctly. I
    changed my publish settings to Flash 8 Player. This worked in
    getting the external swf to load... Now I ran into a new problem,
    hopefully someone can help me with this.... I need the swf to load
    in a VERY specific location, and at the EXACT scale as the original
    swf file. I have attempted to accomplish this by opening the
    original file that I am attempting to load. I selected all of the
    elements on the page, and looking at the X and Y coordinates, as
    well as the over all pixels measurement... then I placed these in
    numerals in the fields for the loader component in the "mother"
    file. I previewed it, and the placement and scale are wrong... how
    do I overcome this?? How can I control where the loader component
    loads and at what scale?
    Ken

  • Maybe you are looking for

    • Why do I get sent to the User Login screen to enter my password after sleep?

      Hi, On OSX Lion, 10.7.4. I recently had to reinstall the OS on a new hard drive in my iMac and now have an issue with it that I never had before. After prolonged periods of sleep (I haven't determined what the minimum length is before this will happe

    • How to specify a radio button as disabled in Net-UI

      How do i specify a radio button to be disabled using the net-ui ?? i know i can do it in HTML using <INPUT TYPE="RADIO" NAME="btn1" VALUE="today" DISABLED> So what is the Net-UI equivalent to the same ? I could not find much information in the worksh

    • Reg: CheckBox in ALV Grid Display

      Hi all, My requirement is to display checkbox field in ALV Grid which is editable. And i also need to get all the records that i have selected in ALV grid. How can i do it. Kindly Help me with sample codes. Its Urgent. <REMOVED BY MODERATOR> Regards

    • Macbook Pro not saving local time machine snapshots

      Hi, First time using the Apple forums here but I can't seem to find a definate answer for my question. I purchased a new Macbook Pro last week that came with Lion preinstalled. I noticed it was taking local time machine snapshots. In Time Machine it

    • Multiple Header Lines

      Hi Gurus When I enter a header condition in the sales order and activate it,system automatically inserts a line for the same condition type but with condition value displayed.. I don't want this to happen.Could you please tell me where I can change t