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);

}

Tags: Adobe Animate

Similar Questions

  • How can I register several OCX files at the same time

    How can I register several OCX files at the same time. OCX depending on the application files are stored in a network location, IE. R:\HR\whatever\whatever\*. OCX instead of manually record each ocx file, I would be with a simple batch file or an automated script. Anyone have any good ideas?

    Hi James,

    The Microsoft Answers community focuses on the context of use. Please join the professional community of COMPUTING in following the link MSDN forum

    http://social.msdn.Microsoft.com/forums/en-us/categories

  • Help! Need a script to automatically open files with the same name but in another location.

    Good morning friends,

    So for my work, I need a script to open files with the same name but located in a different folder. But since I'm a total noob when it comes to programming, I can't understand how do. That's what I have in mind:

    -J' I manually open an image.

    -The script will look for a file with the same name in another folder that I've specified.

    -The script will then select the channel CMYK of the second file and copy and paste it into the first file.

    -The second file is then closed without saving the changes.

    I have problems with the part where the script searches for a file with the same name as the opened file. I would really appreciate help. Thanks in advance.

    If (app.documents.length > 0) {}

    myDocument var = app.activeDocument;

    var Nomdoc = myDocument.name;

    try {var basename = docName.match (/(.*)-.)} [ ^\.] +$/)[1]}

    catch (e) {var basename = thedoc.name};

    var path = / * path of folder to insert as a string here * / + ' / ' + base name + / * insert file extension, including the period as a string here * /;

    If (queue (path) .exists == true) {var otherDocument = app.open (File (path))};

    };

  • How to add records to a file via the file adapter.

    Hi all
    How to add records to a file via the file adapter.

    I must read data from the database and need to add all the records in a file.

    Thanks in advance.

    Hello

    I think you have a while loop to hit the DB in your process (as you said you need to extract data from DB 10 times if 1000 rec is here)
    First sopy your DB O/P to a var
    and second time add to previous data. (Otherwise you can directly use Add to start instead of copy and add)
    When the loop ends, you can turn to the file adapter Var.

    Otherwise, you can configure yourFileadapter as it will be aapend current recordings for previous records.

    You can use 'Append = true' in your adapter wsdl file.
    It will add the previous records to existing records in the same file.

    Concerning
    PavanKumar.M

  • How can I copy an .exe file of the winow downloads on my hard drive?

    the header is the question

    "How can I copy an .exe file of the winow downloads on my hard drive?

    If the file is always displayed in the Download Manager window, then you can use open folder on the shortcut menu. If this entry is grayed out then the file is no longer at this location to download. Possible causes are cleaning software or anti-virus that deleted the file.

  • I need to learn how to remove trojan my computer files and the registry.

    Original title: cleaning your pc

    I need to learn how to remove trojan my computer files and the registry. There is a financial has now attached ittibu or something. and how to remove the event source errors and all that is connected to this.

    If you make financial transactions online and feel your system has been compromised, the more experienced people will recommend wipe you your HARD drive and reinstall your XP from scratch, but that is not always possible and of course is up to you depending on how you feel about this (you need to feel good about it).

    If you still think your system may be achieved a malware, I would do these things before you start any troubleshooting effort:

    Download, install, update and do a full scan with these free malware detection programs at:

    Malwarebytes (MMFA): http://malwarebytes.org/
    SUPERAntiSpyware: (SAS): http://www.superantispyware.com/

    They can be uninstalled later if you wish.

    Download and run Hitman Pro here and during installation to be 100% sure to refuse the installation of toolbars, decline any e-mail options, nothing to do with Bing or MSN, perform a scan time, accept no e-mail and activate the free license:

    http://www.SurfRight.nl/en/downloads/ (make sure you get the free version)

    Download and run TDSSKiller from Kaspersky:
    http://support.Kaspersky.com/viruses/solutions?QID=208280684

    The scans by operating clean, then to solve any problems.

    If you still think that you have any questions, then proceed as follows:

    Since the Microsoft Answers forum does not have any kind of information system request when a new question is asked, we know absolutely nothing about your system.  Not knowing the basic information a problem prolongs the frustration and the agony of these issues.

    Thank you MS Answers, allowing the resolution of simple problems as frustrating and a lot of time as possible.

    Provide information on your system, the better you can:

    What is your system brand and model?

    What is your Version of XP and the Service Pack?

    What is your Internet browser and version?

    Your system's disks IDE or SATA drives?

    Describe your current antivirus and software anti malware situation: McAfee, Symantec, Norton, Spybot, AVG, Avira!, MSE, Panda, Trend Micro, CA, Defender, ZoneAlarm, PC Tools, Comodo, etc..

    The question was preceded by a loss of power, aborted reboot or abnormal termination?  (this includes the plug pulling, buttons power, remove the battery, etc.)

    The afflicted system has a working CD/DVD (internal or external) drive?

    You have a genuine XP installation CD bootable, which is the same Service as your installed Service Pack (this is not the same as any recovery CD provided with your system)?

    Do you see that you think not you should see and when you see it?

    What do not you think that you should see?

    If the system works, what do you think might have changed since the last time it did not work properly?

    If you need help interpreting your logs in Event Viewer, follow these steps:

    Here is a method to display specific information about individual events.

    To view the logs in Event Viewer, click Start, settings, Control Panel, administrative tools, event viewer.

    A shortcut to the event viewer is to click on start, run and enter in the box:

    %SystemRoot%\system32\eventvwr.msc

    Click OK to launch the event viewer.

    The most interesting newspapers are usually the system and Application logs.

    Some newspapers such as security and Internet Explorer may be completely empty or have just a few items.  The default settings for XP wants do not connect all this activity, unless you need to solve a problem in these areas.  If you enable logging for them the papers fill up quickly and could adversely affect the performance of your system with all the extras (often unnecessary) activity.

    If you have Microsoft Office installed, it has its own newspapers, and they can be empty or occasional boring activity very little or, if there is no problem with your desktop applications.  It's normal.

    Not every event is a problem, some are informational messages that things work very well, and some are warnings.

    However, no event should defy reasonable explanation.

    Each event is sorted by Date and time.  Errors will be red Xs, warnings will have yellow! s.
    Informational messages have white is.  Not every error or warning event means that there is a serious question.

    Some are excusable at boot time when Windows starts.  Try to find only the events to the date and time around your problem.

    If you double-click on an event, it will open a window of properties with more information.  On the right are black up and down arrow keys to scroll through the open events. The third button that looks like two overlapping pages is used to copy the details of the event in your Windows Clipboard.

    When you find an interesting event that occurred at the time of your question, click on the third button at the top and arrows to copy the details and then you can paste the details (right click, paste or CTRL-V) the text in detail here for analysis.  Remove all personal information from your information after you paste If you are forced to do so.

    If you paste an event, it will look something like this annoying system startup event:

    Event type: Information
    Event source: Service Control Manager
    Event category: no
    Event ID: 7035
    Date: 14/07/2010
    Time: 17:54:18
    User: Jose
    Computer: computer

    Description:
    The Remote Access Connection Manager service was sent successfully a starting control.

    To get a fresh start on any log of the event viewer, you can choose to clear the log (the log backup is available), and then reproduce your problem, then just look at the events around your show and troubleshoot events that are happening when you have your question.

  • How can I move all my files from the user from one user to another on my pc?

    original title: moving files

    How can I move all my files from the user from one user to another on my pc?

    Log an administrator account. Open your folder 'user '. Select all the files, copy them, and paste them into the other folder 'user '.

  • I can't preview jpg files in the preview pane.

    I can't preview jpg files in the preview pane.  Does anyone have a solution for this?  I know there are some fixes in previous versions of registry changes causing Windows but I don't want to do them, unless they are specific to Windows 7.

    Thanks for any help.

    You can enable or disable the power preview pane using the rectangular icon at the top right of Windows Explorer (while listing the image files)? With the visible preview pane, you say that when you click on an image file, the image is not displayed? If this is the case, it is a bit strange and something is missing.

    If it helps, try to customize the folder containing image by right-clicking on the folder-> properties-> customize-> images tab [in the menu dropdown]. samc1

  • How to display two or more files on the screen at the same time in format "cascade" or "tile"?

    How to display two or more files on the screen at the same time in format "cascade" or "tile"?

    What types of files,

    He each file separately.

    Right-click your taskbar, and then click the option side by side...

    Breaking of Windows,

    http://Windows.Microsoft.com/en-us/Windows7/products/features/snap

    http://Windows.Microsoft.com/en-us/Windows7/arrange-Windows-side-by-side-on-the-desktop-using-snap

  • Having just upgraded Windows 8.1 for Windows 10, my (old) version of Photo 5 elements crashes with a message "not responding" have double click on the jpg file.  He always loaded the image at the point Windows 8.1.

    Having just upgraded Windows 8.1 for Windows 10, my (old) version of Photo 5 elements crashes with a message "not responding" have double click on the jpg file.  He always loaded the image at the point Windows 8.1.

    Any ideas?

    davids62398138 wrote:

    Having just upgraded Windows 8.1 for Windows 10, my (old) version of Photo 5 elements crashes with a message "not responding" have double click on the jpg file.  He always loaded the image at the point Windows 8.1.

    Any ideas?

    It was reported many problems with older versions of PSE and WIN10.

    Can you open PSE from office or from the list of programs on the start menu?

  • How can I add a PDF file to the page in the site Web of Muse?

    How can I add a PDF file to the page by Muse?

    Hello Gini1950,

    In case you want visitor to click a button and open the PDF file in the browser, you can try following:

    1. create a button (Rectangle or text box)

    2. click on the button and go to the hyperlink menu and click on "link to file".

    3. navigate to the PDF file and select it.

    This will create a hyperlink to the file and it will open in the browser if someone clicks on the button.

    Please let me know if you are trying to achieve something else.

    Kind regards

    Vivek

  • How can I combine two PDF files on the same page?

    How can I combine two PDF files on the same page? Please share any ideas you may have. Thank you.

    The term for what you want to do is called "page imposition.  There are third party tools that can do it for you like this: quite large: home page

  • Automatically replace the jpg files with the same file name TIFF.

    Is there a a way to automatically link the files by replacing the jpg files with the same exact file name TIFF?

    Thank you!

    Click on the link in the links Panel and open the Panel menu. Choose repeat the link extension.

  • How to delete history of recent files on the adobe reader software?

    How to clear history of recent files on the adobe reader software

    Howdy!

    It is a big topic and partially answered many of my own questions.

    I'll add a response which responds directly to the topic:

    There is a Clear recent files button in the new Adobe Acrobat Reader ms

    I guess that Adobe has listened to you!

  • Is it possible to create a new file using the XML via java Script?

    Hello everyone,

    Is it possible to create a new file using the XML via java Script

    • I have xml information that need to use for file name, size.
    • Based on xml file we can create a new file in InDesign with java script?
    • Kindly help me if anyone has an idea about this.

    I use InDesign CS4 on windows 7

    Sample file is attached below.

    Kind regards

    Siva

    <UpdateAd>
    <AdId>3403699</AdId>
    <Width type="mm">91,79</Width>
    <Height type="mm">80,00</Height>
    <ProductionCategory>4</ProductionCategory>
    <BookedCCIColors>sw</BookedCCIColors>
    <WorkFlowType>PDF</WorkFlowType>
    <CustomerNumber>652224</CustomerNumber>
    <CustName1>Erich Prang</CustName1>
    <Description/>
    <Description2>R</Description2>
    <UpdateIns>
    <Titel>RHZ</Titel>
    <Publication>B2</Publication>
    <RunDate>26-07-2011</RunDate>
    <Zone>H30</Zone>
    <KDDATEN>nein</KDDATEN>
    </UpdateIns>
    <WorkflowStep>IR</WorkflowStep>
    <Proof>No</Proof>
    </UpdateAd>
    
    

    xml.png

    Try this:

    var f =File.openDialog ();
    f.open('r');
    var xml = new XML(f.read());
    f.close();
    
    var myDocument = app.documents.add();
    myDocument.documentPreferences.pageHeight = xml..Height+"mm";
    myDocument.documentPreferences.pageWidth = xml..Width+"mm";
    var rect = myDocument.pages[0].rectangles,add();
    rect.geometricBounds = myDocument.pages[0].bounds;
    rect.strokeAlignment = StrokeAlignment.INSIDE_ALIGNMENT;
    rect.strokeColor = myDocument.swatches.item("Black");
    rect.strokeWeight = 1;
    myDocument.save(File(f.path + "/" + xml..AdId + ".indd"))
    

    Substances

Maybe you are looking for

  • Load the Mac Book Pro

    I am able to charge my Mac Book Pro, in countries outside the United States without having to buy a converter?

  • How can I reduce thermal excessive CPU in a dc5100sff with a 651 office 3.4 GHz Pentium 4?

    I have a desktop dc5100 Small Form Factor (sff) PC.  Processor: Pentium 4 651 TDP of 86 Watts, Windows XP Pro, 80 GB SATA II (3 Gb/s) hard drive and a heat sink CPU upgrade / fan with 3 copper heat pipes h/p p/n: Rev.D 36449-001.  He ran ~ 60 when I

  • Carrier IQ

    Have you guys been to see all the things summaries/scary this carrier IQ made? http://www.wired.com/threatlevel/2011/11/secret-software-logging-video Any ideas on how to see if it is also on the Bionic?

  • Windows Vista SP2 won't finish loading on Dell Inspiron 1525

    I have a Dell Inspiron 1525 with Vista Home edition.  I'm trying to load Vista Service pack 2 and crosses all the way to the end when he says "Update failed to return to the previous version".  Why is he not fill?  I completely uninstalled the antivi

  • Cannot sync blackBerry Smartphones. my replacement phone

    Here, I had to replace my phone (fried) I have and used the BB Desktop I am now trying to transfer my data to my new BB and I'm getting 'No applications configured for synchronization' Please help me I'm computer very ignorant.   Thanks in advance