Problem loading and displaying a swf

Hello

I have six buttons, and I want each one to display a corresponding external loaded swf, 01.swf, 02.swf.

It works fine, except that sometimes the sovereign wealth funds charge upward, and sometimes they are not.  For example, if I hit the 6 button, the 06.the swf loads.  But if I hit the button 6 after reaching the other 3 buttons, SOMETIMES 06.the swf loads, sometimes it doesn't work and I get an error that relates to the removeChild

var loader2:Loader = new Loader();


function showVid (evt): void {}

If (e1.data.childAdded2 == true) {this.removeChild (loader2) ;};

loader2. Load (new URLRequest("videos/"+e1.data.question_num+".swf"));
loader2.x =-270;
loader2.y = 155;
loader2.contentLoaderInfo.addEventListener (Event.COMPLETE, displayVideo);

function displayVideo (event: Event): void {}
addChild (loader2);
E1. Data.childAdded2 = true;
}

}

1. your add/remove does nothing useful

2. never nest named functions

3 use:

var loader2:Loader = new Loader();

addChild (loader2);

function showVid (evt): void {}

loader2. Load (new URLRequest("videos/"+e1.data.question_num+".swf"));
loader2.x =-270;
loader2.y = 155;
loader2.contentLoaderInfo.addEventListener (Event.COMPLETE, displayVideo);

}

function displayVideo (event: Event): void {}

Tags: Adobe Animate

Similar Questions

  • T510 HP - do not click on Flash videos, they do load and display if

    Hello

    The device in question is a version of the device T6X43202 t510 HP

    When it is connected to Citrix video flash will load and display correctly, but you can not click on them.  It seems that the mouse downwards is not detected by the flash video.  You can TAB through it and use the keyboard to navigate through the video.

    For the specific Web site, that I need to run I went on the server instead of forwarding to the client.  All other TC models work very well but not the t510.

    It is not a problem with a specific site either, it happens on all flash videos.

    Any ideas?

    I ended up doing back to HP ThinPro 41019 that isn't the question.

  • Hello. I'm having a problem loading and using my Adobe Photoshop CS3. This is the third time that I use this forum. I us a PC. The operating system is "Microsoft Windows 7 Home prem". I recently had to remove my hard drive and reload the operating

    Hello.

    I'm having a problem loading and using my Adobe Photoshop CS3. This is the third time that I use this forum. I us a PC. The operating system is "Microsoft Windows 7 Home prem". I recently had to remove from my hard drive and reload the operating system with all the updates and load to the top of my existing software. All my software works except my Photoshop CS3, which I use most. I loaded the software disc and download online. The system of charge very well and activation is complete.  Here are the main things that don't work properly, I have noticed so far. First of all, I can't open my camera RAW (I can with my Lightroom software, but not with my Photoshop software?). So I can't open any of my files of digital camera? Second, I can open a .jpeg file and use the Photoshop software and I can save the changes, but when I turn off my calculated the software doesn't seem to be on my computer. When I go to Windows ' search program and files "software is not located here. When I go to "Uninstall" the software of the foldername is there it is. "Photoshop CS3" but there isn't any size file to it IE 400 MB, while my software "Lightroom" on the 'uninstall' section will have a file for example size 400 MB tied to it. Thirdly, I also have a photosoftware of B + W, which operated in Photoshop; It's "NIK software - Silver Efex Pro" and it is located in the subtitle of 'filter' of Photoshop CS3. I use Silver Efex and all functions are working properly, but I can't save the file, it does not save the changes to save.

    Please can you help me.

    Thank you.

    KEith

    Try the forum for Photoshop.

  • How to load and display Image

    Hello everyone.

    I type with very green fingers, so please excuse the question. Lessons learned from the examples, I tried to load and display an image in ActionScript. This is the original example that I work on:

    ...

    ...

    var bmd2:BitmapData = bmd.clone ();

    var infoBM:Bitmap = new Bitmap (bmd2);

    var back: MovieClip = new MovieClip();

    Back.Name = 'back ';

    back.rotationX = - 90;

    var bSurface:MovieClip = new MovieClip();

    bSurface.y = int (...

    bSurface.z = int (...

    bSurface.addChild (infoBM);

    var overlay: Sprite = new Sprite();

    overlay.graphics.beginFill (...);

    overlay.graphics.drawRect (0, 0, bSurface.width, bSurface.height);

    overlay.graphics.endFill ();

    bSurface.addChild (overlay);

    back.addChild (bSurface);

    var tf:TextField = new TextField();

    TF...

    TF...

    TF...

    bSurface.addChild (tf);

    ...

    ...

    I'm trying to place an image on the bSurface instead of the block of text, as described above. So far, I came with:

    var iSprite:Sprite = new Sprite();

    var iMatrix:Matrix new matrix());

    var bmData:BitmapData;

    bmData = new BitmapData (surface.width, surface.height, true, 123);

    var loader: Loader = new Loader();

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, onComplete);

    Loader.Load (new URLRequest("c:\pixlr.png"));)

    function onComplete (event: Event): void

    {

    bmData = Bitmap (content LoaderInfo (event.target)) .bitmapData;

    }

    iMatrix.tx = 0;

    iMatrix.ty = 0;

    iSprite.graphics.beginBitmapFill (bmData, iMatrix, false, true);

    iSprite.graphics.drawRect (0, 0, surface.width, surface.height);

    iSprite.graphics.endFill ();

    surface.addChild (iSprite);

    ... and:

    var bmData:BitmapData;

    bmData = new BitmapData (surface.width, surface.height, true, 123);

    var loader: Loader = new Loader();

    var location: URLRequest = new URLRequest ("c:\pixlr.png");

    Loader.Load (rental);

    bmData = Bitmap (loader.content) .bitmapData;

    surface.addChild (bmData);

    but without success. I've been fails miserably for days now and would appreciate help.

    Thanking you in advance,

    Sofia.

    what you trying to do?

    If you just try to load an image (pixlr.png), use a relative path and something like:

    var loader: Loader = new Loader();

    Loader.Load (new URLRequest ("pixlr.png"));  put the png in the same directory with your fla and published files.  You can move after getting this work simpler example

    addChild (loader);

  • problem loading and installation

    I have a problem in low load and install is code 80072F78

    Please run the Windows Update Troubleshooter:
    http://go.Microsoft.com/?linkid=9830262

    Please provide the exact details of any problem it reports as not fixed.

  • How to incorporate and display a SWF in a Flex application.

    Hi all

    I'm trying to embed a swf animation in a flex 4.5 application and display it, but it does not work!

    I get error after error.  When I try to use addElement(), I get the following error:

    1067: coercion of a value of type mx.core:MovieClipLoaderAsset to an unrelated type mx.core:IVisualElement.

    If I use addChild(), then he throws another error when running.

    Here is my code:

    [Embed(source="assets/con_mov.swf")]
    private var connectMov:Class;
    private var conMov:MovieClipLoaderAsset = new connectMov();
    

    Here's the code I'm trying to use it to displey:

    borderContainer.addElement(conMov);
    

    I tried just to add to the application using this.addChild (connectMov), but I get an error during execution.  It's ridiculous!  Bringing a swf created in Flash into Flex and displaying should not require so much effort - IMHO.  There is a lot of documentation on how to embed a swf in Flex, but almost nothing about how to post!

    It's just a simple animation placeholder so I need access to all the functions on the inside, I want to integrate rather than using swfLoader.

    Thanks for any help or advice you can give!

    Matt

    Hello Matt,

    Yes you are right, it is not necessary to set the source of the image that we add a movieclip with swf. It was a mistake in my

    code, because I have tried it with too many crazy ways.

    Now the SWFLoader, ABT

    This technique works well with the SWFs that adds a graphical application or animations, but are not intended to have a large amount of interaction with the user. If you import SWF files that require a large amount of user interaction, you must build them as custom components. (Adobe Docs)

    Thank you and best regards,

    ---------------------------------------------------------------------- ----------------------------

    Kanchan Ladwani | [email protected] | www.infocepts.com

    ---------------------------------------------------------------------- ----------------------------

  • How to load and replace random swf in the same charger on stage?

    Hi... it's very simple, but for some reason any escapes me: using AS3 how a swf file can load another swf to replace itself in the charger still on the stage, while at the same time calling a function of randomization in the first frame of the main timeline, to randomize the next swf?

    At the end of each swf (called "koan_ # .swf"), it is the following old AS2 code... it has been used to choose randomly, and then play a SWF of koan table:

    _root.index ++

    If (_root.index > _root.koan.length - 1) {}

    _root.index = 0;

    _root. KOAN.shuffle ();

    }

    _root.koan_loader_mc.loadMovie (_root. KOAN [_root.index]);

    This code on the first frame of the main timeline loads a koan random swf file correctly, but after that the koan plays I'd like to load a new swf random koan.

    function shuffle(a:Array):Array {}

    var len:Number is. Length-1;

    for (var ivar:Number = len; ivar > = 0; ivar-) {}

    var p:Number = Math.floor (Math.random () *(ivar+1));

    var t = a [ivar];

    a [ivar] = a [p];

    a [p] = t;

    }

    return a;

    };

    var: index: uint = 0;

    var koan_loader:Loader = new Loader();

    koan var: Array = ['swfs/koans/koan_1.swf","swfs/koans/koan_2.swf', 'swfs/koans/koan_3.swf', 'swfs/koans/koan_4.swf', 'swfs/koans/koan_5.swf', 'swfs/koans/koan_6.swf', 'swfs/koans/koan_7.swf', 'swfs/koans/koan_8.swf', 'swfs/koans/koan_9.swf', 'swfs/koans/koan_10.swf', 'swfs/koans/koan_11.swf', 'swfs/koans/koan_12.swf'];

    KOAN = shuffle (koan);

    koan_loader. Load (new URLRequest (koan [index]));

    MovieClip (this).koan_loader_mc.addChild (koan_loader);

    Thank you very much.  I tried several variations of updated AS2 code but am at my wits end.

    -Very well, bloody forums join the file for some reason, so here is the code:

    Copy and paste this code into a text file and save it as InterfaceEvent.as

    package {}

    import flash.events.Event;

    SerializableAttribute public class InterfaceEvent extends Event {}

    public static const = "koanFinished" KOAN_FINISHED:String

    public void InterfaceEvent (type: String, bubbles: Boolean = false, cancelable: Boolean = false, int index = - 1, item: Object = null) {}

    Super (type, bubbles, cancelable);

    This.index = index;

    This.Item = item;

    }

    public var int index = - 1;

    public var point: Object = null;

    override public function clone (): Event {}

    return new InterfaceEvent (this.type, this.bubbles, this.cancelable, this.index, this.item);

    }

    }

    }

  • Problem loading and preloader!

    Hey!

    I have a problem of preloader!

    I have three slide shows on three different pages in my web page and on the three sides, I also jQuery widgets. The problem is that the slide show begins before the preloader is finished. As a visitor gets a first rough experience. I should add that the first slideshow will show is an animation animate Edge and I don't want to change the order.

    The page is my first and I can't code... Help, please

    Page: www.henrikpeltonen.com

    Henrik Peltonen

    Please try to change the order and check if its behavior even. Preloader must be displayed only when no content is fully charged.

    With images so its behavior, then you should check the pre-loader himself.

    Thank you

    Sanjit

  • Load and unload the swf file

    I am currently using AS2.

    I create a button instance named 'myBtn' and I want it to load the external swf "test2.swf" call all to unload the current swf file named "test1.swf" when you press on / release.

    that fact is I put the following code under mybtn:

    We (Press)

    {

    unloadMovie ("test1.swf");

    loadMovie ("test2.swf", 1);

    }

    the result was that the "test2.swf" was loaded successfully, but the "test1.swf" fail to unload.

    Any help is welcome

    AS2... Scope is your problem. When you are inside the function for delivery you tell the button you used to unload test1.swf of inside of this button (which it is not located in).

    You are probably using the root timeline, so I'll take a bet that it works:

    (press)

    {

    _root.loadMovie ("test2.swf");

    }

    If you want to follow the progress of loading between them, it is a bit more complex.

  • The new Adobe Flashplayer 12.0.0.44 has all kinds of bugs: late development, problems loading and this message: chrome://foxtab/content/AC_Flash.js:94

    After the 12.0.0.44 update, Foxtab will not work. Only a few of the Top Sites appear and I can't edit or use them. There is a lag of typing, sometimes with letters simply not recognized, problems with loading Web sites (script has stopped working), it slowed my computer down to dinosaur before analysis, and at random times the "loading" icon lights up for no reason and my computer will freezes until it's finished doing what he had decided it does. Help!

    Hello Misslink8, please upgrade to the latest version which is available at https://addons.mozilla.org/firefox/addon/foxtab/versions/ & contain a fix for the flash update the addon.

  • When you use media center tv, registered and menus do not load and display regular

    When I select tv... then recorded... the screen displays (loading). The load never completes and hangs the system. I have to use (esc) to exit the application

    Hello

    (1) have you installed Windows XP Media Center Edition on your computer?
    (2) what is the brand and model of the computer?

    You can try the following method and check if it helps.

    Method 1:
    (a) computer and do not open any other software before you watch TV. Close software may not be sufficient in some cases.
    (b) after the opening of Media Center, wait about 10 seconds before trying to watch TV.
    (c) If you have recently installed new TV tuner hardware, make sure it is properly connected/sitting, make sure that it is compatible with the version of Media Center you are using.
    (d) reinstall the TV tuner drivers. If you have installed a tuner separately, reinstall the drivers disc that came with the tuner.
    (e) use Windows system restore to restore the system at a time where the error will not occur.

    Method 2:
    (a) turn on the Media Center computer and connect to the Internet.
    (b) click Start, all programs, and then click Windows Update.
    (c) I agree to download plug-ins from Microsoft if you are prompted.
    (d) to read and respond to information on the Web page. Carefully read the page that the information may change from time to time.

    Method 3:
    (a) the television signal must come into the computer through the coax or s-video input. Make sure that you do not connect the standard video cable (RCA style) on the audio or the video output on the graphics card. Use the standard video adapter S-video if we use a standard video cable.
    (b) connect the end of the s-video cable or coaxial cable into a TV set to see if the cable is working properly.
    (c) ensure that the TV signal settings are correct for the Media Center software.

  • I have a Dell Studio 1737 problems load and eject CD CD player loading side

    I have a Dell Studio 1737 with a CD to load by side of the eject button is on the top. He stopped to load or eject the CD he did make a sound now things just stuck. Does anyone have an idea of what went wrong past and how to fix it? Thank you

    There should be a small pin hole in the front of the cd player. You can insert a paperclip unfolded in the hole and press. The Board should then opens. If it does not open and close automatically after that, then you have a mechanical problem with the drive and should be replaced.

  • Windows does not load and displays a black screen when it is connected to the power supply

    Original title - Windows Vista running on my laptop Sony VAIO

    Trying to turn on my laptop using the built in battery nothing happens.  When the laptop is connected to the power supply and turned on Windows does not.  It shows something in the sense that it does not properly off.  It tries to load back to a system restore point before the last stop, but seems to fail again during this process.  All that is displayed is a black screen. Currently the power on light is on, the battery light is on, but the drive activity light is off.

    Yet once again, I switched on the laptop and finally the Startup Repair process is automatically called.  After the display of the bar to attempt repairs, the system has been repaired successfully.  As a result, the I ran my Norton anti-virus, followed by Windows Updatesoftware.

  • Need to hide the form on Page load and display it on a particular condition only

    I am new to Oracle Apex.

    I need to create a basic application when the user is looking for a particular table (only one field of research) and if the documents exist they would be displayed in a grid format. (This section I managed to do)

    If the search returns no results, I need to display a form to add new records to the table.

    Now, I have created a form (create a new record) on the same page as the search, but I am unable to hide the shape on the loading of the page and only show it in the case where the results of research show "NO data found".

    I made changes to the page. Please check and let me know.

    Thank you

    Zourk

  • Loading and handling external SWF files

    I'm new to the Flex development environment.  In the past, when we put a large application in Flash, load us SWFs and pass relevant data.  I've created a flex application and want to load the swf compiled from another flex project.  I can do this and swf games, but how can I have access to the properties and methods of the loaded swf file?

    I was loading active flash converting them for bending of components customized by using the Flex components, but I don't want to put all my flash content in the components and add them to a large project because it would make a huge swf if all these swcs are included in the compilation.  Is it possible to load a swf file and access its attributes?  Or what I need to rework the way I build a large application consisting of many SWFs in the past?

    Sovereign wealth funds are loaded asynchronously, so that they are not guaranteed to be there by creationComplete.  The Protocol is to use the Event.COMPLETE to listen the FlexEvent.APPLICATION_COMPLETE of the loadedSM, then loadedSM.application must be valid.

    Note that if you type-casting of the application, you end by linking the application in the main SWF file classes, defeating the point of having a sub-application.  Use an interface or just loadedSM.application ["receiveObjects"])

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

Maybe you are looking for

  • NB205-N325BL games

    Greetings,A few weeks ago, I bought a toshiba NB205-N325BL. I have to say that it is very good for its price and performance. So I tried on his game.Rise of Nations, I played, but the problem is that the game needs more big resolution for monitor. He

  • Lack of SMS

    I had to get a replacement phone, and when I put in place I seem to have lost my SMS on my iPad. I'm sure it's a frame with the connections, but do not know how to rely. Any ideas are greatly appreciated!

  • Win2000pro computer restarted after an error checking, event ID 1001

    After ten years to keep my Compaq Deskpro EN with WIN2000pro wkstation online, I get it now ' the computer was restarted after a bugcheck. The bugcheck was: 0x0000007f [0x00000008 0 x 0000000 0000000 x 0, 0 x 0000000]. Microsoft Windows 2000 [v.15.21

  • KB980333 - same problem, but on a XP machine...

    Hello! The 'right of truncation of the page' that the above fixed in Vista and Server 2008 occurs on my XP machine. There is no hotfix listed for the system and the Outlook Express 8 I run, only for the newer operating system types. Is there a fix or

  • security software reloading

    the latest info error I got was the software was defective and to reload the security software... because my office is now all black, I can't to the control panel to install the safety program. I have another user I can login, but my page has disappe