[CLOSED] FlashComponent object.name Attribute

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] FlashComponent object.name Attribute

    I would like to have the name attribute set on the object generated by the FlashComponent, so that I end up with something like this:

    <object id="objectid" name="objectname" type="application/x-shockwave-flash" width="100%" height="100%" data="url.swl">
        <param..... />
    </object>
    I have not found if it's possible in the FlashComponent markup to add the name attribute.
    name="objectname"
    How can I do this?
    Last edited by Daniil; Mar 06, 2013 at 4:59 AM. Reason: [CLOSED]
  2. #2
    Hello!

    You should use the following:

    <CustomConfig>
    	<ext:ConfigItem Name="flashAttributes" Value="{ name: 'objectname' }" Mode="Raw" />
    </CustomConfig>
  3. #3
    Hello,

    We have added the FlashAttributes property for the FlashComponent control.

    Thank you for the question.
  4. #4
    Just to clarify as to the why and also maybe you can tell me if that would be desirable or not: I have found that in order for

    flash.external.ExternalInterface.objectID
    in ActionScript to work on all browsers and return a consistent value, the name attribute must be set to the same as the id on the object tag element. IE is good with the id but FF and others use the name. Could there be an option to set this automatically (copy the id in the name attribute) instead of having to do it manually? At this point, I would have to find out what the attribute of id is at runtime, and then set the name attribute on it...
  5. #5
    What about to set up the same id and name explicitly?
  6. #6
    Yes, something that would allow to set both the id attribute and the name attribute on the object tag of the FlashComponent, either to the automatic id or to another value that is specified by the user. Maybe the FlashAttributes method can be used for that, assuming the automatic id is not set when it is already supplied by the user.
  7. #7
    Sorry, maybe I misunderstand something, but this makes an id and an name to be equal.

    <FlashAttributes>
        <ext:Parameter Name="name" Value="someValue" Mode="Value" />
        <ext:Parameter Name="id" Value="someValue" Mode="Value" />
    </FlashAttributes>
  8. #8
    That would do it for a fixed name. How would you do it for an automatic name, like "extswf1031" that is auto-generated (in case that this control is included more than once on the same page)?
  9. #9
    For each new control you could set up its own FlashAttributes, could not?

    Maybe, I misunderstand something in the scenario. Could you provide a sample which would reproduce the problem?
    Last edited by Daniil; Mar 12, 2013 at 6:18 AM.
  10. #10
    Without posting files, this may be hard for you to test...

    My problem is with Flash. From within Flash in ActionScript, you can call the ExternalInterface.objectID property to get the reference to the object tag in the DOM. The problem is that IE is using the id attribute which is currently always set whereas other browsers, such as FF, use the name attribute of the object tag which is never set.

    In the case of the FlashComponent, the object tag is given an auto-generated id but not a name attribute. So when the ActionScript is run inside the *.swf, the ExternalInterface.objectID is defined for IE but is null for FF.

    What I am asking for is an option to set the name attribute on the object tag for the FlashComponent to either a supplied value or to an auto-generated value. Something like:

    <ext:FlashComponent runat="server" ID="flash" SameObjectNameAsID="true" />
    would copy the ID, supplied in this case, to the name attribute. Or if ID isn't supplied, copy the auto-generated id.

    Or:

    <ext:FlashComponent runat="server" ID="flash" ObjectName="flashname" />
    to set the name to something else than the ID.

    If nothing is set, then behave like now: no name attribute on the object tag.
Page 1 of 2 12 LastLast

Similar Threads

  1. FlashComponent in window
    By bovo13 in forum 1.x Help
    Replies: 14
    Last Post: Dec 11, 2012, 3:04 PM
  2. Image and FlashComponent
    By LLdeOJ in forum 1.x Help
    Replies: 0
    Last Post: Nov 24, 2010, 2:24 PM
  3. FlashComponent Example is not working
    By Hiverli in forum Examples and Extras
    Replies: 3
    Last Post: Sep 30, 2010, 8:52 AM
  4. [CLOSED] How to change color of FlashComponent background
    By flormariafr in forum 1.x Premium Help
    Replies: 6
    Last Post: Mar 01, 2010, 12:50 PM
  5. [CLOSED] .SWF aninimation is not showed using FlashComponent
    By flormariafr in forum 1.x Premium Help
    Replies: 1
    Last Post: Feb 25, 2010, 3:38 PM

Posting Permissions