A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Modify a component

  1. #1
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55

    Modify a component

    So we're using a component for a dynamic xml photo gallery. And it's working fine except that we've come to find out that the component contains a stage setting of Stage.scaleMode = "noScale";

    Unfortunately we're trying to develope a site that renders at 100% browser height, and that line disables scaling of that nature.

    We need to somehow set Stage.scaleMode = "showAll"; - but implimenting that code on the root timeline doesnt seem to effect the swf file at all. Is there any other means to enable scaling? maybe somehow pass that command to the component?

    We know that line is in there because we ran the swf file through a decompiler. Unfortunately I'm not to familiar with decompilers, all i know is its in a folder called "Actions", Sprite51(xmlGallery)

    here's the whole block:

    if (auto_size.toString() == "true")
    {
    Stage.scaleMode = "noScale";
    Stage.align = "TL";
    setProperty("", _x, 0);
    setProperty("", _y, 0);
    } // end if

    any ideas?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    have you tried:
    (path here)auto_size.toString() = "false";

    You would have to find the path of the auto_size variable. do control F in the output.

    gparis

  3. #3
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55
    if you mean in my output window. There is not output. How would i find the path without it? The component is placed on the stage with an instance name of myGallery.

  4. #4
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55
    it's part of the myXml.onLoad = function ()

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Yes there is an output window: in test mode (when you do control>test movie) do debug>list variables. in that output window do control F to find the variable and its path.

    gparis

  6. #6
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55
    I have Variable _level0.myGallery.auto_size = "true"

  7. #7
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55
    Oh wait - you're refering to the auto_size variable thats in the xml file. I've changed that already, all that allows for is the content to shift position inside the expanded window, the navigation system, and gallery still remain fixed width inside the expanded or shrunk stage. I'm trying to get the all content itself to scale along with the window size. That's why im trying to somehow pass Stage.scaleMode = "showAll"; to the component,
    Last edited by paragonc; 02-09-2007 at 10:31 AM.

  8. #8
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55
    ya when i delete the gallery component and add Stage.scaleMode = "showAll"; - the file works right. But with the component in Stage.scaleMode = "showAll"; has no effect...

  9. #9
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    I assumed the code you posted was from the component, as it would have been relevant.
    When i read:
    if (auto_size.toString() == "true")
    {Stage.scaleMode = "noScale";}
    I then assume that if auto_size is set to something else than "true" the Stage.scaleMode won't be set to "noScale"

    You follow?

    So, you need to find what (other) action coming from that component would set Stage.scaleMode to "noScale", see if it's possible to disable it.
    Maybe via the output (same amo) or via Movie Explorer.

    Or, you could post a .fla with only that component in it, so we can check for you.

    gparis

  10. #10
    Member
    Join Date
    May 2005
    Location
    San Francisco
    Posts
    55

    Gallery

    Not sure if you need the component from Macromedia Extension Manager, let me know if this works.
    Attached Files Attached Files

  11. #11
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    If you check the component inspector, autosize is a parameter that you can modify (put to false instead of true), it's also said in the documentation of that component.

    gparis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center