• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Changing Stage size at runtime

LEGEND ,
Sep 11, 2006 Sep 11, 2006

Copy link to clipboard

Copied

I have been poking around and not finding any info on this.

What I want to do is change the height of the STAGE (not a MovieClip) based
on which view I'm showing the customer at a particular time.

For instance...

I may have a thumbnail and a detail view for a product. I don't need a lot
of screen real estate to show the thumbnail view, but I'd like to make the
swf taller if the user switches to the detail view.

I don't simply want to make the swf taller by default because I'll have a
ton of unused whitespace in thumbnail view, which will look stupid.

I shouldn't have a problem with the JavaScript to change the height
properties in the HTML tags for the Flash object, but not really sure if/how
to do the other part in Flash. Everything I've seen so far has been
read-only properties.

Thanks,

Chris.



TOPICS
ActionScript

Views

566

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006

Copy link to clipboard

Copied

did you change stage size?

how can you do this without javascript?

"Christopher Hayes" <chris.hayes@maritz.com> escreveu na mensagem
news:ee4csi$ent$1@forums.macromedia.com...
>I have been poking around and not finding any info on this.
>
> What I want to do is change the height of the STAGE (not a MovieClip)
> based on which view I'm showing the customer at a particular time.
>
> For instance...
>
> I may have a thumbnail and a detail view for a product. I don't need a lot
> of screen real estate to show the thumbnail view, but I'd like to make the
> swf taller if the user switches to the detail view.
>
> I don't simply want to make the swf taller by default because I'll have a
> ton of unused whitespace in thumbnail view, which will look stupid.
>
> I shouldn't have a problem with the JavaScript to change the height
> properties in the HTML tags for the Flash object, but not really sure
> if/how to do the other part in Flash. Everything I've seen so far has
> been read-only properties.
>
> Thanks,
>
> Chris.
>
>
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

Nope - no one has replied yet and I haven't found any info suggesting that
you can change the stage size.

You can definitely change the parameters in the object tag that tells the
browser how big the stage it, but that won't actually change the stage size,
it'll just stretch it out or shrink it appropriately, but the only way I
know of doing this at runtime is with JavaScript.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

okay, you might be able to do something with onResize = function() {} ...i was just looking it up on the live docs...try going to the Flash 8 documentation > ActionScript 2.0 Language Reference > ActionScript classes > Stage

good luck 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

When I first saw that I though it might help too, but unfortunately you can
only change how the browser "stretches" your application.

I can't find any documentation that says you can actually change the stage
size at runtime :(

You know - just like a longer Web page. It's got more content, so it grows
in height (or width) to display all of it.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

Sorry, I have no real help, but I just wanted to point out that I THINK I've seen that done so I believe it is possible. It was an ad on a page that was small and in the corner--most of the page was NOT flash but rather HTML text and pictures, but when you moused over the small ad it expanded to fill most of the page with the Flash ad, covering the ordinary html text and images underneath it.

I was most impressed, but sadly, have no clue as to how it was done.

After having pondered it for the last severl months, I'm guessing it might have been an illusion, perhaps encapsulating the full-sized flash movie in an expanding layer or something using js. Who knows?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

Most of this tricks are illusion, the eye is slow and you can create and see things that are just tricks. I never heard about of doing this at runtime in flash.
If is not java script then a plugin that can create the trick?Another softweare that integrate with flash?
Can you send me the link in wich you see it? Any way I will search because I'm also interest in doing this too. If you know something else let me know.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

Most of this tricks are illusion, the eye is slow and you can create and see things that are just tricks. I never heard about of doing this at runtime in flash.
If is not java script then a plugin that can create the trick?Another softweare that integrate with flash?
Can you send me the link in wich you see it? Any way I will search because I'm also interest in doing this too. If you know something else let me know.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

Most of this tricks are illusion, the eye is slow and you can create and see things that are just tricks. I never heard about of doing this at runtime in flash.
If is not java script then a plugin that can create the trick?Another softweare that integrate with flash?
Can you send me the link in wich you see it? Any way I will search because I'm also interest in doing this too. If you know something else let me know.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

I wish I could send you the link, but like I said, it was an advertisement and it was over a news page. This was months ago so it's long gone and there's no telling where it (or something like it) will spring up again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

>>change the height of the STAGE
No can do. As you say, read-only props.
The only way is to set the height and width in the object/embed tags and pass in the values to the swf as flashvars. Then in the swf, based on the passed in width and height, you can set dimensions for every element in the swf -> like setting a grid for the lay-out and change dimensions of movieclips dynamically.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 22, 2006 Sep 22, 2006

Copy link to clipboard

Copied

LATEST
Join The NY Flash developers Meetup Group @ http://comptutor.meetup.com/4/

Just click and see what the group is about........

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines