External SWF in InDesign SWF

Hi!
I have been playing around with SWF files exported from InDesign CS5. You can´t write any code there, just use ready-to-use stuff. I just wonder would it be possible to create SWF file with some actionscript in Flash Professional, and place it to InDesign... and use the code there.
I tried to make a button that would take user to frame 3. I used following code in Flash Professional:
btn.addEventListener(MouseEvent.CLICK, pageturn);
function pageturn(e){
MovieClip(parent.parent).gotoAndStop(3);
Then I exported that file as button.swf and placed it to six page long InDesign document. I exported it as SWF. When it opens, FP recognizes my button but nothing happens when I click it. Any ideas?

Exactly, there cannot be any code in it. If it did just need a stop, you could stop the loaded swf when the loader is completed. If you need code to run when things are touched in the loaded swf, you could add a listener to the Loader object, and then check what the target name is, and do whatever action needs doing based on what was touched.
You're able to read frame labels and instance names from the loaded swf, so you'll have to find a way to do what you want with that limitation.

Similar Messages

  • I want .swf in InDesign to loop

    I created a slideshow in InDesign by placing each element on a different layer and then setting the timing and effects.
    There is no "Loop" setting when exporting a .swf from InDesign like there is in Illustrator.
    When the slideshow .swf was placed into Second InDesign document, there is no Loop command in the Media window.
    In the Animation Window to get the Loop box to be active I have to choose a Preset (ie.: Appear, Disappear, Move In, Move Out…) even if you don't want one. But when this Second InDesign document is exported as a .swf the slide show runs one and then the Preset keeps repeating and doesn't run the slideshow again.
    Also, is there a way to set how long each page is visible so when I export as a .swf I can have a running presentation, maybe even a looping one?
    _David
    [email protected]

    Go to the Program File Adobe> Abobe Illlustrator>Presets>en_GB>Brushes
    Create a folder called "Custom Strokes"
    Then create a new illustrator file called InDesign Strokes.
    Open the Brushes panel and delete them all except basic (that can't be deleted).
    Draw your custom Stroke based on the InDesign version you like (or your own Idea)
    Select the new line style. On the Brushes panel you can choose the fly out menu (top right) and this gives you the option to create a New Brush.
    Choose Art Brush.
    Save your file into the Custom Strokes folder (back it up just in case)
    In Illustrator you will see the option for Custom Stroke and your InDesign Strokes should be an option from the Brushes Panel.

  • How may load an external (html) file in swf? Anyone!!!!!

    hi all,
        How may load an external html file in swf? such as google.com in a movieclip.
    anyone may help me.........????????

    With Flash, you can't do this.
    Just with FlashBuilder and Air (something like HTMLLoader  , not sure now)
    I mean loading in a movieclip..
    Of course you can open a page to display in a browser.

  • Analytics in InDesign SWF or Interactive PDF

    I am starting to add video to a SWF newsletter that I make. Is there a way to track how many people view the embedded video?
    If there is does it work with the Interactive PDF option too?

    Don´t place your FLV directly to indesign. Place it to Flash Professional, add tracking code there with ActionScript and export whole thing as SWF. Then place that SWF to indesign.
    If you have audio track in your video, you probably face some issues with hanging sound. You can solve that problem by creating separate killAudio swf snippet in Flash and place it in next and previous spreads with video.... use soundMixer.stopAll(); code in it....
    Here´s a sample where customized video player made in Flash is in use, dummy magazine is exported from indesign:
    http://dl.dropbox.com/u/17227987/extVideoTest/index.html

  • Place a GIF in an InDesign SWF?

    I have a GIF image that I'm wanting to place in an InDesign SWF file. Is this possible? If not, what probably can accomplish this?
    Thanks!

    You can place a GIF into an InDesign file. Your InDesign file can be exported to SWF.

  • Indesign/swf interactive hyperlinks

    Hay, can you please help me with a problem that I have with hyperlinks... I created the interactive swf in indesign, and i need those links to take me to another page when presenting in swf, but the cursor is not selecting anything?

    I have tried that too and it didn´t work out. Attribute that controls where you open your hyperlink is called Target. And InDesign doesn´t let you define it. Let´s hope some improvement with this in future...
    [Advertisement removed by moderator]

  • Attaching preloader to InDesign swf

    I exported an interactive swf from InDesign (content.swf). It is 7MB. I would like to add a preloader. I found a site that offered a recipe but the swf plays through the frames without stoping on the first frame.
    Further research indicated I was using AS2 and that the InDesign swf needs to be address in AS3. I am unable to find how to do this using AS3.
    Any help/recipies would be appreciated.
    Tina
    Here is they structure of the file with the preloader.
    Scene 1
    Layer 1: frame 2: actionscript
    loadMovieNum("content.swf", 10);
    _level10.gotoAndStop(1);
    Layer 2: frame 1: placed movie clip named: preloader
    preloader structure:
    Layer 1 has three frames
    frame 1:
    parent.stop();
    frame 2:
    kBytesLoaded = _parent.getBytesLoaded()/7045928;   
    kBytesTotal = _parent.getBytesTotal()/7045928;   
    kBytesRemaining - kBytesTotal - kBytesLoaded;   
    percentLoaded = 100 * kBytesLoaded / kBytesTotal;   
    percentRemaining = 100 - percentLoaded;   
    progress = percentRemaining;
    loadBar._xScale = percentLoaded;
    frame 3:
    if (percentLoaded < 99){ 
    gotoAndPlay(2);
    } else {
    _parent.play(); 
    stop(); 
    layer 2 has the progress text (progress) and the progress bar (loadBar)

    Since you will be loading AS3 files, you will need an AS3 preloader, otherwise, an AS2 preloader such as what you showed will fail in trying to an AS3 file, which is probably what you encountered in trying it.
    Here's a link to an AS3 preloader tutorial which I believe does what you want... loads the file separately...
    AS3 Preloader
    http://www.gotoandlearn.com/play.php?id=85
    but just so you aren't fooled by it all... When someone is playing your game, they have already downloaded your game.  So your protection is really only protecting your files against those who are either too lazy or lack the knowledge of how to get the file from their cache.  But some protection is often better than none.

  • Doesn't start an importing swf into indesign

    HI to every one
    Sorry for my english, I hope to be claer
    I am using Indesign cs5 but i have a problem when I import a swf file into indesign.
    Practically I import a Swf file made by Flash cs 5 into Indesign, and I export this file in swf by Indesign.
    So when i open this file I see an icont but not the animation, to make starting the animation i have to click on this icon.....why???
    I ask you, can't animation start automatically at the open of document??
    Thank you to all
    bye

    After you have placed your SWF, select it with selection tool (black arrow), open Window>Interactive>Media panel and check Play on page load.

  • Loading External Swf with Other Swf Dependencies

    I'm trying to load an old project into a new project via swf. My old project had local external swf dependencies.In other words A.swf is the old project swf and it loads in B.swf and C.swf. I want to load A.swf into my new project. All the .swf file are local and will be loaded locally. Using the url and loader to load the old project's swf into the new project, I get an error that says that the stage must not be null. I have put A.swf, B.swf, and C.swf all within the same folder together in the new project. Is the correct approach? I'd like to know if this is even possible and if so how should I do it? Thanks in advance!

    Hmm I don't believe I have targeted the stage. Here's my code below.
    package ExergameShell.screens
      import flash.display.Loader;
      import flash.events.Event;
      import flash.net.URLRequest;
      import feathers.controls.Screen;
      import starling.core.Starling;
      import starling.events.Event;
      public class Leaderboard extends Screen
      private var url1:URLRequest;
      private var loader1:Loader;
      public function Leaderboard()
      addEventListener(starling.events.Event.ADDED_TO_STAGE, init); // necessary for all screens
      private function init():void
      url1 = new URLRequest("A.swf");
      trace(JSON.stringify(url1));
      loader1 = new Loader();
      loader1.load(url1);
      //Starling.current.nativeStage.addChild(loader1);
      //loader1.contentLoaderInfo.addEventListener(starling.events.Event.COMPLETE, resetFPS);
      private function resetFPS(event:flash.events.Event):void
      Starling.current.nativeStage.frameRate = 60;

  • Is it possible to store indesign swf and resources in different location than html

    I am using an email blast program to create a micro-site, but it doesn't let me store the html file with the swf and resources. When I upload the swf and resources to an external server and go directly to the swf address, the swf plays and the sound works. When I reference the swf in an html document on a different server  than the swf and it's resources, the swf plays but the resources don't (sound files). Is there a way to make this work?

    I am using an email blast program to create a micro-site, but it doesn't let me store the html file with the swf and resources. When I upload the swf and resources to an external server and go directly to the swf address, the swf plays and the sound works. When I reference the swf in an html document on a different server  than the swf and it's resources, the swf plays but the resources don't (sound files). Is there a way to make this work?

  • I cant seem to use external video in my swf!

    why wont my video work live but work locally?

    Hard to say for sure but first you need to make sure that you have uploaded all the related files... the player .swf, the skin.swf, the .flv video file, as well as any javascript Flash detection file used.
    If you've done all that and still no go, post a link.
    Best wishes,
    Adninjastrator

  • A .swf inside a .swf wrapped in a pdf

    Here's what I'm doing:
    I've created interactive swfs of some print brochures using InDesign CS5. Before export I've tried to install some small .swf animated charts created either out of InDesign or out of Flash Catylyst as well as some f4v and flv movies. I've tried making them button activated or page turn activated and here are the results:
    Except for the Catalyst file, everything ran just fine and as expected. The problem with the catalyst file is that I set up a button in InDesign to activate it - which it did - but can only get it to run one time before turning the page to reset it. Actually, this may be the case with the Indesign swf chart as well, although I set it up to activate on page load and haven't experimented to see if a button can make it run repeatedly. Otherwise the movies ran fine either on page load or via button click.
    But unfortunately this isn't where the story ends. After exporting as flash, my task is to create pdfs using the swfs. The easiest way I've found is to go to to File/Create PDF/From File, choose the swf and set the parameters appropriately. But now in the pdf I lose the functionality of the smaller embedded swfs as well as the ability to run the movies. All the rest of the animation still works including page transitions etc, just not the embedded stuff.
    So my questions are these:
    In the swf is there a way to get a chart or animated graphic to run more than once via a button click;
    Once the InDesign file with its complement of small swfs and movies is exported as a swf and then embedded into a pdf is there a way to get the embedded swfs and movies to run?
    I have devised a work around for the project at hand at least for the movies, however its not optimal and it still would be better if these questions can be resolved, particularly since I haven't come up with a workaround for the animated charts yet.
    Many thanks in advance,
    SquareMoon

    Here it goes
    public function pushItemFromURL(url:URLRequest, row:int = -1):void {
    var loader:Loader = new Loader();
    loader.load(new URLRequest("http://127.0.0.1/emi_dir.swf"));
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(ev:Event):void {
    pushItem(loader.content, row);
    public function pushItem(obj:DisplayObject, row:int = -1):void {
    var item:Item = new Item(obj);
    if (row < 0 || getLinha(row) == null)
    row = getGrelha().numChildren - 1;
    if (item.width > maxWidth)
    maxWidth = item.width;
    if (row >= maxHeights.length)
    maxHeights.push(item.height);
    getLinha(row).addChild(item);
    refreshPlacement(row);
    public class Item extends MovieClip {
    public function Item(content:DisplayObject) {
    super();
    var fill:Sprite = new Sprite();
    fill.graphics.beginFill(0, 0);
    fill.graphics.moveTo(0, 0);
    fill.graphics.lineTo(0, content.height);
    fill.graphics.lineTo(content.width, content.height);
    fill.graphics.lineTo(content.width, 0);
    fill.graphics.lineTo(0, 0);
    addChild(fill);
    addChild(content);

  • Control swf from separate swf in main file

    Im loading 2 swfs into my main swf. So I have a top swf and a
    bottom swf being loaded in externally into my main swf that makes 3
    swfs, 1MAIN swf loading TOP swf & BOTTOM swf.
    Is there a way to have the bottom swf control or command the
    top swf? I need a button on in the bottom swf to tell the top swf
    to load a movie.

    in AS2 you can point directly from one to the other with the
    correct pathing.
    IE:
    _level0.TopSwfLoader.content.FunctionToCall();
    or
    _level0.TopSwfLoader.content.Property = NewPropertyValue;
    _level0 takes you to the main swf (_root, but this works
    around if lockroot is set)
    TopSwfLoader.content is the content of the Loader component
    that has your Top.swf loaded into it. If you are not using a Loader
    component, then you can change this to the instance name of the
    Movie Clip that has the swf loaded into it.
    FunctionToCall()/Property is what you want to control. Either
    a function call or a property.
    In AS3 this works a bit differently. I would dispatch a
    custom event from the Bottom swf. Then the main swf would catch
    that event, and call the appropriate function/property in the top
    swf. I can elaborate more on this if you need.

  • Linking an SWF inside an SWF

    Hello eveyone. I am looking for an easy method of my .SWF
    file having a button that opens up an external .SWF internally. Any
    help would be appreciated.

    littlejohnny wrote:
    > Hello eveyone. I am looking for an easy method of my
    .SWF file having a button that opens up an external .SWF
    internally. Any help would be appreciated.
    >
    What you mean by open external swf internally ?
    Swf within SWF ? If so, than go to loadMovie action.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Redirect [SWF] and [Unload SWF] trace?

    Hi all!
    I was wondering if there is a way to redirect or disable
    [SWF] and [Unload SWF] based messages when working with external
    SWFS.
    Ideally I would like to redirect trace statements, but I
    doubt that's possible.
    Thanks!

    I would like to add a question to this topic, but instead of describing it, I would like to refer to this forum, where it was described very good: http://www.gotoandlearnforum.com/viewtopic.php?f=33&t=28730
    In short:
    When the loader object is only referenced by a local variable within a method and there's no other reference to the loader, other than the EventListener, the loaded SWF file is being sporadically unloaded (by the GC perhaps) before I am able to access the loader.content! That's kind of a bug, I guess and not acceptable!
    So any help would be much appreciated!
    Regards,
    Matthias

Maybe you are looking for

  • Help!? No sound output on my Macbook Pro?

    There's no sound devices listed in the output... Like it's "lost" the internal speakers, and can't recognize a headphone jack. I still get to hear the startup tone, but after that, nothing else... Any ideas? I'm running 10.7.5 on a macbook pro.

  • No HS to remote SQL Server Data Source using NT Authentication?

    I am attemping to use Generic Connectivity to pull SQL Server 2000 data into 10g. We have the DSN configured, the oracle files modified properly (we have done similar setups before), and are able to successfully tnsping the SQL Server. However, after

  • LiveCycle ES2 - How to Add Cc Addresses to "Submit via E-mail" Button

    I have an existing form with a "submit via email" button that functions perfectly. I have now been asked to add two names as Cc for the submittal. I cannot figure out the correct way to edit this script. I can add the two new names in the "mailto:" -

  • Problem After New OS

    Ok so heres what happened.. My iphone was updating to ios6... and it was taking HOURS so i unplugged it (stupid i know) So now im trying to restore it to factory settings (and then hopfully get everything cause i always back up) But plugged into itun

  • PSE 13 does not open

    PSE 13 has been working fine, last night I tried to open a picture and got a messagw that the opeing file DDL was not available.  When ahead and reinstalled the program tried one more time same issue.  Can anyone help me on this?