Re: [Flashcoders] Scroll Bars not coming on increase of movie clipheight

2010-02-19 Thread Glen Pike

Hi,

   I have uploaded a stripped out example for you at this location:
  
   http://glenpike.co.uk/resize_test/files.zip


   You can see it working at http://glenpike.co.uk/resize_test/ too

   Basically, inside your ActionScript you will need to have a few things:

   1.functions that call your JavaScript (Don't forget to import 
your ExternalInterface class):


   public function showContent():void {
   try {
   trace("will call flashShowContent")
   ExternalInterface.call("flashShowContent");
   } catch (e:Error) {
   trace("ExternalInterface.call error " + e);
   }
   }
  
   public function hideContent():void {

   try {
   trace("will call flashHideContent")
   ExternalInterface.call("flashHideContent");
   } catch (e:Error) {
   trace("ExternalInterface.call error " + e);
   }
   }

   2.   Something that stops people reszing the SWF (You need to set 
this up in a handler for the Event.ADDED_TO_STAGE).
   3.   Listen for resize events on the stage (put this in the same 
place) and then resize the height of your movie clips to suit:


   private function _addedToStage(event:Event):void {
   this.stage.scaleMode = StageScaleMode.NO_SCALE;
   this.stage.align = StageAlign.TOP_LEFT;
   this.stage.addEventListener(Event.RESIZE, _resize, false, 0, 
true);
  
   _big.addEventListener(MouseEvent.CLICK, _btnClickHandler, 
false, 0, true);
   _small.addEventListener(MouseEvent.CLICK, _btnClickHandler, 
false, 0, true);

   }
  
   private function _resize(event:Event):void {

   this.width = this.stage.stageWidth;
   this.height = this.stage.stageHeight;
   }
  
   4.  Make sure you set so.addParam('allowscriptaccess','always'); as 
a param for the Flash otherwise the ExternalInterface won't work...


   Ignore the SWFAddress stuff, that is in the live site...

At the moment, the example will either be 100% of the browser height - 
if you want something different, set the initial height of the 
navigation div to a pixel value.  When it is made smaller the height is 
resized to 127px - look in the CSS and the funcs.js to see what happens.


If you want to see it in action click on one of the cube faces, then 
click the "Home" button to zoom out again. 

The project was for a Flash navigation element to sit over HTML - when 
you click on a cube face, the page is set to load in the background 
whilst the cube zoomed in, then the div is resized to reveal the content.


Hope this helps you a bit...

Glen



Rohit Sharma wrote:

  Hi Glen,

Surely, I would like to go through the code. Please let me have it if it
can be shared ( I mean not proprietary).
  Thanks a lot.

  Rohit

On Fri, Feb 19, 2010 at 7:41 PM, Glen Pike wrote:

  

I have some code for doing this at home, I will post it later if you like,
but we had big problems with some browsers not resizing - it might be dodgy
JavaScript, but think it was just sh**y Safari.

Glen


Nathan Mynarcik wrote:



Hey Rohit,

I believe you are correct. ExternalInterface will allow you to communicate
to the HTML javascript function that in turn can change the size of the
flash area.

--Original Message--
From: Rohit Sharma
Sender: [email protected]
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: [Flashcoders] Scroll Bars not coming on increase of movie
clipheight
Sent: Feb 19, 2010 7:08 AM

Hello Everyone,

   In my application I have two screens, first screen measures 800 * 600
and second screen measures 800 * 950.
I have set width and height in html to be 100%.
   On running the swf the first screen comes centred but when I move to
next screen it is cropped. I cannot see the bottom half of the image.
Ideally, I was expecting a scroll bar to scroll the whole movieclip. I
tried
couple of things like setting the html height to 950 but
in that case I am seeing a scroll bar for both the screens. It seems the
html is taking same height for both the screens.

I was searching internet for this and the one solution i got was to use
external interface to change html height when the screen change occurs.
Is this the only way? Please provide your opinions on this.

Thanks,
Rohit
___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Nathan Mynarcik
Interactive Web Developer
[email protected]
254.749.2525
www.mynarcik.com

___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




  

___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___

Re: [Flashcoders] Scroll Bars not coming on increase of movie clipheight

2010-02-19 Thread Karl DeSaulniers

Also, this line can be the original size of the swf itself.
If they have a browser smaller, then it should create the scroll bars.

If your swf changes size, make sure you have that javascript in each  
html its in with the minimum size set.

HTH

On Feb 19, 2010, at 1:15 PM, Karl DeSaulniers wrote:


var screenW = 640, screenH = 480; //set smallest width and height


Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Scroll Bars not coming on increase of movie clipheight

2010-02-19 Thread Karl DeSaulniers
I have this Javascript that will read the browsers screen size and  
resizes per system and browser.
Put this in your head tag. I also used swfobject to load my swf. Not  
necessary though.

Again, though, if they have Java turned off, then this will not work.
May help though.







/* hide from ie on mac \*/
html {
height: 100%;
overflow: hidden;
}

#flashcontent {
height: 100%;
}
/* end hide */

body {
height: 100%;
margin: 0;
padding: 0;
background-color: #00;
scrolling:yes;
}


			val0="resizeOuterTo" val1="">









On Feb 19, 2010, at 12:10 PM, tom rhodes wrote:


. i was calling a function in
JS to resize the size of the flash.


Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Scroll Bars not coming on increase of movie clipheight

2010-02-19 Thread tom rhodes
yeah didn't work in safari when i was playing around with something similar
a few years ago, everything else was ok though. i was calling a function in
JS to resize the size of the flash. i'd be interested if anyone had anything
working along these lines that worked in all browsers...

On 19 February 2010 18:57, Rohit Sharma  wrote:

>  Hi Glen,
>
>Surely, I would like to go through the code. Please let me have it if it
> can be shared ( I mean not proprietary).
>  Thanks a lot.
>
>  Rohit
>
> On Fri, Feb 19, 2010 at 7:41 PM, Glen Pike  >wrote:
>
> > I have some code for doing this at home, I will post it later if you
> like,
> > but we had big problems with some browsers not resizing - it might be
> dodgy
> > JavaScript, but think it was just sh**y Safari.
> >
> > Glen
> >
> >
> > Nathan Mynarcik wrote:
> >
> >> Hey Rohit,
> >>
> >> I believe you are correct. ExternalInterface will allow you to
> communicate
> >> to the HTML javascript function that in turn can change the size of the
> >> flash area.
> >>
> >> --Original Message--
> >> From: Rohit Sharma
> >> Sender: [email protected]
> >> To: Flash Coders List
> >> ReplyTo: Flash Coders List
> >> Subject: [Flashcoders] Scroll Bars not coming on increase of movie
> >> clipheight
> >> Sent: Feb 19, 2010 7:08 AM
> >>
> >> Hello Everyone,
> >>
> >>In my application I have two screens, first screen measures 800 * 600
> >> and second screen measures 800 * 950.
> >> I have set width and height in html to be 100%.
> >>On running the swf the first screen comes centred but when I move to
> >> next screen it is cropped. I cannot see the bottom half of the image.
> >> Ideally, I was expecting a scroll bar to scroll the whole movieclip. I
> >> tried
> >> couple of things like setting the html height to 950 but
> >> in that case I am seeing a scroll bar for both the screens. It seems the
> >> html is taking same height for both the screens.
> >>
> >> I was searching internet for this and the one solution i got was to use
> >> external interface to change html height when the screen change occurs.
> >> Is this the only way? Please provide your opinions on this.
> >>
> >> Thanks,
> >> Rohit
> >> ___
> >> Flashcoders mailing list
> >> [email protected]
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >>
> >> Nathan Mynarcik
> >> Interactive Web Developer
> >> [email protected]
> >> 254.749.2525
> >> www.mynarcik.com
> >>
> >> ___
> >> Flashcoders mailing list
> >> [email protected]
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >>
> >>
> >>
> >
> > ___
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Scroll Bars not coming on increase of movie clipheight

2010-02-19 Thread Rohit Sharma
  Hi Glen,

Surely, I would like to go through the code. Please let me have it if it
can be shared ( I mean not proprietary).
  Thanks a lot.

  Rohit

On Fri, Feb 19, 2010 at 7:41 PM, Glen Pike wrote:

> I have some code for doing this at home, I will post it later if you like,
> but we had big problems with some browsers not resizing - it might be dodgy
> JavaScript, but think it was just sh**y Safari.
>
> Glen
>
>
> Nathan Mynarcik wrote:
>
>> Hey Rohit,
>>
>> I believe you are correct. ExternalInterface will allow you to communicate
>> to the HTML javascript function that in turn can change the size of the
>> flash area.
>>
>> --Original Message--
>> From: Rohit Sharma
>> Sender: [email protected]
>> To: Flash Coders List
>> ReplyTo: Flash Coders List
>> Subject: [Flashcoders] Scroll Bars not coming on increase of movie
>> clipheight
>> Sent: Feb 19, 2010 7:08 AM
>>
>> Hello Everyone,
>>
>>In my application I have two screens, first screen measures 800 * 600
>> and second screen measures 800 * 950.
>> I have set width and height in html to be 100%.
>>On running the swf the first screen comes centred but when I move to
>> next screen it is cropped. I cannot see the bottom half of the image.
>> Ideally, I was expecting a scroll bar to scroll the whole movieclip. I
>> tried
>> couple of things like setting the html height to 950 but
>> in that case I am seeing a scroll bar for both the screens. It seems the
>> html is taking same height for both the screens.
>>
>> I was searching internet for this and the one solution i got was to use
>> external interface to change html height when the screen change occurs.
>> Is this the only way? Please provide your opinions on this.
>>
>> Thanks,
>> Rohit
>> ___
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>> Nathan Mynarcik
>> Interactive Web Developer
>> [email protected]
>> 254.749.2525
>> www.mynarcik.com
>>
>> ___
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
>>
>
> ___
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Scroll Bars not coming on increase of movie clipheight

2010-02-19 Thread Glen Pike
I have some code for doing this at home, I will post it later if you 
like, but we had big problems with some browsers not resizing - it might 
be dodgy JavaScript, but think it was just sh**y Safari.


Glen

Nathan Mynarcik wrote:

Hey Rohit,

I believe you are correct. ExternalInterface will allow you to communicate to the HTML javascript function that in turn can change the size of the flash area.  



--Original Message--
From: Rohit Sharma
Sender: [email protected]
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: [Flashcoders] Scroll Bars not coming on increase of movie clipheight
Sent: Feb 19, 2010 7:08 AM

Hello Everyone,

In my application I have two screens, first screen measures 800 * 600
and second screen measures 800 * 950.
I have set width and height in html to be 100%.
On running the swf the first screen comes centred but when I move to
next screen it is cropped. I cannot see the bottom half of the image.
Ideally, I was expecting a scroll bar to scroll the whole movieclip. I tried
couple of things like setting the html height to 950 but
in that case I am seeing a scroll bar for both the screens. It seems the
html is taking same height for both the screens.

I was searching internet for this and the one solution i got was to use
external interface to change html height when the screen change occurs.
Is this the only way? Please provide your opinions on this.

Thanks,
Rohit
___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Nathan Mynarcik
Interactive Web Developer
[email protected]
254.749.2525
www.mynarcik.com

___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Scroll Bars not coming on increase of movie clipheight

2010-02-19 Thread Nathan Mynarcik
Hey Rohit,

I believe you are correct. ExternalInterface will allow you to communicate to 
the HTML javascript function that in turn can change the size of the flash 
area.  


--Original Message--
From: Rohit Sharma
Sender: [email protected]
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: [Flashcoders] Scroll Bars not coming on increase of movie clipheight
Sent: Feb 19, 2010 7:08 AM

Hello Everyone,

In my application I have two screens, first screen measures 800 * 600
and second screen measures 800 * 950.
I have set width and height in html to be 100%.
On running the swf the first screen comes centred but when I move to
next screen it is cropped. I cannot see the bottom half of the image.
Ideally, I was expecting a scroll bar to scroll the whole movieclip. I tried
couple of things like setting the html height to 950 but
in that case I am seeing a scroll bar for both the screens. It seems the
html is taking same height for both the screens.

I was searching internet for this and the one solution i got was to use
external interface to change html height when the screen change occurs.
Is this the only way? Please provide your opinions on this.

Thanks,
Rohit
___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Nathan Mynarcik
Interactive Web Developer
[email protected]
254.749.2525
www.mynarcik.com

___
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders