bugGnash - The GNU Flash player - Bugs: bug #21364, FB Gui: Stage size wrong

 
 

bug #21364: FB Gui: Stage size wrong

Submitted by:  Udo Giacomozzi <udog>
Submitted on:  Thu 18 Oct 2007 03:47:52 PM UTC  
 
Category: guiSeverity: 3 - Normal
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 22 Oct 2007 01:18:19 PM UTC, comment #4:

Patch commited. Fixed.

Udo Giacomozzi <udog>
Project Member
Mon 22 Oct 2007 12:30:10 PM UTC, comment #3:

Attached a test movie that demonstrates this.
It toggles Stage.scaleMode between noScale and showAll every 3 seconds.

When Stage.scaleMode=="showAll", the reported Stage size should be 550x400 all the time.

Gnash currently implements only showAll mode, but reports the effective window size when you resize the window (which would be correct for "noScale", but not for "showAll").

So I'd say Stage::getWidth() in Stage.cpp should not return the size of the viewport, but instead the native movie size. I'm currently trying to find out where that information is stored.

(file #14176)

Udo Giacomozzi <udog>
Project Member
Thu 18 Oct 2007 04:05:42 PM UTC, comment #2:

Just to clarify the original symptoms: The other movieclip instances are invisible because they are located outside the screen:

5013] 17:53:17: TRACE: stage: 799x599
5013] 17:53:17: TRACE: _level0.cross1 @ 159 / 119
5013] 17:53:17: TRACE: _level0.cross2 @ 639 / 119
5013] 17:53:17: TRACE: _level0.cross3 @ 159 / 479
5013] 17:53:17: TRACE: _level0.cross4 @ 639 / 479

Udo Giacomozzi <udog>
Project Member
Thu 18 Oct 2007 04:02:51 PM UTC, comment #1:

Ok, this is completely unrelated with attachMovie(), sorry.

The problem is that (using FB GUI) I get Stage.width==800 and Stage.height=600 (since that's the resolution of my screen) and the movie (550x400) is scaled up to fill the screen.

Since the movie is scaled the size reported by "Stage" should not be 800x600 but still 550x412 (not 400 because it's a different aspect ratio). Either that or the movie should not be resized (in that case the "Stage" values would be correct).

In either case a object at (Stage.width | Stage.height) should be still on-screen.

Not sure if this is a bug in fbgui.cpp or in the core. Note the FB GUI is a special case since it has a special "window size" right from the start (unlinke windowed GUIs, which resize to the movie's native size). Other GUIs may have the same problem when playing a big movie that has to be shrinked to fit on screen.

Udo Giacomozzi <udog>
Project Member
Thu 18 Oct 2007 03:47:52 PM UTC, original submission:

I just noticed that attachMovie() does not work properly in Gnash. The following code just displays one movieclip, instead of four. "cross2".."cross4" probably are not even on the stage, since they would be partly visible if they were are 0/0.
Also, they are not displayed one over each other since they have different _rotation values.

"cross" is the name of an exported MovieClip which has the shape of a red "X".

Sorry, I haven't the time to investigate this further myself...

Compiled SWF attached.

-----------------------------------------------
// frame 2:

this.attachMovie("cross", "cross1", 10);
c1 = this["cross1"];
trace(c1);
c1._x = Stage.width / 5 * 1;
c1._y = Stage.height / 5 * 1;
c1._rotation = 10;

this.attachMovie("cross", "cross2", 11);
c2 = this["cross2"];
trace(c2);
c2._x = Stage.width / 5 * 4;
c2._y = Stage.height / 5 * 1;
c2._rotation = 20;

this.attachMovie("cross", "cross3", 12);
c3 = this["cross3"];
trace(c3);
c3._x = Stage.width / 5 * 1;
c3._y = Stage.height / 5 * 4;
c3._rotation = 30;

this.attachMovie("cross", "cross4", 13);
c4 = this["cross4"];
trace(c4);
c4._x = Stage.width / 5 * 4;
c4._y = Stage.height / 5 * 4;
c4._rotation = 40;

stop();
-----------------------------------------------

Udo Giacomozzi <udog>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #14176:  stage_size.swf added by udog (10KiB - application/x-shockwave-flash)
file #14166:  calibrate.swf added by udog (361B - application/x-shockwave-flash)
file #14167:  calibrate-flash.png added by udog (16KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by udog (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 22 Oct 2007 01:18:19 PM UTCudogStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 22 Oct 2007 12:30:10 PM UTCudogAttached File-=>Added stage_size.swf, #14176
    Thu 18 Oct 2007 04:02:51 PM UTCudogCategoryActionScript=>gui
      SummaryattachMovie() not working properly=>FB Gui: Stage size wrong
    Thu 18 Oct 2007 03:47:52 PM UTCudogAttached File-=>Added calibrate.swf, #14166
      Attached File-=>Added calibrate-flash.png, #14167

    Back to the top


    Powered by Savane 3.1-cleanup1