PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Problem with Ctrl + Enter Preview in Flash CS4 & 5
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Problem with Ctrl + Enter Preview in Flash CS4 & 5

  1. #1
    rahrid
    Join Date
    Oct 2011
    Posts
    7

    Problem with Ctrl + Enter Preview in Flash CS4 & 5

    Hi guys. I got a problem here. I created a page which the size is 1200 x 1700. When i press Ctrl + Enter, it does not preview the whole 1200 x 1700 screen. Instead, it will only preview the middle of the page. Don't know what is wrong. It's supposed to preview it all, to the extent that i can scroll down from the top of the page to the bottom of the page. But when it preview it, it only shows the middle of page, and i cannot scroll up or down to view the rest.

    I realized that if i use 800 x 600 screen size, i would be able to see all, but when i use for example, 600 x 800 where the height is longer, it won't show all.

    Please how can i solve that problem? I want to see all the works i have done.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    It's because the size is larger than your screen resolution, and therefore resizes itself to fit your screen, and hence doesn't show everything. Use this code on your first frame, to see everything:

    Actionscript Code:
    Stage.scaleMode = "scale";

    OR

    Actionscript Code:
    Stage.scaleMode = "exactFit";

    and then preview your Movie. If you still want its original size, publish its HTML page (File->Publish Settings... and then tick HTML, and press Publish, and check your folder) and open it to see everything, though it may still be bigger than your screen (then press F11 to hide browser toolbars and stuff) - hope this helps
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    rahrid
    Join Date
    Oct 2011
    Posts
    7

    Nig13.

    Nig 13. Thanks. I really appreciate. The suggestion you gave worked. Good. I put the code in the first frame and it showed the exact whole page. But when i published it to html, it's still showing only half of the page and not like the full screen, even when i press F11

    I'm just wondering, what about all those flash sites that are of that same heights or even higher, how did they go about it, that i can see their sites in my laptop with still the same resolution, which is not working for my own file when trying to view it like that.

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Well, they set the embeded SWF file in the html file to fit 100% of the window, and then alot of complicated code to make everything fit in any kind of resolution, which is the hardest part!

    Fit to screen can be done by finding the Stage's width and height, and then dividing, multiplying, substracting and adding to it, to give the items in your flash file, fixed positions, regardless of the resolution, and this can be difficult! However, if you want to achieve it, you can find the stage's width and height by using this:

    Actionscript Code:
    stageHeight = Stage.width;
    stageWidth = Stage.height;

    Now, you have 2 variables which contain the stage's height and width, and the stage's height and width will change when resizing the window!

    Hope this helps you enough to get started
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    rahrid
    Join Date
    Oct 2011
    Posts
    7
    Thanks Nig 13. That helps.

  6. #6
    rahrid
    Join Date
    Oct 2011
    Posts
    7
    But i got another problem. Can you help me out with it?

    The website i'm creating in flash. When i took it to Dreamweaver to set its arrangements and all that kind of stuff. It works and i was able to view it in HTML in the browser. The same linking i did in flash also works and it's working in the browser. But there is a problem.

    I created the website in flash with five menus. I linked them all together. They are all working fine. So, i took the swf file to dreamweaver and saved it as Html. I opened the HTML file in the browser, and it worked fine. I could scroll up and down like a real site, When i click on a menu, it shows me the page as i have linked it in flash, but the problem is that while as a result of showing me that page, it creates white background around that page that i moved to. When i checked other menus, too. It was the same. I'm seeing white colour around the page, which i didn't put there at all in flash. The question is where did that white come from and what can i do to get it away and behave normal.

    Thanks.

  7. #7
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    I have found a better solution, you can use a Stage listener, code that executes when the stage is resized, and then set elements to desired fixed positions!

    Example:

    Actionscript Code:
    Stage.align = "TL"; // this is very important, otherwise the resizing will be messed up

    function resizeItems(){
        mc._x = Stage.width/2;
        mc._y = Stage.height/2;
        mc._width = Stage.width*0.9;
        mc._height = Stage.height*0.5;
    }

    resizeItems();

    resizeListener = new Object();
    resizeListener.onResize = function(){
        resizeItems();
    }
    Stage.addListener(resizeListener);

    The first code is the most important one, the one that aligns the Stage to Top Left, and this way, the resizing will work perfectly. What I did in the example, was to make a function, for a movieclip with the instance name, mc, to be the half of Width and half of Height of the Stage, giving us the center point, and mc's X and Y will be set to that whenever the function is called. The last two codes in the function, makes the Width and Height of mc, fixed. Then, I call that function, to make Flash make them move to the desired positions when the movie first starts, otherwise you'd have to do it manually, which would be painful! The next step is what makes this possible, we make an object, a listener, which will execute codes when something happens, and Flash has a built in function for when the Stage is resized, and if it's resized, we call the function to make them move to their fixed places with the Stage's new size when on resize!

    To test the example above, simply draw anything on stage, convert it to a movieclip, and give it the instance name, mc - and then copy and paste that code on your first frame of the movie, and try to resize the stage

    Hope this helps, and also hope that this is more acceptable than my previous method
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  8. #8
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    I'm seeing white colour around the page, which i didn't put there at all in flash. The question is where did that white come from and what can i do to get it away and behave normal.
    That's probably the stage. The white in your Flash, the stage boundaries, it won't magically disappear, lol :P

    CHECK THIS TUTORIAL - scroll down to Using the Properties panel in Dreamweaver (there's also a video tutorial there)

    Hope this helps
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  9. #9
    rahrid
    Join Date
    Oct 2011
    Posts
    7
    Yeah. It helps. Really helps. And i was able to get that white thing out of there. Thanks. You're really great.

    Now, there is another thing again. I'll explain it like this for you to understand better.

    When you go to your light switch in the room, and put it off and immediately before 1 second finishes, you put it on again. I mean, like you go to the switch, press the switch to off and on again. You know how the light of the room will act. It will you know show little dark just under that one second, and light back. Just tiny dark, right. IT WOULD BLINK.

    The website that is in question here is behaving like that also. Putting on and off by itself after every 10 seconds when it is on the browser. It's blinking after 10 seconds. But it is not going to another page, and nobody press anything. Just when i open the site, 10 seconds, it automatically blink. Another 10 seconds, it blink again. And like that. Till eternity LOL.
    Yeah. I think I got something. I got where the problems lies. It is the slide show in the site. The slide show is like showing four wallpapers one after the other. When it finishes showing all the four, it starts again from the first one. That is when it blinks. What can I do to make it move smoothly to the first one without blinking. You know that if I put stop for the actionscript at the end of the fourth image, it would not go back to the first to continue sliding.

    What can i do to rectify that?

    Another thing is that all the pages in the site were created with the same size of width which is 800 but some of the pages are different in the length.
    The thing is when it is in the browser, and I click on another menu which has been linked, It shows the page but it decrease the menu’s size and reduce the page a little bit. But when I click again on all the menu, it doesn’t do like that. It stays normal. But for the first time, when I open the file in the browser. I click on another menu, it suddenly decrease the size of the font in all the menus and all the menu shift a little bit up, and also the page size is like reduced a bit.

    What’s this one again?

  10. #10
    rahrid
    Join Date
    Oct 2011
    Posts
    7
    Thanks for all your help. I got a solution to the last problem i told you. Don't worry again.

    Do you know how to make a website to scroll down to a particular place of the website automatically. Do you know how to do that in flash. When they click another page, i want them the page to open and scroll down automatically to the beginning of a particular text or article.

  11. #11
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Well, I'll have to see a preview of your website or FLA file, in order to think of a way, suitable for the structure of your website
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center