Embedding SWF in a text field

Hi, New user to Flash here with a problem embedding .SWF
files. I have already existing SWF files that I have called
historically from HTML using <object> to embed the object and
<param name= value=> also to pass it information. The SWF
movie I need to embed basically builds a graph and takes its data
from the location you supply it in <param name= value=>
field. This code is not mine and I can't alter it.
What I want to do is construct a flash version of my site and
embed these graphs within a flash textfield. I have been able to
successfully embed a test SWF file using <img> tags on a text
field ---> but here is my question. How do I support the
<param name= value=> functionality I got when I called these
graphs from HTML using <object>?
I hope that's clear? Any help at all is greatly appreciated.
Tom

Tom,
> What I want to do is construct a flash version of my
site
> and embed these graphs within a flash textfield.
That's a really interesting approach. At first, I didn't
understand
what you were aiming for, but it sounds to me like you're
tying to use HTML
inside a Flash text field -- which is doable, to some extent
-- and embed an
external SWF in that HTML ... all within Flash.
> I have been able to successfully embed a test SWF file
> using <img> tags on a text field --->
That does work, but it's about the closest you'll get, I'm
afraid. It's
only happenstance that Flash's very narrow (and somewhat
unique) version of
HTML accepts SWFs in an <img> tag.
> but here is my question. How do I support the <param
name=
> value=> functionality I got when I called these
graphs from
> HTML using <object>?
Flash only supports a very limited subset of the HTML
language. You can
see the full list of supported tags by searching the phrase
"supported tags"
in the documentation (specifically, the Learning ActionScript
2.0 in Flash
book). For better or worse, <object>, <param>,
and <embed> are simply not
in that list.
> Any help at all is greatly appreciated.
Your only choice is to use one of the more traditional
methods of
loading external SWFs, such as loadMovie(),
MovieClip.loadMovie(), or the
MovieClipLoader class. Once your external SWF is loaded, you
may "feed" it
variables that should be detectable by the ActionScript
inside the loaded
SWF.
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Embedding fonts in dynamic text fields

    I am having trouble embedding a font in my Flash file. I have the font in my library. I have the text field selected to that font with the * next to it.
    In my actions I have:
    vid_title_txt.embedFonts = true;
    If I set it to false instead, it shows a different font. But if it is set to true, nothing shows. I am running out of ideas what to look at to solve this issue. What am I doing wrong here?
    Thank you very much for any help with this!

    I am in AS2.
    I followed these steps.
    Open the Library panel (Ctrl+L).
    Add a font to your library - click the options menu in the upper right corner of the panel and select New Font from the menu.
    In the Font Symbol Properties dialog box select the font, size and style that you want and give the font combination a name. Click OK to close the dialog box.
    Right-click the font symbol in the library and select Linkage from the contextual menu.
    In the Linkage Properties dialog box, click the Export for ActionScript button to enable both the Identifier and AS 2.0 Class text input fields. Leave the default Identifier value and click OK to close the dialog box.
    Select the text tool from the Tools panel and draw a dynamic text field on the Stage.
    Give the text field an instance name of "my_txt". In the Font menu select the symbol name you gave the embedded font earlier. You should see a little asterisk (*) beside the name.
    In the Property inspector set the font size and style to match those in the Font Symbol Properties dialog box earlier.
    Open the Actions Panel and add the following code to Frame 1 of your Flash document:
    my_txt.embedFonts = true;
    my_txt._rotation = 15;
    my_txt._alpha = 10;

  • Text jumps after embedding font in dynamic text field!

    Hi
    this is driving me mad
    Im using a standard font (Gotham rounded) within a dynamic text field. As soon as I embed the numerals within this text field the text lowers within the text field.  Double clicking the field then renders the text higher up!  It seems that the height it shows when I double click is the height it compiles at.
    The other strange and annoying thing is that my colleague working on the same project is using the exact same font and same file but this doesnt happen to him and so the font redners out differently when he compiles!
    Could anybody please help me sort this problem out as its reeeeally annoying
    many thanks!
    Nick

    nobody any ideas?!

  • Calling functions of a SWF embedded within an HTML Text Field...

    I have a slideshow SWF of size 150px by 150px which changes
    image every 5 seconds with the use of a timer, the SWF has a kill()
    function which stops the timer.
    In a larger content holding SWF I have a dynamically
    generated textfield which populates its htmlText property via an
    XML feed.
    Within the htmlText I am inserting the slideshow SWF using
    the <img> tags... It all works great until I proceed to
    another page as there is no way to unload the slideshow SWF or call
    its kill() function which eventually lags the system as I have
    several heavy animations in the pages on ENTER_FRAMES.
    Does anyone know how to unload a SWF or gain access to its
    functions which is embedded within htmlText...

    Thanks for replying :)
    I tried that and using txt.getImageReference("idHere") I
    casted it to a loader object however it wont let me then get access
    to the SWFs functions...
    I tried creating a sprite and using addChild() tried adding
    the loader to the sprite but it gave me cohesion errors...
    Any other help MUCH appreciated

  • Embedded SWF in PDF, "form" text transfer to said SWF

    Thanks in advance for your help.
    { also posted in the Flash Professional forum }
    How to have a SWF (embedded in PDF) load a form text field: "value" ?
    Objective: given;
    ~ SWF is embedded in a PDF
    ~ form field in PDF = "name1"
    Coding task;
    how to script the SWF's text field so that it can use the PDF's form text field
    while embeded in the PDF (that has a form field / "value").
    many thanks
    Dale
    Fremont, CA

    ActionScript in the SWF has direct access to the Acrobat JavaScript model through the ExternalInterface object.
    Read this blog:
    http://pdfdevjunkie.host.adobe.com/RMA1_acrossTheBridge.shtml
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • Embedding images, swf in dynamic txt field

    The text is being called in just fine, styled as I wanted
    with html tags and an external css but the images and swfs that I
    want inline are a no-show. Here's the code. See anything wrong?
    info=<p><span class="big"><span
    class="center">GET DESERVED<br>10 PERCENT<br>ON
    REFERRALS</span></span></b><br>Bulletproof
    Webmaster referral credit! We even record tour
    page WM invites!<b> Unheard of
    !</b><br><br><span class="big"><span
    class="center">DEMO
    SAMPLE</span></span><br><br><img
    scr="swfs/demo.swf" width="194"height="142"<b><p
    align='center'>We will NEVER, NEVER, EVER</p>1.</b>
    use excessive or deceptive popups <b>2.</b> Distribute
    or even offer download codecs, spyware, adware toolbars or other
    items that jeapordize the earning potential of EVERYONE
    !!!</p>

    David,
    Thanks for the reply. Going to give the loadMovie method a
    try today. Still curious though because the following is in the
    Flash 8 help documention (in the ActionScript 2.0 section linked
    here -
    LiveDocs):
    In Flash Player 7 and later, you can use the <img> tag to
    embed image files (JPEG, GIF, PNG), SWF files, and movie clips
    inside dynamic and input text fields, and TextArea component
    instances. (For a full list of attributes for the <img> tag,
    see Image tag.)
    Flash displays media embedded in a text field at full size.
    To specify the dimensions of the media you are embedding, use the
    <img> tag's height and width attributes. (See About
    specifying height and width values.)
    In general, an image embedded in a text field appears on the
    line following the <img> tag. However, when the <img>
    tag is the first character in the text field, the image appears on
    the first line of the text field.
    Begin stubborn because if the doc says I can do it, hell and
    damn, I want to figure it out.
    Thanks again.
    jeff g.

  • External Embedded Fonts, Dynamic Text Fields, Latest?

    Hi all,
    I'm stuck in Flash8 land. Mostly because I use mProjector and
    MDM Zinc to extend flash projectors and neither support AS3
    correctly to date. That said..
    Is a Flash8 SWF capable of using fonts embedded in "other"
    SWFs? I realize this is an ongoing difficulty and a well known area
    of confusion and well, I'm confused. All the attempts I've made so
    far in linking have succeeded or failed in various ways, but never
    fully work.
    What I'd love to do is use dynamic text fields populated by
    data from a database (or XML file), with CSS styling, using fonts
    that are embedded in a 'master font SWF'. (and I'd like ice cream
    with that too!)
    I import fonts into, say, 'shared.fla'. I set them all up for
    exporting via linkage (to shared.swf). I open up my other FLAs
    (say, main.fla) and I drag the fonts from the shared.fla library
    into main.fla's library. In looking at the linkage, I see it
    properly set it to Import for Runtime Sharing (shared.swf). I can
    see the font available in the main.fla font list and can select it
    and use it just fine. I have to set the dynamic text field to embed
    fonts to actually see them (and also
    myTextField.setStyle("embedFonts",true)).
    Now all that works well and fine, but the kicker is when I
    want CSS to style my text. If I specify a embedded font linkage
    identifyer in CSS, the text disappears. i.e. I load 'style.css' and
    I have h1 { font-family: someEmbeddedFont; }, the <h1> text
    will now disappear.
    Any clues in how I can specify a font to use in CSS that's
    embedded so it'll work, WITHOUT This font needed to be embedded in
    the actual library (as in, not a linked asset)? Because it works
    fine if I embed the font into every single SWF. But when I try to
    use it as a shared asset, this doesn't work.
    Any ideas on how someone can achieve this?
    This is so I can changed my shared.swf and supply all new
    fonts with the same linkage identifiers and change the font in a
    whole project without re-exporting any other SWFs.
    Thanks for any info!

    I guess it's amazing but I honestly, wholly cannot get this
    to work.
    I made a new AS2 Flash 8 FLA (Forte.fla) with only the Forte
    font with a size of 22 in the library. The name of the library
    element was Forte. The linkage was set to "Export for Actionscript"
    and "Export in first frame".
    I made another FLA (main.fla) Flash8 AS2. In actionscript I
    created an empty movie clip named "Asset_Forte" at the next highest
    depth and Asset_Forte.loadMovie("Forte.swf"). I also made a dynamic
    text field on the stage of this main.fla document and set it to
    Arial 22pt (no bold or italics, etc). I did not embed anything into
    it.
    I made a TextTormat object (my_fmt) and set my_fmt.font =
    "Forte";. I put some text in the dynamic text field to start so I
    just applied the formatting (status_text.setTextFormat(my_fmt);).
    This did not work. I started adjusting random things like
    naming the font in the Forte.swf library to Forte22 and tried
    my_fmt.font = "Forte22";. That didn't work.
    I adjusted the linkage to "Export for runtime sharing" and
    specified Forte.swf as the SWF to share from. This did not work.
    I then dragged the font from the Forte.fla's library (while
    "Export for runtime sharing" was enabled) into the library of
    main.fla. I checked the link and it was proper, "Import for runtime
    sharing, Forte.swf". I used both linkage attempts again (Forte and
    Forte22) with my_fmt.font and neither worked.
    Would it be possible at all to get a couple FLAs from you
    that examplifies how you do this particular trick? I can't seem to
    get the settings right. I would be indebted to you!

  • How to handle carriage return/linefeed embedded in text field as first char

    Hi,
    I am trying to use sqlldr to import text that is comma-separated and double quote-enclosed, but contains embedded carriage return/linefeed pairs. I have a control file which works for most cases and looks like this:
    LOAD DATA
    INFILE './foo.new'
    APPEND
    CONTINUEIF LAST PRESERVE (<>'"')
    INTO TABLE <tablename>
    FIELDS TERMINATED BY "," ENCLOSED BY '"'
    TRAILING NULLCOLS
    Unfortunately, this fails when the very first character of the text field is a carriage return/linefeed pair, e.g.,:
    "11","22","33","\r\nThis is the fourth field","","","","",""
    In that case, what is actually the opening double-quote for the fourth field, is interpreted by the CONTINUEIF clause as the end of that line. Can anyone please point me to a solution?
    thanks.
    stan.

    Thanks for the suggestion. Unfortunately, I've already tried it, and it doesn't help. I believe the problem is that sqlldr tries to figure out where each record is delimited before it parses out the field. So, any field-level trimming depends on sqlldr first determining that the cr/lf is actually part of that record, and not an indication of the start of a new record (and it's doing the latter right now). Fwiw, Python's csv parser will handle this type of record just fine.
    regards.
    stan.

  • Embedding a text field in a graphic OR custom text field look

    Hello all,
    I'm trying to create an application where the text field is visually appealing. If any of you have MSN Messanger on your BBs, I'm trying to have a text field similar to the one in the sign-in page.
    Any help would be appreciated

    Hello,
    Thank you for the info.
    Which driver are you using for the dataset?
    If you are using ADO.Plus add this to your App.Config file:
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    Thank you
    Don

  • Font not embedded in static text fields...

    I think the title says it all. I'm building website and I've come half way now just to notice that my clients cant see my font that supposed to be there. What I've learned so far is that in static text fields, flash should embed it itself since I can't reference to it + embedFonts property not working, how can I fix this problem? Anyone had anything similar? What are common mistakes? I'm pretty new at all of this...
    Thanks

    thx for answers...
    Font Name                 Bytes        Characters   
    Klavika-Regular                4555     ,-./0123789:@BCKNPVZabdefghijklmnoprstuvy
    NeoTech                        6738     ,.ACDEFIKLMNOPRSTUVZabcdefghijlmnopqrstuv
    there they are...
    FLASH CS4
    font: NeoTech
    url: http://www.centar-bundek.hr/test/

  • How to show Special Characters like (∠) in an Embedded text field

    I want to show some special characters like (∠). It is working fine if we don't embed the text field. But I want to use superscript and subscript font, so I have to embed that dynamic text field. When I embedd the texfield it does not show me the (∠) symbol. Instead it shows me a square symbol. Please let me know how can I solve this problem. My project is nearly finish except for this part.
    Thanks in advance
    Salim

    Yes, I know we need to include the symbols. But  I am unable to include it. Whenever I click on embed option and paste the symbol (∠) in the include these characters box, it appears as a square symbol. This is driving me nuts.
    I even tried to embed All (54665 glyphs). But this is not working either.
    Has anyone faced this problem before?

  • Font in embedded swf now not showing in ie6

    Hi There,
    We've noticed that a .swf which was recently updated using CS5 no longer displays the font in ie6 - it was originally created several years ago in CS3 so we're wondering if something has changed with regard to the way Flash embeds fonts?
    This tutorial looks fairly extreme for something so simple: http://www.adobe.com/devnet/flash/quickstart/embedding_fonts.html
    The font is the Microsoft font Tahoma and we've updated our test machine to the latest version of Flash - but still no joy.
    When I click various text in the Flash file, they're all set to the following in the properties panel:
    - Classic Text
    - Static Text
    Is there a simple way to embed fonts or do you now have to create a font symbol and follow all the steps described in the above link?
    Sorry, have just never noticed this before.
    Any help or pointers in the right direction would be much appreciated.
    Cheers

    It should work just fine in IE6. You might want to make sure you don't target any version of flash higher than you absolutely need to. I'm not sure how extensively supported IE6 is with Adobe any longer.
    If you're not using any dynamic text and it's literally all static then you don't need to embed the font at all. Flash does that for you automatically on static text fields. The user (as kglad said) does not need to have the font installed. The text is baked into flash as vector outlines.

  • Using a font embedded swf in mxml

    Hello,
    We need to load in fonts at runtime due to localization needs. I've got this working in an AS3 project in Flex by embedding the font in a class and then loading that swf into another class and registering the font.
    What I need now is to be able to use that font class in MXML components like a spark label. I can't seem to get it to work though. I've tried referencing the swf in a style sheet, then making a style class in the CSS using that font like this:
    /* Embed.css */
    @font-face {
         src: url("_Arial.swf");
         fontFamily: "_Arial";
    .genericTextArial
    font-family: "_Arial";
    fontSize: 40;
    color: #000000;
    Then in the MXML I have this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <fx:Style source="Embed.css"/>
         <s:Label text="This should display my embedded text." width="100%" styleName="genericTextArial"/>
    </s:Application>
    However I can't seem to get it to render. I've also tried the method of embedding the font in a text field in Flash Professional and loading in that swf and it doesn't work either. Am I missing a parameter or just going about this the wrong way?

    Thank you, that worked! I actually didn't know exactly how to do that at first but I found this great blog post that explains it:
    http://www.softwarebyrichard.com/content/embedding-fonts-flex-4

  • Problem with characters in text field

    hi all
    i am missing a few characters, once i load text into a dynamic text field. chars are not missing per say; they are being replaced with empty squares.
    characters like the euro sign and accentuated german a letter.
    whats is weird is that other accentuated german letters do appear. so only a few selected are missing.
    How ive set up the fla:
    1) i've added 4 text fields to the stage in the font im using, Arial, one for each font style: normal, italic, bold and bold italic, and in all 4 fields ive embedded all latin characters (to include the german accentuaded characters and im guessing it's in the punctuation group that holds the euro sign, so that one is also embedded), besides lowercase, uppercase, numerical, and all the default groupd to include basic text.
    2) i've got a dynamic text field, created with createTextField, and setup the following ActionScript (2):
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "Arial";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = false;
    T_text.textColor = "0x666666";
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setNewTextFormat(myFmt);
    now, im calling text from a database.
    when calling the text from the browser  url bar, there's no chars missing.
    its just when i make this call from flash and load the text into the dynamic text field, that characters go missing.
    below is a link to a print screen of the faulty text that is displayed in flash's dynamic text field.
    http://img210.imageshack.us/img210/340/utf8.png
    any ideas? i mean, it seems that the arial font is missing a few accentuated characters! because the code i have setup loads other accentuated characters.
    anyone has seen this issue before and know how to solve it?
    regards

    no.
    you assigned your embedFonts property to be false.
    look, you can test if you've embedded fonts correctly by using:
    T_text._rotation=3;
    if you see no text, you're not embedding fonts correctly.
    so, use:
    T_text.embedFonts=true;
    and then test.  if you see no text, use:
    click on the upper right of your library panel > new Font > select Arial and tick the symbols you need to embed > tick export for actionscript and assign a linkage id (eg, ArialID). click ok.  then use:
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "ArialID";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = true;
    T_text.textColor = 0x666666;  // no quotes here.  this is a number
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setTextFormat(myFmt);  // to format the above text, use setTextFormat().  if you want to format text added after this line, use setNewTextFormat()

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

Maybe you are looking for

  • Need to change the business partner on multiple documents (SC's, PO's, etc)

    When a user leaves the organization, their business partner number is no longer valid.  Therefore, any documents they have created are no longer accessible for changes, good receipts, etc.  We are looking for a way that we can find all open SRM docum

  • Extended Subject Area is throwing error

    Hi All, I am working on consolidation of OBIEE reports and create single RPD. We have OBIA as primary repository. One plant is on legacy system. We have created a new schema in EBS database and loaded data to this new schema. I created a new Physical

  • Regular expressions in Oracle 9i

    Hello, Does oracle 9i support regular expressions? I need to check if a varchar parameter contains only numbers OR letters, otherwise i should return false. Thanks.

  • Where to Download weblogic.wtc.jatmi Library/Package

    Dear Tuxedo Experts, I am trying to somehow make a Java client for a Tuxedo Server that listens to C clients. I have found the online javadocs for weblogic.wtc.jatmi which seems to be the answer to my question. Would you guide if that package help me

  • Jrun fails to compile/run jsp's on Mac OS X 10.5

    I have installed jrun with updater 7 on Mac OS X 10.5. I can run the admin console and create a new web application. I dropped my application's war file into the appropriate folder. The web app seems to start ok. I can access static html files. But w