• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to make the mouse curser navigate through a flash website and...

Guest
Feb 18, 2010 Feb 18, 2010

Copy link to clipboard

Copied

...resize itself based upon the users screen resolution...

Hi Everyone!!

I've seen a really cool flash website and im trying to incorporate some of its features into my own website. It resizes its flash file depending on your screen resolution and it uses the mouse curser to navigate in all four directions around the site... it can be found in the link below...

http://www.admediastudio.com/

Does anyone know how i can make my flash file fill the screen, and secondly how to navigate the flash file using the mouse?

Help solving this would be greatly appreciated!!

TOPICS
ActionScript

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 18, 2010 Feb 18, 2010

Copy link to clipboard

Copied

You can easily make the flash fill the whole browser by using Flash's Publish Settings in File menu. In the Format tab, check HTML then in HTML tab, pick Percent for Dimensions box and No Scale for Scale box. Flash will automatically generate the HTML script for you with AC_RunActiveContent.js that renders the SWF onto the whole browser's content space. The moving background is simply a large movieclip with its contents stretching far beyond the stage's bounding area that is constantly repositioned depending on your _xmouse/mouseX and _ymouse/mouseY position probably within the ENTER_FRAME/onEnterFrame or mouse move listener event.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 18, 2010 Feb 18, 2010

Copy link to clipboard

Copied

Hi Harry,

Thanks for the publish settings advice, I've managed to sort that now (however it does leave a border around the movie clip which I would ideally like to get rid of)

However im struggling with the mouse movement, have you any actual code I could refer to create the stage movement? Plus the readjusting code it needs to figure out how big the internet window is and readjust the x/y co-ordinates accordingly,

Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 18, 2010 Feb 18, 2010

Copy link to clipboard

Copied

Hi Everyone,

Just in case anyone else runs into this problem here is the solution that i've managed to piece together,

I have a movie clip twice the size of the stage, the movie clip is called bg_mc, here is my actionscript...

bg_mc.addEventListener(Event.ENTER_FRAME, mouseMoveHandler);

function mouseMoveHandler(event):void

{

var cursorX = stage.stageWidth - mouseX;
bg_mc.x -= dx / 5;

}

this action script tells the movieclip to move left and right depending on where the users mouse pointer moves. (it also adds a slight delay to make it look like tweening)

I then published this in Flash using the publish settings shown in the reply above.

Then i went into dreamweaver and removed the margins in the html file

Now the flash file will resize to any screen resolution and will allow the user to move the MC left / right across the screen depending on where the mouse pointer is,

I hope this is helpful,

Ben

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

LATEST

An error comes up asking what dx is in your code.  Any help would be appreciated

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines