Display flash window centre screen

This is a discussion on "Display flash window centre screen" within the Flash & Multimedia Forum section. This forum, and the thread "Display flash window centre screen are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 4th, 2006, 16:01
gbk gbk is offline
New Member
Join Date: Oct 2006
Location: UK
Age: 25
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Display flash window centre screen

Hi any chance any1 can help

Im making a CD that loads up a flash projecter file, problem is the window is partly off screen when it is diplayed, i need to know how i can get it to display the flash projector window centre of screen on which ever computer the CD is inserted in

Im sure its a simple bit of action script, but ive spent hours and cant work it out , im pretty new to flash

cheers

your feedback would be much appreciated
Reply With Quote

  #2 (permalink)  
Old Oct 4th, 2006, 17:34
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Smile Re: Display flash window centre screen

Can't you just use an index.html file to accomplish this same task? If this is going to be put on to a CD you could just use the <center> </center> tag around the flash document? If this is not going to work for you, you could use this action script code...


Code: Select all
// Create a function for the event you want to listen for
stageListener.onResize = function ()
{
    // Get the width and height of the stage 
    // & multiply by half
var stageXCenter = Stage.width * .5;
    var stageYCenter = Stage.height * .5;

    // Offset the center point with half of 
// the clip width and height 
// (you can also use the -= operator and simply this)
stageXCenter = stageXCenter  - (myClip._width * .5);
    stageYCenter = stageYCenter  - (myClip._height * .5);

    // place the clip with the offset
    myClip._x = stageXCenter;
    myClip._y = stageYCenter;
}
I hope this helps, and or accomplishes the task you needed it too. If not just reply with more detail and I will try again. Thanks!!
Reply With Quote
  #3 (permalink)  
Old Oct 4th, 2006, 19:14
gbk gbk is offline
New Member
Join Date: Oct 2006
Location: UK
Age: 25
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Display flash window centre screen

Hi mate

I tried the script but it doesnt seem to be working,

Have you tested it out? Its a windows projector.exe im trying to get centre of my screen

Any chance you can email me an example file to osmaniz@coventry.ac.uk

will be much appreciated
Reply With Quote
  #4 (permalink)  
Old Oct 4th, 2006, 19:28
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: Display flash window centre screen

Sorry that was my only ideal. Maybe you can find the answer elsewhere.
Reply With Quote
  #5 (permalink)  
Old Oct 4th, 2006, 19:29
gbk gbk is offline
New Member
Join Date: Oct 2006
Location: UK
Age: 25
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Re: Display flash window centre screen

Ok thanks for your help
Reply With Quote
  #6 (permalink)  
Old Oct 5th, 2006, 03:39
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: Display flash window centre screen

No Problem!!
Reply With Quote
Reply

Tags
window, screen, flash, display, center exe

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display results of a submit form (getting url) in same window?? jahphill JavaScript Forum 12 Nov 28th, 2007 23:18
HTML to display data on plasma screen JTWork Web Page Design 6 Dec 21st, 2006 15:37
css to centre flash onlinegamesplayer Web Page Design 6 May 15th, 2006 09:40
Rollover or Flash Screen Geeky Girl Flash & Multimedia Forum 5 Nov 19th, 2005 19:32
How to make pop-up window fit client's screen maurice JavaScript Forum 3 Mar 15th, 2005 17:54


All times are GMT. The time now is 20:17.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43