Flash CS5, image from library in TLFTextField?

I cannot seem to embed an inline image in a TLFTextField from the library.  Using the following snippet (with both a TLFTextField and a standard Dynamic TextField on the stage), the image appears ok in the Dynamic TextField, but no image in the TLFTextField.
var source:String ="image <img src='linkageId' width='100' height='100'/> footer";
TLFText.htmlText = source;
DynamicText.htmlText = source;
Changing the image source to a file path, and the image appears correctly in both.  However, I would really like to keep using the in-library symbols if possible, and the TLFTextField documentation suggests this is still possible.
This is using Flash Professional CS5 11.0.0.485 on Windows 7.  Any suggestions would be appreciated.

I'm not sure where you've misunderstood, so, I'll try to explain the entire process.
Steps to reproduce:
1. Draw or select a shape on the stage.
2. With the shape selected, do Convert to Symbol... under the Modify menu.
3. Give the symbol a good name, say "MySymbol".
4. Make sure to select the "Export for ActionScript" checkbox in the Advanced section & check "Export in frame 1".
5. In the frame script code (Window->Actions), I wrote the following function:
function inlineResolver(incomingILG:Object):DisplayObject
var ilg:InlineGraphicElement =  InlineGraphicElement(incomingILG);
if (ilg == null)
return null;
return new InlineText;
This is a function that TLF calls when it's sees an inline graphic in the markup, and it wants a DisplayObject for it. To create the DisplayObject, I simply create an instance of the symbol (new MySymbol(), or in my case, new InlineText()) and return that to the caller.
6. Also note this line of code in the frame script:
config.inlineGraphicResolverFunction = inlineResolver;
That's what tells TLF which function to call when it finds an inline graphic in the markup.
OK, I bet you knew all that stuff. What I think you're asking is how the original code shows the inline graphic on the stage. The only way to do that is to export it from InDesign. InDesign can export FLA files and the inline graphic objects get exported correctly in the markup. However, you can also hand write your markup which contains inline graphic objects. Here's the markup for the "tlf" object in my example FLA:
<TextFlow blockProgression="tb" direction="ltr" lineBreak="toFit" whiteSpaceCollapse="preserve" version="2.0.0" xmlns="http://ns.adobe.com/textLayout/2008"><p breakOpportunity="auto" direction="ltr" dominantBaseline="roman" leadingModel="romanUp" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" tabStops="s36 s72 s108 s144 s180 s216 s252 s288 s324 s360 s396 s432" textAlign="left" textIndent="0" textRotation="auto"><span baselineShift="0" cffHinting="horizontalStem" color="#1a1718" digitCase="default" digitWidth="default" dominantBaseline="roman" fontFamily="Minion Pro" fontSize="12" fontStyle="normal" fontWeight="normal" kerning="on" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textDecoration="none" trackingLeft="0%" trackingRight="0%">Red Circle Inline graphic </span><img baselineShift="0" customSource="225" locale="en" source="225"/><span baselineShift="0" cffHinting="horizontalStem" color="#1a1718" digitCase="default" digitWidth="default" dominantBaseline="roman" fontFamily="Minion Pro" fontSize="12" fontStyle="normal" fontWeight="normal" kerning="on" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textDecoration="none" trackingLeft="0%" trackingRight="0%"> Text following the red circle inline graphic</span></p></TextFlow>
Notice the <img> tag and that there is a "customSource" attribute. For the purposes of writing custom markup, all instances of the same symbol should use the same customSource numeric identifier. Other than that, they should all be unique numeric values. You can use the customSource identifier in the inlineResolver() function to know which graphic TLF is asking you for. For example, you could have code that looks like this:
function inlineResolver(incomingILG:Object):DisplayObject
var ilg:InlineGraphicElement =  InlineGraphicElement(incomingILG);
if (ilg == null)
return null;
if (incomingILG.userStyles.customSource == 225)
     return new MySymbol();
return null;
I hope that answers your question.
Rusty

Similar Messages

  • Flash CS4 crashes when dragging image from library to stage

    Everytime I'm trying to drag an image from the library to the stage, the program crashes.
    I've been sending the crash logs to Adobe many times, but never got any solution from them.
    In the log there a line that says:
    <crash exception="EXCEPTION_ACCESS_VIOLATION" instruction="0x0c4feb66>
    I'm working with 10.0.2, I thought the latest update will fix that, but it doesn't.
    Changing the UI from Essential to Classic doesn't help (read somewhere it can help).
    Anyone knows what to do to stop these crashes?

    Yes, did all the updates, both XP and Java.
    It looks like it's a library issue. Almost every action I'm doing in the library (drag, copy etc.) causes the Flash to crash.
    What can be the problem?

  • Pull image from library with AS3?

    Hello, I'm a fairly experienced AS2 programmer transitioning
    in progress to AS3 programmer. I'm using Flash CS4 as my IDE with
    Actionscript 3 and Flash Player 10. I'm working on a bigger project
    but the area I'm struggling in is dynamically pulling an image from
    the flash library (already loaded). I've been finding the same
    answers to my question all over and they seem to keep producing the
    same error so apparently I'm just not getting some little detail. I
    have an image loaded in the library called test1.jpg. I've right
    clicked on it and selected 'Export for ActionScript' and 'Export in
    frame 1'. The class is 'MyMc' and the Base class is
    'flash.display.BitmapData'. My code is attached.
    and it produces the following errors:
    quote:
    1136: Incorrect number of arguments. Expected 2.
    1067: Implicit coercion of a value of type MyMc to an
    unrelated type flash.display:DisplayObject.
    What is the deal. I've posted on other forums and get the
    same reply. I'm really struggling with why CS4 is acting this way.
    AS3 is proving very difficult to transition to.

    Alaskan57,
    > The MyMc name actually came from a tutorial I was
    > trying to follow... they were using movieclips but I
    > wanted to adapt their tutorial to Images
    Makes sense. :) And again, the name *as a name* (as a
    string) doesn't
    really matter, but it's always important to consider what
    sort of object
    you're dealing with, whether by inheritance or not, because
    they all have
    their own unique characteristics ( ... otherwise they
    wouldn't be different
    types of object!).
    > Yea, I remember learning AS2 and how difficult it was...
    > but AS3 I think has that beat as I'm not very familiar
    > with OOP programming in general. But I'll get there :)
    You will; it just takes time. Everything I know is something
    I scraped
    from online tutorials, read from books, or asked of friends
    on IM.
    Eventually, the principles of OOP finally gelled in my head.
    To me, OOP is
    more about organization than anything else. It's not
    something magical or
    mystical (which took me a while to believe!) ... it's just a
    way of
    arranging code into reusable nuggets called objects. Each
    object is defined
    by its class, and generally speaking, classes organize their
    functionality
    into properties, methods, and events. Those three basic
    categories refer
    respectively to characteristics the object has, things the
    object can do,
    and things the object can react to.
    > Thanks for your explanations... I learned a lot!
    Glad to hear that. :)
    > BTW, you said I did not need to import the
    flash.display.*
    > class.
    That's only true when you're dealing with timeline code. In
    custom
    classes, especially in AS3, you have to import just about
    everything. But
    if you're in a keyframe of the timeline, you only have to
    import classes
    outside of the flash package (such as, for example, the fl
    package, which
    tends to hold components; the air package, which holds AIR
    APIs, etc.).
    > Is there some online information that would go into more
    detail
    > about why I should import a class or why I wouldn't need
    to?
    imports are required when Flash needs to know how to define
    the objects
    you're referring to. If you're using 3rd party classes, like
    TweenLite,
    then you would need to import those packages/classes ...
    because Flash has
    no idea what a TweenLite object is without that information.
    In custom
    class files, you have to import everything that isn't a part
    of the core
    functionality (that is, anything that isn't a part of the Top
    Level items
    listed here ...
    http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html
    > I've been wanting to try out TweenLite as well as other
    classes but
    > can seem to figure out this whole import when I need to
    thing.
    It certainly doesn't hurt anything to import packages; it
    only "hurts"
    when you fail to import a package that needs it, so to play
    it safe you
    could import everything. Just bear in mind that anything that
    truly needs
    importing must be imported for every frame in which you refer
    to that
    package's class(es). If a keyframe in your timeline
    instantiates a
    TweenLite object in frame 10, you'll have to do the import
    there. You
    should be able to *use* that instance in any frames after
    that, even without
    another import. If you then decide to instantiate *another*
    instance in,
    say, frame 100, you'd have to re-import the TweenLite class
    in frame 100.
    > PS, I have your book (but it's at home at the moment :))
    Thanks for the purchase!
    David Stiller
    Contributor, How to Cheat in Adobe Flash CS3
    http://tinyurl.com/2cp6na
    "Luck is the residue of good design."

  • Remove images from library without deleting referenced files

    Hi,
    I cannot find solution: how do I remove images from Aperture library completely (all versions, etc), but keep the referenced master files? (all my images are kept outside aperture lib, as referenced masters).
    If I delete all versions and projects, they go to Trash, and attempting to empty the Trash brings only two options: delete permanently and move to system Trash. But I do not want to touch the referenced masters in any way. Is there a way to keep them safe, while emptying Aperture of all references to those files?
    Thanks.

    If the originals are referenced when you empty the Aperture trash the confirm box will have a checkbox asking yf you also want to move the referenced originals to the system trash.
    If you do not select this option the referenced originals are left where they are. If you of not see this option in the confirmation box then the originals in the Trash are not referenced.

  • Nikon D800 raw files taken with Sandisk extreme plus 32GB SDHC card got corrupted. Able to preview them in Lightroom4.4 Library, but not able to import or transfer the files from card to computer. Any ideas on how to save images from Library Window in Lig

    Hi, I have shot few pictures on 31st December night in RAW mode using Nikon D800 and Sandisk extreme plus 32GB SDHC card. It looks like card got some memory errors so not able to transfer the files from Card to computer. However I am able to view the pics thru Lightroom ver 4.4 Library, but when I tried to import them, it gives me an error stating that file can't be read.
    Is there a way to save the pics from Library window in lightroom overcoming the card read errors ?
    Thanks in advance

    Hi SSPRENGEL,
    Thank you for your response. Here is the error message I am receiving, I tried with various destination folders in the computer but it still gives the same error:. Just to let you know, I am able to import pictures into these folders from other memory cards.
    I am able to finally at least extract the jpgs using the option suggested by elie-d

  • Flagged images from library to develop?

    When I import and cull through RAW images from my flashcard I tag the best ones with star flags. After I have removed the rejects I import the remaining images in develop mode to work on the ones I chose. However, the flags are not there in develop mode so that I cannot go through all of them and know which ones I flagged. What am I doing wrong?

    Few options for you:
    1.  Go to View menu > View Options and set your desired information - i.e. the ratings - to show on the Info overlay, which can then be turned on and off using the I key.
    2.  Show those items on the filmstrip thumbnails (options found in Preferences > Interface tab)
    3.  Filter to only show the photos you want to work on.

  • Displaying image from library

    I've loaded a few images into the flash library. Added the
    appropriate linkage ID (Actionscript 3). I use import in my main
    the same way I do if it was a symbol. When I try to create an
    instance and then do an addChild() it doesn't work. Can someone
    please tell me how to display images that are in the library? I
    looked in the docs and it seems to only show how to do it if I was
    loading them from an address.
    Thanks!

    you don't use the linkage id in as3. you assign your
    bitmapdata object a class. then use a (new) constructor to create a
    bitmapdata instance. then create a bitmap from that bitmapdata
    instance and add the bitmap to your display list.

  • Flash CS5 randomly deleting library content

    Sorry if this isn't the right sub-forum but it seemed to be the closest to my issue as far as I can see.
    Hello,
    I'm working on a  rather large project at work using CS5 Flash. The project involves  loading several .swf files at different times from a main 'hub' type  structure. Think of it as a multi-channel platform and when you click on  the channel you want, it loads the sub-swf with the videos and movie  clip contents/as code in it.
    As one can imagine, this has  cause the overall project to grow quite huge. When we open up the main  fla file that contains the library content of it's children fla's, some  files will randomly go missing.  These files are being shared over a  network with various people via a file repository system so no two  people can be working on the same file at the same time. This doesn't  appear to be the problem, nor is accidental deletion as an individual  can check out the files, work on them locally, save them locally, close  and reopen them  locally and random content will be missing again.
    We  believe that the issue may have to do with the overall size of the  fla's (the fla's range in size from 16mb to 3mb).  They will be playing  as stand alone objects, not on a website so other outside content isn't  an issue. Some of the computers being used are 64 bit system while  others are 32 but all systems have had the issue. We are also using AIR  to help with some of the functionality but this issue started before we  started using AIR.
    Any help would be appreciated. Thank you.

    Did you ever get any resolution with this issue? I am having this too, in multiple projects that aren't connected.
    I even had the same exact MCs in the library in multiple FLAs just in case this happened. When it did, I attempted to drag the MCs from one FLA (where they were NOT deleted) into one where where they WERE deleted....thinking that I would be able to hit "replace" all since the MCs were named the same....when they appeared on the stage they were empty! It wasn't until I deleted the old MCs (with the missing content) that the new ones would show up when dragged over.
    If you have ANY resolution to this please let me know. I am surprised that this isn't a major issue with more people.
    I even have this issue on different Macs using different installed software!
    So this is systemic!

  • Emptying Aperture trash doesn't remove images from library

    Not sure what's going on.
    Did a little house cleaning over the past few days and deleted about 2K images overall. And I emptied the aperture trash. The number of files in the program goes down. But the size of the library doesn't change. The date of for the library does change and shows the current time.
    I archived all my images to an external vault. That vault is significantly smaller than my library.
    Then I upgrade to the new version 3.1.2. Deleted preferences.
    I created a new library as a test. I imported 188 images. Then deleted a few. Emptied the aperture trash. The number of images went to 152.
    The size of my library remained unchanged. No aperture images in main computer trash can. And when I go into the masters folder in the library I see all 188 images there.
    System: mac pro 2006. OS 10.6.8

    Thanks for taking the time to reply.
    I don't remember which version I upgraded from. But the problem was there in the old version as well as the new one.
    I did do the repair rebuild just before upgrading with only a 0.1GB difference in file size afterwards.
    And, as I said, when creating a brand new library with only 188 images the same problem occurred. So 2 separate libraries on the same drive.
    I just created a new library as a test on my main drive (a different drive) with the same issue. Files are deleted in the program but not in the library.
    There is no problem with the trash in any other respects. Other files have been deleting just fine.
    The aperture deleted images aren't even reaching the trash can.
    I might need to reload aperture.

  • Exporting Multiple Images from Library - Resized CP4 to CP5 Project

    I am getting corrupt files when attempting to export multiple images at once:
    OS: Occurs on both Win 7 and XP
    Source: CP4 project imported to CP5. Original CP4 project was captured at 1024x768 and later resized to 1024x738.
    1. Open Library Backgrounds folder.
    2. Select more than one background image
    3. Right-click over selected objects
    4. Click Export from the context menu
    'Browse for folder' dialog appears.
    5. Select a folder
    6. Click OK
    Files are created in folder, but are corrupt. When exporting the same images individually, they come out fine. Individual image export file size ends up ~ 2MB each. Multiple image export file sizes end up ~60kb. All are exported as .bmp (not given a choice when exporting multi-select).
    Multiple file export works fine in a new CP5-native project.
    I've reported it as a bug.

    What version of Aperture do you have? This is simple with AP3. Fle -> Export -> Project as New Library. At the far end, Import Library....
    Regards
    TD

  • Flash CS5: Runtime Shared Library

    Hi,
    I'm having a problem publishing my flash files. Everything was fine up until a few days ago and now all of a sudden I get an error message when I try to publish telling me that the file won't publish due to a RSL error. It advises me to alter my publish settings as follows:
    Publish settings
    Advanced AS3 settings
    Runtime Shared Library      settings
    error:      text_layout_1.0.0.595.swz for TLF text
    I'm told that the swf will not run without a preloader. There are two options available: custom preloader and merge into code. I am inserting the animations into a captivate project. If I choose custom preloader the animations won't run in Cp. When I try to insert them Cp only recognises them as being 2 frames long. If I choose the merge into code option it makes my captivate project go completely haywire.
    Any suggestions? Ideas? I'm pretty much just learning how to use authoring tools and have a deadline looming for this project in a few weeks.
    Thanks for any and all help!
    Maedhbh

    a) do you absolutely need TLF text?
    Merging the SWZ into code makes sense for your needs, what exactly happens in captivate with it?
    Remember that Captivate 4 has been released before CS5, so I would say that there might be a few errors or workarounds when mixing these two.
    You might want to check over on the captivate forums, if anyone there experienced similar.

  • Moving images from library to library WITH Faces information

    Ok.
    iPhoto 09/faces
    Can someone out there tell me, first off, is it even possible to move photos from one library to another library WITH all the Faces effort I've put in on those photos (say from my default library on my hard drive to another person's library on an external hard drive)?
    That way they don't have to be rescanned and then I have to go through and correct the crappy scanning effort that the program did all over again.
    I tried exporting/importing, straight copy, etc. with no dice.
    I don't want to keep having to re-correct all the faces in images I transfer between libraries.
    "Help me Obi-Wan Kenobi....You're my only hope!"

    For folks out there here is the results of Terrence's suggestion (which was a good one BTW, I don't want to dump on him - it was good thinking on his part! Thanks Terrence).
    iPhoto Lib Manager still ***** (on my system anyway - iMac OSX 10.5.6).
    I installed the thing and tried moving 1000 photos with faces info organized nicely - no dice - it crapped out.
    First make sure all the permissions are set properly and the library mounts automatically (under the options). Then it will at least ATTEMPT to copy everything (also edit prefs to reflect all the metadata that goes with the photos like faces info, dates, desc. etc).
    But while thing appear to go well, it craps out at the end leaving you stymied. It re-scans the imported images and the faces data does not come through in the end despite it's trying to do so.
    I tried it with 80 photos, just to make sure I wasn't trying to fit 20lbs of manure into a 10lb bag. Same story with the smaller transfer
    If I go any smaller, I may as well have used the public version (free) which limits you to 20 at a time.
    So bottom line - according to my experience - if you and someone else have the same photos in your separate libraries and want to share the effort one of you puts into organizing faces info - you're hooped/screwed/pooched!
    Nada - diddly - bupkiss!
    VERY DISAPPOINTING! Both the iPhoto 09 AND the failed (but valiant) attempt by iPhoto Lib Man.
    Should've stuck with iLife 08 and lived with it...sigh.

  • Import image from library

    i have a pgn in library, and its AS Linkage (Class)  is: AssoCuori
    i have 2 arrays:
    var semi:Array = ["Cuori","Denari","Fiori","Picche"];
    var Carte:Array = ["Asso","Tre","Re","Donna","Jack","Sette","Sei","Cinque","Quattro","Due"];
    i wanna add the child Assocuori  using them, something like:
    var image:Bitmap = new Bitmap(new this[Carte[0]+semi[0]]);
    addChild(image);
    but this outputs error... help please

    you can use instanceF below:
    var pgn:*= instanceF(Carte[0]+semi[0]);
    function instanceF(s:String):*{
    var C:CLass=Class(getDefinitionByName(s));
    return new C();

  • Export images from library module with borders

    Lightroom has been a great help for organizing my images and preparing them for photo competitions, but it would be a lot more convenient if I had an option to add a border to some of my exported images.  Many competition judges demote images that have black content on the edges unless we add narrow (2 or 3 pixel) borders to the images.  You already do this for slideshow mode; the same feature in Library export would really be appreciated.  As it is, I have to export tiff files, then use a Photoshop action to prepare the bordered competition jpegs.

    You can create a border in photo shop. You need to create it with a transparent background.  Add it to the picture in the print mode as a watermark.  Check the watermarking options and you will be able to create a preset. Choose your border in image options.  Your border file can also have text etc.  
    You could also use photo-Edit in- to go to photoshop. Edit a copy.  Ctrl J - a new layer.  Add a layer style - Stroke - choose position "inside" and exactly how many pixels you want.  Hope that is descriptive enough. sounds like you probably know more about photoshop than I do.  I'm not familiar with a photoshop action
    Good luck

  • Is there a way to send 4 out of 44 images from Library to Develop? Easily????

    I think my subject line says it all.
    I expect that if I've selected 4 images and then I go to Develop, I will see and be working with those 4 images. Only. Is there a way to do this?
    Kittie

    A virtual copy is just another develop recipe for the same original photo.
    Think of Lightroom as a recipe book.
    When you edit a photo, you are not actually editing the photo, you are
    creating a recipe to use on the photo, for when you decide to 'cook' the
    photo by exporting it.
    Your original photo never gets touched, a recipe is applied and a new
    photo is created when you export it.
    By creating virtual photos, you are just creating new pages of recipes
    for the same original photo, so you can cook it differently later.
    So suppose you have a photo of a couple of people walking down the road.
    You could create a recipe (virtual copy) for the whole photo, and a
    recipe for a Black and white version, and a recipe for a cropped closeup
    of the couple. You are not creating new photos, you are creating new
    develop setting for the same photo.
    The catalog keeps your recipes organized, and you can go back to them
    and 'cook' (export) the photos any time you want, without having to save
    great big multiple copies of the same photo. A recipe is only about 10k
    in size... your raw is more like 10 Meg in size.
    One photo, multiple versions without basically using any more space.

Maybe you are looking for

  • Makepkg fails on custom kernel.

    Hi. I'm trying to compile the arch kernel with a few added patches to increase battery life. What I have done is: Installed abs, and ran ABS as root. Then I made a directory called kernel, copied the kernel26 from ABS to that directory (so kernel had

  • Problem with Text file attachment

    Hello All, I am sending data from my program via mail in an attachment of text format in 4.6C. But the format of the data in the attachment is not correct. There is no line break in the data. I've tried putting the line break manually by using hexade

  • How to copy a link in a CODE box?

    Is there an app/program/workaround to be able to copy a link that's inside of a forums CODE box? Or do I need an iOS download manager? If so, any recommendations would be apprectiated.

  • Shorten the length of a repeat region

    I am trying to figure out how to shorten the length of the <li> in my repeat region. I want to limit each <li> to display no more than 40 characters in length on the web page. In the head of my page: <script type="text/javascript"> <!-- var dsFeedArt

  • Can't upload photos from iphoto 08

    now that I have upgraded to 08' when I click to upload a photo and go to my pictures folder, the iphoto library is grayed out where it is not a choice to click on. How do I fix this so I can upload pictures? thanks!