SWF in a Swf file marking the question

I created a flash (my project) file that is loaded into another swf (our player) file on our site. When I test the project file on my computer displays correct score at the end of the lab. When it is loaded in our flash player on the site does not display the score. I'm a loser for why this is happening. If someone could give me advice, I would be very grateful.

Declare the variable

var numOfCorrect:int = 0;

Whenever someone click on the correct selection it add the value 1 to the score

function correct(e:__MouseEvent_):void {}

numOfCorrect ++;

}

I have a text box with name yourScore

yourScore. text = numOfCorrect + ' out of 5 ";"

It is very basic code so I have no idea of what does not work. My only guess is there is some kind of conflict, once it is loaded in an external swf. What I would do in this case? Thank you.

Since you have problems with more than one file with this player, there is something about to place the file in another changing the environment that it is in operation.  Just as one example, if you happen to use references of the scene in your code, which could be a source of the proiblem when you load the file in another file, since there is only a single scene... one defined in the player file

Tags: Adobe Animate

Similar Questions

  • How to script instead of JPG files SWF files in the XML loader?

    I have a SWF (platform greensock.com) charger and a thumbnail image scroll under it made small image buttons. Each button image has a link that loads a SWF file into the SWF loader above. Here is the code for each button that loads the largest SWF in the charger above:

    Button3.addEventListener(MouseEvent.CLICK, Button3_PlayPopUp);
    
    function Button3_PlayPopUp(event:MouseEvent): void { 
        //setting the sourceVar
        sourceVar="3.swf";
        //making the SWFLoader load
        //as setting the soureVar after the SWFLoader is created won't do anything unlesss 
        //I also re-create the SWFLoader with the new sourceVar when the button is clicked
        loader_howToLoader2.url = sourceVar;
        loader_howToLoader2.load(true);
        
    }
    

    Then I decided to load all the button via the XML loader. I followed the tutorial on XML Chargers which deals with loading jpg images, and by assigning the URL links to them as follows in the XML file:

    <image src="appThmb_imgs/appThmb_imgs117x175/A-illuminatorUpLit_117x175.jpg" title="UpDownGlowingVase" url="http://www.888acolyte.com"/>
    
    

    and then in AS3 like this:

    var xmlLoader:URLLoader = new URLLoader();
    
    thisOne.link = imageList[item].attribute("url");
    
    
    
    function clickScrollerItem(e:MouseEvent):void {
     //trace("clicked item " + e.currentTarget.itemNum + " - visit url: " + e.currentTarget.link);
     var urlRequest:URLRequest = new URLRequest(e.currentTarget.link);
     try {
     navigateToURL(urlRequest);
     }
     catch (e:Error) {
     // handle error here
     trace(e);
     }
    }
    

    My question is: How can I ask for the code to every each small button thumbnail to load a larger image in the SWF loader above? I have to add something to the XML file or this way, it will never work with jpg images? URL in the adjustable XML source var (//setting the sourceVar), because they are all individual and somehow then apply taken SWL loader to load the game (//making load SWFLoader) as a standard somewhere in the AS3 code?

    Yes, you did.  I missed that.

    If you have used the link instead of urlString:

    function clickScrolleritem(e:MouseEvent):void {}

      loader_howToLoader2.url = MovieClip(e.currentTarget).link;
        loader_howToLoader2.load(true);

    }

  • Open another SWF file in the same window of the browser?

    I designed a website, the first HTML page. How to code a button to load another SWF file in the same web browser window?

    The example site uses Flash.  If you want it works exactly the same as you do not want to use the Flash.

    If you want similar functionality, then you can simply use the navigateToURL() function to open the new page with the swf site integrated into it.

    Explaining the AS3 button Code
    --------------------------

    Assume that you create a button symbol.  Since this is a button, it is already a car animation object that will react to mouse interactions, but only visually at this stage.  The first thing you need to do to make it useful down must assign a unique instance name.  If you drag a copy of it on the stage of the library, and while it is still selected, enter you this unique instance for her name in the Panel properties... say you name "btn1.

    In AS3, to make a button with the code, you must add a listener of events and event handler for it function.  You may need to add a little (for different events, like reversal, deployment, by clicking on it, but for now let's just say you want to be able to click them to get a web page.)  In the scenario that contains this button, a layer of separate actions that you create in a similar framework where this button exists, numbered, you must add the event listener:

    Btn1.addEventListener (MouseEvent.CLICK, btn1Click);

    The name of the unique function for the treatment, the click of this button is specified at the end of the assignment of event listener, so now you just have to write this function:

    function btn1Click(evt:MouseEvent):void {}

    var url: String = "http://www.awebsite.com/awebpage.html";

    var req:URLRequest = new URLRequest (url, "_self");   "_self" indicates that it takes to open in the same window

    navigateToURL (req);

    }

  • How do I know if a loaded SWF file have the source code?

    Hi!, I need to know if a loaded SWF file have the source code. I develop an application running on iOS and admin can upload SWF files that show in the APP, but I must know before show (mobile Adobe AIR APP) or activate (PHP script server), if this SWF file have the source code for no show or enable him not it.,.

    Thank you!

    I have it!

    Only that we need to do is:

    1. If the first tank is:

    F-the swf is uncompressed

    C - compressed with Deflate

    Z - compressed with LZMA

    2. If it is compressed, uncompress it with the right method

    3. search MainTimeline string, if concluded the SWF actionscript so it is not found, the code is not actionscript.

  • Help with insert or import swf file in the model of the open fla file

    Can someone show me how insert or import a swf file in the template fla file.

    I have a FLA open temple and after importing a SWF file, run the test and the swf file does not work.

    Did I miss something?

    Thank you

    Import a swf in a fla is not the way to get to each other.  Any actionscript in a swf file is lost.  You need to load the file swf dynamically either or you must copy the timeline of the FLA that the swf is made from to the other fla.

  • SWF file overlaps the Fireworks navigation bar in DW 8

    Visit my Web site at http://kanreikai.com/ after that that it has loaded using the menu 'Photos' drop-down and see how the navigation bar is in fact behind the Flash swf file.
    The navigation bar is at the front most layer in dreamweaver 8, and this problem occurred when I added the .swf instead of a picture file. (there is no problem if I simply a .jpg file there instead of the SWF file, in which case the Fireworks navigation bar works very well.)

    Is there a problem of layer or does Flash file that overwrites the file Fireworks in DW 8?
    Need your help.
    Thank you

    Not sure that the popup is blocked, but you can now (see wmode
    parameter):

    http://KB.Adobe.com/selfservice/viewContent.do?externalId=tn_14201&sliceId=2

    --
    JO

    "IdioC" wrote in message
    News:frgv4k$8UB$1@forums. Macromedia.com...
    > Please go to my website at http://kanreikai.com/ after it has
    > load
    > Use the drop 'Photos' and see how the navigation bar is actually behind
    > the
    > Swf flash file.
    > Navigation bar is in the further layer in dreamweaver 8 and this problem
    > only
    > occurred when I added the .swf instead of a picture file. (there is no
    > problem if
    > I just a .jpg file it instead the SWF file, in which case the
    > Fireworks navigation bar works very well.
    >
    > Is there a layer problem or is it a Flash file that overwrites the Fireworks
    > file in DW 8?
    > Need your help.
    > Thank you
    >
    >
    >

  • loading the swf file in the flash file - script to expect to play until it is fully charged

    I have a flash file which is 1.5 mb in size. Because it takes about 6 minutes to someone on DIALUP to load this file, I created a small swf file and loaded more large one of him but I want like that to start playing until she is fully downloaded. How do I configure this? I implemented the action script 2 as follows: loadMovieNum ("top2.swf", 0);

    Yes, this should be addListener instead of the addEventListener method.

    and, if you use this code, please mark this thread as answered.  If you used a different encoding, please your postcode for others and mark this thread as a response.

  • How to load external swf files into the AIR

    I try this code its working at the computer, but when I publish this .apk or .ipa file, my external swf file does not open

    (I included my external file as well)

    places_btn.addEventListener (MouseEvent.MOUSE_DOWN, newvid);

    function newvid(event:MouseEvent) {}

    trace ("you clicked me");

    var loadit = new Loader();

    addChild (loadit);

    loadit. Load (new URLRequest ("scene02.swf"));

    }

    01.jpg

    Add this in your newid function:

    You forgot to put the beginning of your original function:

    var loadit = new Loader();

    addChild (loadit);

    var _lc:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    loadit. Load (new URLRequest ("scene02.swf"), _lc);

  • I only have the SWF file and the output of HTML5, how can I control it?

    Imagine this: a customer gives me two archives zipped; an archive is a SWF file and another a HTML5, JS and CSS. Both have been published after checking "Scorm 1.2" in the tab reports in Captivate. I'm a developer, and all I have at my disposal is html, javascript and css.

    Is it possible for me to progress of CV? Send the quiz scores to my web service? Control playback?

    If you are already a programmer, I suggest that you talk to these guys here: https://groups.google.com/forum/?fromgroups#! forum and e-Learning-technology-development and

  • How can you embeded SWF file in the Web site?

    Hello

    I have a swf file, how I embeded Web site whose code is used.

    Thank you

    Maury

    If you have Flash, then having Flash publish an html page to your file and then copy / paste the code for this file in your html page.  If you do not have Flash, try to use swfobject to embed the swf file in your html page.  Here is a link to get and to explain...

    http://code.Google.com/p/SWFObject/

  • import another swf file into the homepage flash (swf is a gallery)

    Hello!

    have a problem that I can't bring myself...

    I downloaded a free to use juliuswebdesign.com Gallery (the Gallery) and I am trying to load it in my flash site...

    the gallery now works, if I open it directly (I open the swf file)

    BUT

    When I try to load the external swf file into my website

    loadMovie("image_gallery.swf", box);
    

    then the movie loads... the Gallery poster the poster "loading the xml file" message, then when the XML is loading the message "load image 1/7" screens and only the first image of the charges. "

    Once the first image is loaded it does not appear (he stay out of my swf file... I can see it when I resize the window) and no other images will be loaded.

    If I open the file gallery.sfw again everything works fine... the problem is that if I try to load the gallery.swf into another swf file...

    something must be wrong...

    I tried to opern the file gallery.fla and Coptic all directly in my site and the problem remains the same... 1 single image loaded and not exposed in the gallery...

    i ' ts as something in my site 'blocks' the Gallery beeing loaded...

    any suggestions?

    fla gallery add the following and test again:

    This ._lockroot = true;

  • Insert a swf file in the Middle a TLF?

    I am building a flex application that will allow users to add content (text, images, swf, mp3, etc...) The same idea as the way in which we work with Flex Builder, in other words, we can add many components in the menu.

    I then created the framework for the application and I use of TLF. However, TLF I cannot add a swf file or even a button in the middle of the text box. Is there a way out?

    What is the best way to accomplish an aplication like this?

    Hello

    If you want the .swf appear in line with the text, you can use an InlineGraphicElement. Set the path to the .swf as the source of the InlineGraphicElement.

    Abhishek

    (Adobe Systems Inc.)

  • Published .htm does not open the SWF file with the exception of the published folder

    Using Captivate 2: my stand-alone files work fine for all users, no matter where I place them on the network, but I just published as SWF with export HTM and the HTM opens only the skin and SWF files if I open it in the folder where it was published. If I copy the files (all three) to another location, the HTM opens empty. I do not see a path when I discover the HTM in Notepad, so I can't understand why the browser window is empty. Anyone have any ideas? I have attached the .htm code (I think).

    I should have waited a little more forward: the standard.js file must move with the other files, as it is called in the .htm. If I had published in a clean folder I would have saw that immediately. Sorry...

  • Problem with playing a loaded "SWF" file in the chronology of the pain

    Hey there. I created a presentation that loads the SWF interactive movies in a clip of 'target' on the main timeline.
    As you progress through the different presentation SWF movies are loaded into the presentation. And this in turn allows me to change the content of the presentations quickly and easily for different customers.
    These sovereign funds use part of the preloaded flash content like the other and drop-down list box objects.
    However, when these sovereign funds are called in the main charge they stop working properly.
    They work fine when tested independently of the main charge.

    Does anyone know how I can be able to get these sovereign funds work properly?

    At soon fofana

    The first thing to do is to check the range of your loaded SWF file. All references to _root, for example, means something different when the SWF is loaded in your film of wrapper.

    In addition, some of the V2 components do not work correctly when the SWF is loaded into another SWF. There is a technical Note and simple workaround here:

    http://www.Adobe.com/go/tn_19278

    Good luck!

  • Published SWF file shows no questions about their Captivate 8 slides

    I created a questionnaire in 8 Captivate (using Windows 7 so this is important). If I publish this quiz to HTML5, it works fine. However, if I publish to SWF format (in order to use the widgets) the first slide works, but as the whole issue of the slides are empty!

    I have republished this Quiz 20 times tweaking the settings back and forth but cannot get this to work, any ideas what could be the problem?

    First slide:

    swf_begin.png

    First Question slide:

    swf_fail.png

    Check if you have Slide Master set objects to be above empty slides.

Maybe you are looking for