Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Xplode that text
Truques e Dicas
ini-script
Ceiling and floor math functions
Irregular MIAW
List Inspector 1.1 with Tree View
Movie Slider Control
Download Net Thing
MPEG Video
Testing CPU speed
MediaMacros Xtras Mall
 

 

 

Behavior Remove border behavior

Added on 9/18/2001

 

Compatibilities:
behavior D8 D8_5 Mac PC

This item has not yet been rated

Author: MatthijsKlinkert (website)

This behavior removes the 1 pixel black border from projectors.

-- This behaviour does the following:
-- If it finds the stage to be smaller or equal than the current screenresolution
-- it resizes the stage to that resolution, but sets the drawrect to the source.
-- It thereby removes the dreaded 1 pixel black border. If the screenresolution is
-- smaller than the stage, this behaviour only rescales the stage to fit the displayresolution.

-- This behaviour is set to only work in projector mode and is not intended to work
-- as a shockwave movie.

-- Events
on prepareFrame(me)
  if me.isProjector() then
    me.redrawStage()
  end if
end

-- Private
on isBiggerThanScreen(me, aRect)
  -- Check if the stage is bigger than the screen resolution
  return (aRect.width > (the desktopRectList)[1].width)
end

on isProjector(me)
  -- check if running in projector mode
  return not (the runMode contains "author")
end

on redrawStage(me)
  lRect = (the desktopRectList)[1]  
  if me.isBiggerThanScreen((the stage).sourceRect) then
    -- set the new drawrect to the size of the screen resolution
    lNewDrawRect = lRect
  else
    -- set the new drawRect to the sourcerect of the stage
    lNewDrawRect = (the stage).sourceRect
  end if
  -- First resize the stage
  (the stage).rect = lRect
  -- Then resize the drawrect
  (the stage).drawRect = lNewDrawRect
end

-- Behaviour description
on getBehaviorDescription
  return "This behaviour does the following:"&RETURN&\
"If it finds the stage to be smaller or equal than the current screenresolution. \
It resizes the stage to that resolution, but sets the drawrect to the source. \
It thereby removes the dreaded 1 pixel black border. If the screenresolution is \
smaller than the stage, this behaviour only rescales the stage to fit this resolution. \
Use this behavior in the first frame of your movie"&RETURN&RETURN&\
"This behaviour is set to only work in projector mode and is not intended to work \
as a shockwave movie."&RETURN&RETURN&\
"©2001 Zicht B.V. www.zicht.nl, written by Matthijs Klinkert"
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail