ActionScript 3.0 :: Get Window Size And Call Correct Photo?
Dec 8, 2009
I envision a series of photo gallery sites with certain elements that do not scale (thumbnails) and certain elements that do (the big pictures). Hopefully these big pictures will scale to be as big as possible within the available space in the browser window, but I don't want them floating over. I would like to know if the flash swf can "measure" the size of the browser window, then call the server to have the correct size JPEGs sent to flash to be displayed. That way I'm not getting a 2000 pixel JPEG for someone with a 1024x768 browser window. Dynamic scaling of bitmaps seems possible as of flash 8, but I would like to be able to measure windows to load a JPEG closer to the correct size for 2 reasons:
1. It seems like maybe it would load faster if I'm only sending the correct size JPEG to the browser, and not something significantly larger
2. It seems like once JPEGs have been scaled to less than 50% of their size in Flash, they tend to exhibit anti-aliasing artifacts that are undesirable.
It won't be me doing the programming, but I like to have some sense of what the possibilities are and I try to speak at least a little of the language of the programmers.
I'm working on a slideshow where I'm calling in photos from an xml file. How do I tell AS to resize the stage according to photo dimensions? Would I need to list the dimensions in the xml file? If so, how would I pull that into the fla file with AS?
I am trying to build a flash that auto-adjust its size to the browser window size, while leaving the content of the flash itself top-centered in the screen.I have found this solution [URL].. on How to keep centered stuff in this exact case so i am pretty confident i will be able to adjust that script to do what i want.
Now my problem is that if i put my content inside the movie-clip (centerrectangle) with all the animation require, link and other stuff, the movieclip (center rectangle ) never have the exact same center, thus making the script go wild trying to always adjust the location to the variable size of the movie clip.
I am trying to build a flash that auto-adjust its size to the browser window size, while leaving the content of the flash itself top-centered in the screen.
I have found this solution [url].. on How to keep centered stuff in this exact case so i am pretty confident i will be able to adjust that script to do what i want.
Now my problem is that if i put my content inside the movie-clip (centerrectangle) with all the animation require, link and other stuff, the movieclip (center rectangle ) never have the exact same center, thus making the script go wild trying to always adjust the location to the variable size of the movie clip...
I need it to stay exactly at the same position whatever the size of the movie-clip. [code]...
Im looking to make the flash file dynamic so that when someone changes the window size the flash file expands with it and some of the items contained move also.
I have a background image at 720x576px. My flash document is also set to the same. When I import my graphic and drag it onto the stage it is a completely different size?
This means I have to re-size using the free transform tool, and as I have to re-size many images for different movies that have to be exact, what is the best way to re-size them? Should my imported image not fit the stage size exactly without re-sizing at all?
I get the alert but I can't get the lightbox window to display. When my as code makes the ExternalInterface call I get what looks like a page refresh and a blank browser window.
i've made a flash movie in res 600 * 300, now i want to keep this res don't want the user to be able to expand the browser window or change the res or anything how do i do this?
I have a movieclip that i want to move when i push the left and right keys, which i have working however it when i embed this swf file into a web page the movieclip object will not stay within the stage size i set, in other words the longer i hold left the further along the web page it moves. Does anyone know a way other than [SWF(width="500", height="500", frameRate="30", backgroundColor="#FFFFFF")]
I also tried cropping the moving movieclip which did not help it just moved the smaller movieclip all over the screen in the same way.
I already set if conditions to stop the movieclip going out of bounds but it only seems to work within adobe flash player
if for example I'm creating a scene with falling snowflakes. In the movieclip is there a way of correctly knowing which area of the main scene you're working in? Or is it just a case of creating the movie, then returning to your scene and placing in where it's appropriate?
i have a list of pics, inside the swf file, what i want is when i press the button of any pic, to open new window "JavaScript" i think, but i want the window size the same size of the pic when viewed.
Im sitting here with a project that i feel i have come a long way with (found some very usefull rescources). But i am stuck now and need some guideance in short terms what i am doing is a project where users can take a snapshot of them selves by using their webcams, and then save this picture.
This is all going ok, but when i save the picture its not the same size as the webcam picture. From what i can tell there is something going wrong with the bitmap creation process, and i cant seem to figure out how to add a field that i can toss the picture into like i have done with the video. (its using addchild(bitmap) now and that just adds a small picture at a given x & y, but i cant control size of it. And the saved pictures im getting are the size of the video area, but only 1/8th is filled with the picture, rest is just white..
I want to put a movieclip with tools at the bottom of the window in the center with tools icons, it should have fixed posiiton so that user can scroll the main window having it always on prompt. I think I need the browser window size properties to do somenthing as this. Is there a way to get them?
I'm a newbie with AS2....and i wanted to learn to create a photo gallery that scrolls right or left, and that when you click on the photo it becomes bigger.Well I found a tutorial from a site. The only thing is that... when I built it and applied it to my project it does not work:The issue is that it takes over the main page, even though is in its own swf file....(It's part of a flash website, where each page is loaded separately...in this case this AS is in one page (portfolio) and when it gets loaded in the main page...the AS acts upon the "root"...I really don't know how to change the script to only act upon the native swf file. I'm using a loader component to load the external pages...not sure if this is what's causing the issue? :roll: Also, aside from all the photos appearing across the entire horizontal part of the page(they do get to scroll), but when you click on the photo ..it does enlarge but it freezes the whole page. I would like for this action to only be constrain to the size of the page, which is a different size than the one of main page, and to be able to be clickable...I know this might sound confusing... supply a url...to explain things better! In the mean time here is the code....
I tried the Photo Gallery with XML tutorial and i must say its great.To the point now, i would like to know if its possible to click on the image or a zoom button to have a popup with a larger version of the shown image.I guess you can add the thread in the xml.Now the problem is that i m just starting with both AS and XML so i can understand what to put in the URL's place so it can find the right photo.
Based on the Photo Gallery using XML and Flash tutorial found here:I�m having trouble with loading thumbnail images of various sizes which overlap if they are smaller than the previous image.The specific line that causes this is target_mc._x = hit_left._x+(target_mc._width+5)*k;I�ve tried all sorts of things with the closest being the following which put the images in the right size, but with the omission of �k� their order is backwardstarget_mc._x = (thumbnail_mc._width+5);Here is the full function block as per the tutorial
I have a flash site with 10 different tabs/sections with a stage size of 1200 x 1372. The final tab of the site contains a photo gallery, which I would like to have a different stage size and just fit the browser screen as it loads an external SWF which auto fits to the screen. At the moment, it auto fits the stage size meaning the bottom half of the photos don't show. How I can just alter the last page?
I found this really neat photo gallery on flashkit but there is no support or readme included. Hoping one of you actionscript gurus can sort through the AS and how to size this thing.. the AS code does have comments but I am not a coder. I'd like to make the image window smaller and the overall movie smaller. 325x325 or so.
I just pulled together a picture gallery, where the pictures simply scroll across the screen using arrows. I used the template from [URL] The problem is that when I added my own pictures, the graphic symbol was obviously a different size from the original template. So when the images scroll they should stop at a certain point as to not show any empty space. I changed the values that i guessed were the ones setting up where the graphic has to stop at, but it doesnt seem to be doing anything. The code below is the only script of any importance, at least that I know of. The other stuff just points to targets and gotoandplay stuff.
I'm working on making a site with an xml photo gallery with thumbnails. Right now, I have the gallery working, but I want to add an effect from this site: [URL] When the photos load, the layout resizes according to the photo size. How can I do something like this?
i want to create a flash website where the whole browser window is filled with a background image/photo which resizes proportionally when the browser window is resized. Has to be using as2.URL...
I'm currently working on a website design. The idea is a big chromakeyed interactive video in Flash. The size of the video is 1080 (width) x 1500 (height) pixels.I've exported the video in After Effects with the standard settings for flash (File>Export>Adobe Flash Player(SWF)). Now when I import the video in Flash and preview the file, the video plays in a slower speed and it's not playing smooth at all...Is the video too big? Is there a maximum video-size to keep the video running correct in Flash? Is it something else that causes this problem..?
just another CS4 newbie in a panic about the "new skool" tweening. I'm sure that I'm going to absolutely love it once it all sinks in, but at the moment, there are a few things that strike me as odd and I'm looking for guidance... Something I noticed last night that was different in terms of workflow was animating consecutive objects. Imagine the following simple storyboard: - a photo appears on the screen and gradually grows in size while fading out - after that photo has completely faded out, a new photo appears on the screen and grows in size while fading out.
Now, "old skool" I would have economized my timeline real-estate by having both of these images on the same layer. Since they are not visible at the same time, you can clear (delete) the first image and drop in the second image and everything is peachy. I found that this was not the case in CS4. Here's what happens AFAICR: - import first image to stage. it appears in a layer
I just finished a simple music player... For testing purposes. I upload it in the following address:http:[url]....with 10 music songs that I had recorded from radio stations(added the last 2 twice for testing).The problem is that when a song has totally loaded, stop action taken needs about 1 second to be applied!I.e. When I press "STOP", the sound continue to play for 1 sec before stop. When I push "pause" it takes one second for the music to stop!
However when using resume (second time pause) the sound starts instantly! Thus I guess there is an issue with stop()function of the SoundChannel object that I am using to stop the sound. Also notice that when unpause the music, it continue ~one second before the last sound - which means that I saved the soundChannel.position number (and also call soundChannel.stop()) in correct time, but it didn't stop immediately - bug!?
This only happens when the application runs through a browser(plugin v. 10) - programmed in CS3.
PS1. Notice that ,this also happens when I change Volume too. Thus because Stop and Volume are parts of SoundChannel, I guess there might be a bug with SoundChannel in online plugins..... :/
PS2. Notice that ,this also happens when I close the browser (firefox). Even if browser is closed the music continue for 1 sec the same way as when pressing stop!.. Thus I guess it's flash bug!...
i want to create a photo album. i've created a folder and put pics inside the folder. is there any scripts that can import/call the pics(all are .jpg) to the stage while the projector(movie) is playing?