bugGnash - The GNU Flash player - Bugs: bug #17916, Color class unimplemented.

 
 

bug #17916: Color class unimplemented.

Submitted by:  Marcus Brinkmann <marcus>
Submitted on:  Thu 05 Oct 2006 12:14:15 AM UTC  
 
Category: ActionScriptSeverity: 1 - Wish
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 05 Nov 2007 11:16:39 AM UTC, comment #3:

Duplicated and fixed in bug #21498!

Benjamin Wolsey <bwy>
Project Member
Tue 10 Oct 2006 10:47:26 AM UTC, comment #2:

I had a stab at this, but am stuck now. I added this to Color.h:

as_object *target;

And this to color_new() in Color.cpp:

/* The first argument is the object to which we want to apply the
color operations. */
color_obj->obj.target = (as_object*) fn.arg(0).to_object();

I also implemented color_setrgb() like this:

void color_setrgb(const fn_call& fn)
{
color_as_object* color = (color_as_object) (as_object) fn.this_ptr;

/* The first argument is the color in RGB format that we want to
set for the object. */
uint32 arg = (uint32) fn.arg(0).to_number();
rgba color_val ((arg >> 16) & 0xff, (arg >> 8) & 0xff, arg & 0xff, 0xff);
/* FIXME: Check to_movie() result for NULL. */
color->obj.target->to_movie()->set_background_color (color_val);
}

This seems to work, in the sense that the code is correctly executed. But there is no visible color change. I have two doubts about this: First, is this semantically even correct? Ie, is it the background color of the enclosing movie clip that setrgb is supposed to change? And second, is setting the background color of a movie clip at run time currently supported?

At least this exercise made me familiar with how arguments are passed to action script object methods. :)

Marcus Brinkmann <marcus>
Thu 05 Oct 2006 09:18:03 AM UTC, comment #1:

This seems due to Color class not being implemented.
The buttons work (you don't see the cursor changing, but mouse clicks work fine).

Gnash -v tells you :

WARNING: /home/strk/src/gnash/gnash/server/asobj/Color.cpp:98: unimplemented

Sandro Santilli <strk>
Project Member
Thu 05 Oct 2006 12:14:15 AM UTC, original submission:

Hi,

take a look at this one:
http://images2.flashkit.com/tutorials/Getting_Started/Changing-Gabril_-526/bgcolor.swf

A rather simple flash (version 4) file that has some hot spots to change the background color. Under gnash, the areas don't seem to be hot spots (mouse cursor doesn't change) and clicking them doesn't do anything.

I am not sure why that is the case, the file under gparser seems innocent enough, but I don't know much about flash, so if this is known yet to be unimplemented, I am sorry.

Marcus Brinkmann <marcus>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bwy (Posted a comment)
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 05 Nov 2007 11:16:39 AM UTCbwyStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon 09 Oct 2006 02:47:33 PM UTCstrkCategoryNone=>ActionScript
      Severity3 - Normal=>1 - Wish
      SummaryChanging background color doesn't seem to work=>Color class unimplemented.
    Thu 05 Oct 2006 09:18:03 AM UTCstrkStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1