Resizing the swf inside a container
Hi Guys,
I am using a dashboard inside a vbox. I have integrated my
dashboard into my main application (i.e. I have two different swfs,
one of my main application and other of dashboard). Now when I
login into my application by reducing the size of the browser, the
pods inside the dashboard appears very small. Now when I increase
the size of the browser the size of the pods remains small. Now my
requirement is that the size of the pods should also get increased
along with the size of the browser. Please help me in this regard.
Thanks,
Nirmal Kumar Bhogadi
Hi mersec,
That's Ok, I fixed the code like below, you could refer to.
Private Sub picturebox1_mouseup(sender As Object, ByVal e As MouseEventArgs) Handles PictureBox1.MouseUp
'Allows picture box to be dragged inside container
'Top and Left sides of picturebox1 will not exceed point 0,0
'This will stop any "grey space" from appearing outside these edges.
pbLoc.X = (PictureBox1.Location.X + (e.X - a))
pbLoc.Y = (PictureBox1.Location.Y + (e.Y - b))
If pbLoc.X + screenshot.Width > 0 And pbLoc.Y + screenshot.Height > 0 Then
If pbLoc.X > 0 Then pbLoc.X = 0
If pbLoc.Y > 0 Then pbLoc.Y = 0
If pbLoc.X + screenshot.Width - ClientSize.Width < 0 Then pbLoc.X = ClientSize.Width - screenshot.Width
If pbLoc.Y + screenshot.Height - ClientSize.Height < 0 Then pbLoc.Y = ClientSize.Height - screenshot.Height
PictureBox1.Location = New Point(pbLoc.X, pbLoc.Y)
Else
'else recovery the location
pbLoc.X = PictureBox1.Location.X
pbLoc.Y = PictureBox1.Location.Y
End If
End Sub
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
Load and resize a SWF inside a MC
Hi,
I'm using AS2 to load an SWF inside an MC. The MC measures
800x600, while the SWF (which can vary in size) measures in this
case 14x60, even though, looking at it, it seems to be about half
the size of the hosting MC. This makes me think that the dimension
scales are different. I'm loading the SWF using MovieClipLoader and
I'd like to resize it so that it fits as proportionally snug as
possible within the MC. How can I do this? If I try to resize the
SWF to the MC's dimensions, it become way too large and goes off
screen. If instead I try to rescale the hosting MC to fit around
the SWF, the SWF itself rescales as well. I'm going nuts! How can
accomplish this?
Thank you,
TatianaTo make things simple, I'd like to take an existing SWF (the
picture) and load it into a FIXED SIZED MC (the frame) and I'd like
to rescale the SWF so that it fits perfectly into the frame.
By all means, I know that what you said should work and I
admit my inexperience with AS2, but somehow the SWF's I'm loading
in, have scales that are totally different with respect to my
Stage. I even tried loading the SWF directly onto the stage and
then I loaded the frame separately onto the stage and tried to
resize it to the SWF's _width and _height. The frame became a tiny
dot on the screen, while the SWF filled half of my Stage.
Thanks again for your help. -
Resize the swf in an elastic div
Hi, i want to explain my problem:
I've an elastic css layout, and there is a div hat countains
my swf, this div has height and width variables, that is, the
dimension of the div is not fixed, height and width are not in px
but in %.
Now, I want to know how can I do to have the swf resizabe
100% height and 100% width in the div? If I give 100% to height and
width in the embed tag the result it's that the swf don't resize it
self, but there are white spaces in the div (if I click with the dx
buttom of the mouse on th white spaces I see the traditioal flash
menù).
Someone says to me that the solution is to use an
actionscript with a stage object.
I'm not an expert of flash, someone can help me with this
problem?
Thanks!You cannot have static content above interactive content.
-
Fscommand when the swf inside html table
in the html file , when I put the swf file inside a table,
the fscommands does not work.
how do i make it work?
should i make any changes in the html? ?
notice: when the swf is out side the table , it is working
fine.Found the solution to the problem.
wrapped the entire HTML page till the JSF component ( panelGrid) under <f:verbatim>.
something like this
<f:verbatim>
<table>
<tr> <td>...</td>
<td>
</f:verbatim>
<h:panelGrid> ... </h:panelGrid>
<f:verbatim>
</td>
</table>
</f:verbatim> -
Safari is resizing the swf file
i go to File => Open => swf
it opens just fine, but then when i resize the window
everything grows or shrinks with the window.
what's that about?Seth Prince;
That is what happens when you open a "bare" swf--embed the
swf in an
html page and set the size in pixels. See flash's publish
feature... -Tom
Unger -
I've finished my flash site using a resolution of 1024x768: my professor wasn't so happy of a resolution so "high" (even if today is something like standard) since somebody might still have an old monitor with low res.
Since I really don't want to get a bad vote I wanted to change the resolution to 1000x550 because with that res a 1024x768 monitor still can see everything: then I've exported my .swf file and then into the .HTML file I've changed the width and height fields.
Is this a "correct" operation? There could be any problem??
All tips are welcome!Select everything on every layer and with the "edit multiple frames" option turned on, scale your content proportionately to 800x600. Don't forget to select everything on the scene before scaling, just checking "edit multiple frames" wouldn't be enough
Emil Georgiev - Flash & Web Design -
Resizing or moving an opacity mask along with the items inside it
I'm trying to resize a opacity mask by doing
transMaskItem.resize(
10, //scaleX,
10, //scaleY,
true, //[,changePositions]
true, //[,changeFillPatterns]
true, //[,changeFillGradients]
true, //[,changeStrokePattern]
0.1, //[,changeLineWidths]
This resizes the item, but it does not resize the item inside it. I tried similar command with the translation command
transMaskItem.translate(
100, //([deltaX]
100. //[,deltaY]
True, //[,transformObjects]
True, //[,transformFillPatterns]
True, //[,transformFillGradients]
True, //[,transformStrokePatterns])
and similar thing happened. The item gets moved, but the object inside it doesn't.
How do I resize or translate an opacity mask along with the items inside it?I see...it seems to be a bug, the actual mask gets ignored. Probably to be consistent with the user interface, you can not select the mask with the mouse either.
maybe someone else has found a way to work with Opacity Masks, I haven't.
as a side note, there's no need to select the objects in order to size them or move them, you can just reference them. Also, there's no "Selected" object, change that to "selection". -
I have imported an SWF into a FLA project library and have
dragged it onto a frame in my project. I am trying to resize the
SWF to about 1/4 of its original size to make it fit correctly in
the new project. I cannot figure out how to resize the SWF. I have
tried the properties sheet, but it won't take different width and
height parameters. No object boundaries appear (all I have is a dot
to select the object) so I cannot use the transform tool to scale
it. Any ideas?I did this recently where I had a backdrop clip that I wanted
to serve as a 'screen' for jpgs I loaded in. I wanted them to
resize to the full extent of the background clip and maintain their
aspect ratio. The backdrop clip could have different dimensions at
different points in time as well... anyhow this should work with
swfs same as jpegs.
So I'll explain it in my context as I don't know exactly
yours (sorry this might sound a bit complicated because of that).
#1 If your holderclip is called
imageHolder and it contains a single clip inside at location
0,0 called
imageBackdrop
#2 You create an emptyMovieClip inside imageHolder and use it
to load your swf into using a Loader with a listener
#3 you have some code similar to this in your onLoadInit
event for the Loader (onLoadInit lets you initialise things like
size location etc before it displays)
If you can do something like that then I think you should be
on the right track for what I think you want to do. -
Hello,
I am trying to create a masthead with a SWF inside of it.
So far I try this:
1.- Put the swf inside dist/images/equipo.swf
2.- in the HeaderiView.jsp this code:
<%
String swfUrl= componentRequest.getWebResourcePath()+"/images/equipo.swf";
%>
<TD>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="800" height="200" id="equipo" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="<%=swfUrl%>"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="#ffffff"/>
<embed src="<%=swfUrl%>" quality="high" bgcolor="#ffffff" width="800" height="200" name="equipo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>
</object>
</TD>
When I do preview of this iView, I got the space for my swf but all blank, this means, the swf is not running.
Any ideas?
Regards,
Orlando Covault.Hi Orlando,
could you try the same code for a normal image file? Just to check whether its a problem with the SWF or with location & path of the image. If the path does not work properly for normal image too you can use the following code to access an image or SWF.
IResource resource = request.getResource("image","images/myImage.gif").getResourceInformation().getURL(request);
Let us know whether this helps or not.
Regards,
Shubho -
Resizing the viewable screen in realation to content
I'm making a flash document that will take in a photo and
then allow the user to resize it. I dont want to force users to put
in a specific sized image so i'd like to be able to resize the swf
in relation to the size of the image that has been loaded. This
will allow any user to put in any sized image.
Is this possible?
thanks in advance
Greg ConnIs this the same posting as this one from earlier? If you've contacted NI and they said it's a problem, I supposed they'll submit it to R&D.
J.R. Allen -
I'm wondering if there is a way where I can quickly resize a text box to fit exactly around the text inside, so pretty much the smallest the text box can go without being too small to fit the text? I know you can do this manually with the selection tool, but is there a button/command that automatically does this in one go?
ThanksTry this script. Save the page as .jsx the the "Presets>Scripts" AI folder. When you restart AI it will appear in the "Scripts" menu. Select the text block and run the script.
Thanks to Nathaniel Vaughn KELSO for the script.
http://kelsocartography.com/scripts/scripts/nvkelso/FitToTextContent_v2.jsx -
Having stopped audio with a swf inside a sidelet can someone create a swf that will resume the audio
Ok, rick is going to post the fla of this file and I will
post the swf. Basically this is all about having a slide that has
audio running all the way through and enabling the user to roll
over a sidelet and have the video and audio stop playback.
At present, the max you can achieve is, to stop video. The
audio keeps going and of course everything gets out of
sync. Rick has create a swf that you input into a sidelet (
after having imported your image or video ) which stops the audio.
Fantasitc. Unfortunatly he was not successful in creating a swf
that will resume the audio.
So there is the mission. To create something that will resume
the audio, be it a swf inside the sidelet or something else.Hi there paul. Am I right in thinking that your code will
mute the audio. In my situation this would cause problems becasue
you would roll over the sidelet - the audio would go silent and
when you rolled off, or resumed the audio, it would have been
playing so again the video and audio will be out of sync.
Rick - rather than another swf which would activate the audio
and video when you roll off the sidelet ( while that is the perfect
solution ) what about looking at a button the user can press to
resume things, maybe Im wrong but that sounds a little easier.
( however for all those reading this that is not really the
solution I am looking for, what Im looking for is the above
solution where you can just roll off and on and so on ) -
How to display PDF file, inside the SWF file or flash exe file
I have create the application for Employee details using flash actionscript 3.0
This application is to view the organization employee details, iam using the tree component in this application,
the tree component is to get the dada via xml file, this xml file save in the remote server ,
I display the PDF file inside the swf file to using " StageWebView" class . Then i goto Publish Setting to change the player Adobe Air 2.6 and run the flash file using
ctr-l + Enter . It is work correctly the PDF file is Displayed inside the Swf Output. But I Publish this file to exe . then i run the exe it is not working .
The application is run The xml data is onely get and displayed the Tree component then i click the tree item employee name the xml data in not display and the pdf file is not open .
Pls Help...................hi i need to display the pdf file inside the swf file or flash exe file .
I use the navigateToURL class this is open the pdf file on the browser. I want to display the pdf file in the swf window .
Please suggest. -
How resize the image after drag drop according to container
Hi,
I have a image which can be drag drop in different size of containers. After drop i want to resize the image by maintaining the aspect ratio according to the container in which it is going to be drop. I will be very thankful for your help.thank you, brother
i will try it see if it is work
whatever, i will report the result later -
I'm wondering if there is a way where I can quickly resize a text box to fit exactly around the text inside, so pretty much the smallest the text box can go without being too small to fit the text? I know you can do this manually with the selection tool, but is there a button/command that automatically does this in one go?
ThanksThe short answer is No. But I see that Ray has given you an option.
Maybe you are looking for
-
Does iOS 7 have a way to delete files in iTunes from my mobile device? And GOD the keyboard is BAD BAD BAD!!!
-
Unable to connect servlet on web server
Hi all, I have wrote the following program to connect to the servlet to the web server: public class HTTPTest public HTTPTest() { public static void main(String[] args) { HTTPTest httptest = new HTTPTest(); httptest.sendHTTP(); pu
-
Question Recently, whenever I try to open Firefox, I get a dialog box: Exc in ev handl: TypeError: brw is undefined (JavaScript Application). Firefox is definitely my default browser. After clicking OK Firefox opens.
-
Control파일 관련 에러 인데 어떻게 해결해야 되나요?
밤에 저희쪽 DB 서버에 문제가 있어서 RAC로 구성이 되어 있는데 DB가 죽었습니다. 오전에 와서 alert_log를 확인해 보니까.. Error: Controlfile sequence number in file header is different from the one in memory Please check that the correct mount optionsare used if controlfile is located on NFS 위와
-
Does Mac OS X Server 10.6 Auto Configure a Connected Airport Basestation?
I just finished an install of Snow Leopard Server on a new Mac Mini. A 1TB Airport Time Capsule is directly connected to the Mini via Ethernet (and our cable internet modem is also directly connected via Ethernet to the Time Capsule). I have a static