Flash / Actionscript URL Request Issue
Morning Smart Peoples.
So I have a dangerously rudimentry knowledge of Flash and Actionscript and the website I tend to is giving me issues.
We have a small Flash Movie on the site that cycles through 3 pictures and each picture links to the corresponding website when you click on it. (To view : http://www.bostonleather.com : Top Right Corner) I updated the links in the Actionscript, and changed the pictures (not my first time doing either), but this time it didn't work so well.
First time it cycles through, everything works as planned. After it loops however, all additional Mouse Event's link to the last URL in the movie.
Frame 1 Actions
play();
btn_inv.addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick (event:MouseEvent):void
var request = new URLRequest("http://www.kanoycommunications.com/");
navigateToURL(request,"_blank");
Other Frame Actions are identical to this minus the "play();" function naming and URL
Final Frame is simply
gotoAndPlay(1);
Thanks.
Marc
If you are assigning different event listeners to the same button then that could be your problem. You should only need to assign that listener once in frame 1. Similarly, you should only need to define the function in frame 1, but pull the request declaration out of the function and then assign it a new URLRequest value at the different point along the timeline...
Frame 1 Actions
play();
var request = new URLRequest("http://www.kanoycommunications.com/");
btn_inv.addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick (event:MouseEvent):void
navigateToURL(request,"_blank");
Frame elsewhere Actions
request = new URLRequest("http://www.someotherurl.com/");
Similar Messages
-
Air Application URL Path Issue
I am trying to invoke a content of the file which is in shared folder from Air application.
Version : Flash builder 4.5,Flex3.6 sdk and Air 2.7.
for this am using the below code..
var request:URLRequest = new URLRequest();
//request.url = ('file:///c:/params.txt'); - This is working fine
request.url = ('file:///172.20.188.25/Share/chk/Property/params.txt'); // its not working
trace("Unable to load URL: " + request);
var variables:URLLoader = new URLLoader();
variables.dataFormat = URLLoaderDataFormat.VARIABLES;
variables.addEventListener(Event.COMPLETE, completeHandler);
try
variables.load(request);
The same part of code ,I tried in Flex application is working .but in Air application its not working.
Its urgent requirement,If any one know the way to resolve this path issues.
Kindly let us know.
Thanks in Advance !!I tried in the following URL but no use ..
its throwing ioError and textError and stream error.
1.file:///172.20.188.25/Share/chk/Property/params.txt
2.http://172.20.188.25/Share/chk/Property/params.txt
3. //172.20.188.25/Share/chk/Property/params.txt
Is there any other solution for this issue ? -
I keep seeing large spikes in my swf trying to send a url request. But these only appear in Firefox in OSX. I haven't tested in windows. Chrome (pepper and regular) and safari both work fine. Also see large spikes when using extrnal interface. Any ideas on how to work with these and perhaps some best practices?
Function
Total Time (ms)
Sending URL requests
84
95%
URL request timestamp
URL request: <some_url>
URL request ID: 25
Function
Self Time (ms)
Total Time (ms)
ExternalInterface.call <static> (flash.external)
0
0%
97
100%
ExternalInterface._evalJS <static> (flash.external)
97
100%
97
100%
-nateMichael, thank you for your detailed answer. I accept your suggestion about the issue related to sandbox api in IE9. Reducing concurent requests helped and was necessary for smooth flow of my app. However I believe this is an issue that should be targeted on flash player level not app code... I will consider filing a bug
I strongly disagree with your conclusion:
At the end of the day, if you can only make 6 or so concurrent requests at the same time, it's pointless to try and send more - either reduce the number of requests (preferably), or wait for the first batch to finish before sending some more.
http://forums.adobe.com/message/5714849#5714849 ... 92 requests
http://www.adobe.com/cz/ 117 requests
http://facebook.com 200 requests
http://maps.bing.com 100 requests in fullscreen mode when zooming, all of them concurrent ... this is basicaly what my app does -
Working on a thesis project due soon... Created flash actionscript 3.0 swf for home page, text plus image, previews beautifully in Flash Publish, stored in my root folder, previews great when I open it in the root folder, dragged and dropped it into my dreamweaver code page, within a spry widget framework, size is perfect. and upon view in design or browsers or browser lab, I just get a nice empty white box. In design view, I see the F symbol and when I click play in properties, I get a message that says "Unable to find the plug in that handles this media type. Dreamweaver looks in both the "config/Plugins folder and the plug in folder for each o your installed browsers". I have Flash Professional CS 5. Reinstalled it just in case that was the issue with the plug in and didn't resolve the problem. Dreamweaver version is CS5. Using a template with spry widget panels. Before I inserted the swf, the preview in browsers and browser lab was fine on the spry widget and background. PC is windows, 32 bit, with ms office suite 2010 upgrade on it. Appreciate any advice.
my first trace on the hz position and vt position outputs but the trace for "scroll positions" and "new scroll positions" is not outputting.
i recieve this output when i click the 'next' and 'back' buttons within the menu9.SWF.
[Event type="iwannaresetscrolling" bubbles=true cancelable=false eventPhase=2]
does this seem right?
import fl.events.ScrollEvent;
aSp.setSize(600, 350);
function scrollListener(event:ScrollEvent):void {
trace("horizontalScPosition: " + aSp.horizontalScrollPosition +
", verticalScrollPosition = " + aSp.verticalScrollPosition);
aSp.addEventListener(ScrollEvent.SCROLL, scrollListener);
function completeListener(event:Event):void {
trace(event.target.source + " has completed loading.");
// Add listener.
aSp.addEventListener(Event.COMPLETE, completeListener);
aSp.addEventListener("main swf", scrollResetListener);
function scrollResetListener(event:Event):void {
trace("Scroll positions", aSp.horizontalScrollPosition,aSp.verticalScrollPosition)
aSp.horizontalScrollPosition = aSp.verticalScrollPosition = 0;
trace("New scroll positions", aSp.horizontalScrollPosition,aSp.verticalScrollPosition)
aSp.source = "menu9.swf"; -
New URL Request (_blank) Without Address or Scroll Bars Present
Can anybody please give me the AS3 code to open a new window (URL Request) without it displaying the address or scroll bars? I want to have a text link in a flash scene like "Click Here" that opens a new blank window (600 x 400) with a new URL without displaying any address or scroll bars. Is this possible? Any help would be greatly appreciated. Thanks.
flash.net.navigateToURL(new URLRequest("about:blank"))
-
Open url request from PopUpManager
Hi,
I have a function which opens a new browser window with the result of a URL request (an image). I wonder if I can do the same but with a window "embedded" in the flash application.
I saw there is a class called PopUpManager. I understood that I have to create a new component ("popup") with the data for the new window. The problem is that I don't know how to pass the result of the URL request to that popup component.
Is it possible at all? Is there any other alternative?
Regards,
ManoloHi there
Yep cool with the PopUpManager.centrePopUp.
As for saving an image. You can save graphics from Flex by specifiying a rectangular region you want to save. You can save the selected region out as a jpg or a png using the encoders. In the example below I have saved out an image.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.graphics.codec.JPEGEncoder;
import flash.utils.ByteArray;
private function saveImage():void {
var bitmapData:BitmapData = new BitmapData(myImage.contentWidth, myImage.contentHeight);
bitmapData.draw(myImage);
var jpeg:JPEGEncoder = new JPEGEncoder();
var byteArray:ByteArray = jpeg.encode(bitmapData);
var file:FileReference = new FileReference();
file.save(byteArray,'TestImage.jpg');
]]>
</mx:Script>
<mx:Image id="myImage" x="78" y="33" width="283" height="180" source="http://www.maniacworld.com/amazing-cars.jpg"/>
<mx:Button x="78" y="236" label="Button" click="saveImage()"/>
</mx:Application>
Note you need to be compiling for Flash PLayer 10 in your Flex compiler settings as that allow you to read and write local files.
Hope it helps
Andrew. -
Losing info after a & on a String url = request.getParameter("refurl");
Hi...
Wnen I am passing information.... like this....
http://127.0.0.1:8080/forumoracle/forum_login.jsp?refurl=http://127.0.0.1:8080/forumoracle/forum_view.jsp?catid=2&threadid=4
I seem to be losing the information after the amperstand.. and not sure why..
String url = request.getParameter("refurl");
So when I print out the url string.. I only get this...
http://127.0.0.1:8080/forumoracle/forum_view.jsp?catid=2You can't redirect to a new window from the server end
you have to make the decision at the client when you
click the link. All a web server does is receives a
request, and sends back a response.
The decision about where to display that response is
up to the browser. (ie does it replace current
content, put into a new window etc etc)
You can use the target attribute on links and forms to
specify it from your HTML page, but once the
link/button is clicked you are committed.While this is all true for JSP that doesn't care about the UI, JavaScripting makes it possible to open new windows, but it is lacking in some respects for my use. I am facing two issues:
a)how to give a URLEncoder.encode string to JavaScript's window.open() legibly, and
b) how to close a window opened with a JavaScript after a download of a file
In both instances, there is ergonomics. -
Invoking a method on an URL request?
i want to invoke a method of a class on an URL request,such that the method can navigate the control to number of other pages .
Implement a Filter.
-
Mac OSX: Flash CS3 Font Install Issues
Hi,
I have a Mac Powerbook G4 with OS X installed and Adobe CS3.
I've installed a font. The font works in Photoshop and Illustrator
but not in Flash CS3. Why? I've put the font in the Library/Fonts
folder and the User/Fonts folder and it still doesn't show up in
Flash. Apparently this is a problem for a number of people see
another forum here:
MAC
OSX: Flash CS3 Font Install Issues Forum
Please let me know what to do to fix this. I need to be able
to work with the font in all three applications Flash, Photoshop
and Illustrator.Hi davidd61713525,
Sorry for not getting back to you sooner.
Unfortunately, it looks like something is wrong with the file system and the installer can't see the root drive to install to. A Google search returns numerous results affecting various products and the recurring theme is that something is wrong with the disk. There are many recommendations from various sources, but nothing definitive.
Here's a similar thread over on the Apple forums:
Broken Installer Permissions | Apple Support Communities
And a similar older one:
http://forums.macrumors.com/showthread.php?t=1203509
I would try the following options:
Try using the PKG installer. This is used Mac SysAdmins to install Flash Player within their organization and uses a slightly different installer path, which may or may not work.
Some people have had success with disk and permissions repair some have not. You can try running a disk and permissions repair. After the disk and permissions repair is complete, reboot the system and try to install again using either the online installer (get.adobe.com/flashplayer) or the offline installer, posted at the bottom of the Installation problems | Flash Player | Mac page in the ‘Still having problems’ section.
If these options do not work, I'd reach out to Apple support to see if they have a suggestion. If you do find a resolution to this, please let me know. I'll be happy to share it with people that encounter the problem in the future.
Maria -
Hello all,
I am having a url rewriting issue where the first time someone accesses the website with a browser that has cookies enabled my jsp pages will still encode all of the URL's with the jsessionid. Which I believe should not happen unless cookies are disabled.
Why is this occuring?
Once the user goes to another page in the site or the second time they bring up the site in the same browser the jsessionid is not written to the URL links. This only happens on first access.
I am using Tomcat 5.5
response.encodeURL() to encode the links
Is this a container or programming error?
Thank you all very much for your time in reading this!Ok, thank you.
Based on this: http://www.sciabarra.com/fatwire/2011/04/17/improving-the-firstsiteii-url-assembler/
I think my approach would work if I remove the Asset API stuff from here and put them into a helper class, which would be then called from the wrapper JSP.
I'd rather not install 3rd-party extensions just for url rewriting, at least not yet... -
Hi,
I have found information through research about the URL structure for 'passing information between pages' using the p?f=110:100:etc etc.
We currently employ Apex to provide an insurance quotation engine for a third party and rely on a link on their pages to direct customers to our application.
My question is...
Is it possible to include (in a similar manner to say php) request variables - the client requires a 'customer friendly URL' i.e. www.myinsurance.com/apex/travel.insurance as opposed to www.myinsurance/apex/p?f=100:1:::::::::::::::::
I assume it is not possible to link to an Apex app using www.myinsurance.com/apex/travel.insurance?referrer=STAFFMEMBER
Please could you explain if it is possible to pass values in a 'customer friendly' URL to an apex application and if so how (or if not prepared to tell me, point me in the right direction of some reference material).
Regards
JohnHi John,
the Apache module mod_rewrite is the way to go. They can use the URL format they want to have and as soon this URL request goes to your Apache, it will be "translated" to the format APEX requires.
Patrick
My APEX Blog: http://inside-apex.blogspot.com
The ApexLib Framework: http://apexlib.sourceforge.net
The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/ -
Scripting /Expressions in AE: Similar to Flash/ActionScript?
I think about learning AE, but I would like to get an overview about the Software, so that I can decide if it's suitable for what I am planning to do.
I have little experience in Flash/ActionScript, but I can't get a picture what Scripting means in AE. Can this be compared to Script-Languages like ActionScript and Lingo?
And what is the difference between "Scripting" and "Expressions" in AE.
Thank's!
RolandExpressions are layer-based formulae/commands that manipulate the layer and its content/effects based on factors such as time, random number generation, variables, and other layers and elements within the project. An expression can only change elements of the layer parameter to which it is applied - it cannot alter any other layer or parameter within your project, although it can "see" changes in other elements and react accordingly.
AE Scripting, however, is an application-wide scripting language, which can perform almost any possible function within AE, from creating new projects, comps and layers, to reading data from external files, sending emails etc.
Both are customized adaptations of Java Script. Both were developed independently of Flash Actionscript, so while they share similarities, they are not the same.
One of the best places to learn about AE Scripts and Expressions is Dan Ebbert's fantastic site:
http://www.motionscript.com
And, of course, the AE manual. Expressions:
http://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7a39a.htm l
Scripting:
http://help.adobe.com/en_US/AfterEffects/9.0/WSD2616887-A41E-4a39-85FE-957B9D2D3843.html -
I get a pop up of "adobe flash player settings" requesting local storage. It will not respond to either deny or accept. Please help.
From the menu bar, select
▹ System Preferences... ▹ Flash Player ▹ Storage
Select either one of the radio buttons marked
Allow sites to save information on this computer
Block all sites from storing information on this computer
according to your preference. The usual display of Flash content doesn't require that you allow it to save information. Note also that this setting only affects Flash; it has no effect on web cookies or AutoFill. -
Hi Bentley,
I wanted to tell you that an important link you posted does
not work and says "Sorry, this page is not available".
It is in your post entitled "Locked [ADOBE FYI] : Getting
Support for Flash Player 10 and Issue Tracking post", and is at
http://www.adobe.com/cfusion/webforums/forum/messageview.cfmforumid=44&catid=184&threadid= 1400586&enterthread=y.
The link that is non-functional is "If you have issues
installing Flash Player 10, first troubleshoot your issues using
http://www.adobe.com/support/flashplayer.
Read the technotes, do some testing.".
I just wanted you to know, since you have gone to all of the
effort of posting it. I apologize for having to start a new thread,
but I was unable to post to your thread, since it is locked and
read-only.
This is the issue I am dealing with myself, and desperately
need help with. :)
Thank you so very much,
KarenHi Bentley,
I just noticed something. The link that I pasted, to your
post, does not work either. I noticed why, however, and it seems to
be why the link in your original page does not work, and why the
link in my post that goes to your post does not work.
It seems to be that if a link has a period after it (i.e., if
it is at the end of a sentence), the period is incorrectly included
in the "real" link. Somehow, whatever mechanism that processes the
post has a mini bug in it.
If you go to the link that is results in "Sorry, this page is
not available", and look up into the browser address bar, you will
see the period there each time.
I just thought that I would point this out, too, so that the
web techs in charge of the workings of the forums could look into
it.
Here is the original link, without a period after it, to your
original page.
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=44&catid=184&threadid =1400586&enterthread=y
Thank you again,
Karen -
Flash Header/Navigation Reload Issue
I have been researching all day and there are many different solutions, none that are straight forward. I am currently in the process of making a website in Dreamweaver which has a flash header. Problem is the flash header reloads when you go to every page. Is there a simple (I'm a noob) way I can get the flash header to stay open at the top of the website, and the content of each page just change when you go to each page. Thus the flash header and nav buttons do not reload on every page. To review the pages so far; http://www.itrelocation.ca/MiniMe/index.html.
I thank you in advance. More detail concerning the fix is greatly appreciated.I think frames is the only choice you're gonna have.
I don't know of anything else that allows you to keep one thing loaded while changing other content except Flash itself. So the only other solution I know of would be to create the site entirely in Flash... no issues reloading anything there once the site is loaded.
Wait, there is another approach you could consider, using DHTML. It is a browser dependent approach. If you look at the source code of this page it uses that approach. The content that changes is written into javascript variables in the head section. I made this quite a few years ago for a client, but I haven't heard any complaints about it failing yet...
http://www.h-and-m-analytical.com/services.htm
Maybe you are looking for
-
My old laptop died and even with my sync key I can't get my bookmarks onto my new laptop
Ok, so I had my old laptop synced up with my iphone. I downloaded firefox beta onto my new laptop and went to set up my sync account> Since I cannot enter those number codes on the app (or at least I couldn't figure out how to), I just put in my sync
-
i cannot mirror from ipad or ipad air to a samsung smart tv via appletv.Any ideas please?
-
Help on iphone and ipod touch sync
i have an ipod touch, and i just rescently purchased a iphone 4s. I want to use the same apple id for both, but i don't want all the apps and music i have now on my ipod touch. if i plug in my iphone on the same comp and itunes will it sync all the a
-
Dreamweaver cc 2014 : why do I get error 404 on menu list item on only one list item?
I have a list on my menu that only the last item 2009-2014 will not function. All other links in the list work. coding is the same on all items but having been trying for days and unable to get 2009-2014 to work no matter how many times I create and
-
Reset WLAN network configuration - What .plist file?
I would like to reset my wireless network configurations, delete all network related preferences and settings and start over. This helped me before to solve a problem that I was unable to connect to a network at work. The 802.11x settings won't load