getURL() in as2 - actionscript-3

Hello friends my code is too big u can download here zip file http://www.filefactory.com/file/6bvfmmx3zpet/n/New_folder_4_rar
i have downloded this code from internet .. this is working fine the problem is when this code get end then the web page jump to a URL i tried to put
getURL("http://www.adobe.com","_self");
but its not working may be i m not aware where to put this code .... plz help me
EDIT
you can read my code here .. jsfiddle.net/uM9zr
Thanks in advance

I cannot tell from your question whether you as using AS2 or AS3 as you mention both, but getURL is not supported in AS3:
ActionScript 3 - What happened to GetURL?

Try replacing "_self" with "_blank". This will open the link in a new tab, but should solve your problem of the URL not opening.
Also Mitch should read the title. AS2 was a quite obvious part of your question.

Related

Rewrite URL convert to Lation charcter asp.net

hey guys in first place i would be thankful for all of you
im using asp.net im trying to rewrite my URL but i have an issue that when I'm trying to share my link or write it in my XML sitemap file it's become that's way
https://www.me-future.com/Articl/3157/%D8%A7%D8%AD%D8%B0%D8%B1-%D9%85%D9%86-%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85-%D9%87%D8%A7%D8%AA%D9%81%D9%83-%D8%A7%D9%84%D9%85%D8%AD%D9%85%D9%88%D9%84-%D9%81%D9%8A-%D8%AA%D9%84%D9%83-%D8%A7%D9%84%D8%AD%D8%A7%D9%84%D8%A7%D8%AA-
but my URL should be that's way
https://www.me-future.com/Articl/3157/احذر-من-استخدام-هاتفك-المحمول-في-تلك-الحالات
thx a lot for your help guys and thx for your time
Get the original url before sharing it to the others like this :
var originalUrl = System.Net.WebUtility.UrlDecode("https://www.me-future.com/Articl/3157/%D8%A7%D8%AD%D8%B0%D8%B1-%D9%85%D9%86-%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85-%D9%87%D8%A7%D8%AA%D9%81%D9%83-%D8%A7%D9%84%D9%85%D8%AD%D9%85%D9%88%D9%84-%D9%81%D9%8A-%D8%AA%D9%84%D9%83-%D8%A7%D9%84%D8%AD%D8%A7%D9%84%D8%A7%D8%AA-");

How to properly create a pdf with fpdf?

I have some code to try to create a single PDF document but i can't do it.
code :
<%# language="vbscript"%>
<!--#include file="fpdf.asp"-->
<%
if Request.form("test") <> "" Then
Set pdf=CreateJsObject("FPDF")
pdf.CreatePDF()
pdf.SetPath("fpdf/")
pdf.SetFont "Arial","",16
pdf.Open()
pdf.AddPage()
pdf.Cell 40,10,"Hello Word!"
pdf.Close()
pdf.Output("list.pdf","T")
End If
%>
So, (dont mind with the request.form for execute..lol)
when i click the button i get :
"FPDF error: Unable to create output file: list.pdf"
I've tried some sites for help and done alot of things and searched here on stack and found some useful things but nothing directed to this ...
Any help would be appreciated ! I can try to answer any questions you may have about the code or something else.
Also, if you have another solution for creating PDF's with classic ASP, please lemme know (free or very low price)
Thanks for your attention !
I've specified the path of Output to a VIRTUAL location and it Works great !
Thanks Every one for your help !
Best Regards

Watir-Webdriver : take screenshot upon error/exception/fail. How to?

I am new to Watir-Webdriver. I have written a function to take the screenshot and it works fine. My problem is I need to call the method, upon any error/exception or fail happening during my testcase execution. I have googled it and couldn't find anything related. I have tried rescue block but it doesn't work for me. Any help is appreciated.
Thanks,
Alex
Alister Scott has this about getting screenshots on WatirMelon when using cucumber:
After do |scenario|
if scenario.failed?
Dir::mkdir('screenshots') if not File.directory?('screenshots')
screenshot = "./screenshots/FAILED_#{scenario.name.gsub(' ','_').gsub(/[^0-9A-Za-z_]/, '')}.png"
Browser::BROWSER.driver.save_screenshot(screenshot)
embed screenshot, 'image/png'
end
end

Embedding fonts: "Font with plain weight and style was not found at..."

I am trying to embed a font in my Flash Builder 4.6 project, so far unsuccessful.
I searched around and found this fix, adding "-managers flash.fonts.AFEFontManager" to the Compiler, doesn't work. I've embedded tons of images to the same project, but I'm not sure what's going on with the embedding of fonts.
I get this error:
Multiple markers at this line:
-unable to build font 'Chinese Rocks Rg'
-exception during transcoding: Font for alias 'Chinese Rocks Rg' with plain weight and style was not found at: file:/E:/StarlingIntro - >Finished/src/../assets/textures/chinese_rocks_rg.otf
-Unable to transcode ../assets/textures/chinese_rocks_rg.otf.
For the following code:
[Embed(source="../assets/textures/chinese_rocks_rg.otf", fontName="Chinese Rocks Rg", fontWeight="normal", advancedAntiAliasing="true", embedAsCFF=false, mimeType = "application/x-font")]
public var ChineseRocks_FontClass:Class;
public var chineseRocks_textFromat:TextFormat = new TextFormat("Chinese Rocks Rg");
What do they mean was not found? It's the same path as everything else I've embedded. Does it mean that it's expecting a certain "style" from the .otf file? Wut?
Thanks for any info on this!
PS: it gives the same error for other fonts as well, for example MyriadWebPro.ttf.
[EDIT]
Okay, here's what's going on. I am using this embed code right now:
[Embed(source="chinese_rocks_rg.otf", //yes, it's in my src folder because I'm paranoid
fontName = "myChineseRocks",
mimeType = "application/x-font",
fontWeight="normal",
fontStyle="normal",
unicodeRange="englishRange",
advancedAntiAliasing="true"
)]//embedAsCFF="false"
I have commented out the embedAsCFF, because I tried it with the -managers=flash.fonts.AFEFontManager compiler parameter. None of the two work.
This is in Flash Builder 4.6, using Flex SDK 4.6.0. Now, if I switch to Flex SDK 3.6.0, the error seems to go away, but I can't use 3.6.0 since I'm using the Starling Stage3D framework.
Is it possible that stuff changed from 4.0 to 4.6, and now your article, Divillysausages, (which really illuminated me btw) doesn't apply to it?
[EDIT2]
I solved it! With the help of Divillysausages and his patience :).
Basically, I was completely stupid. I had a "#" and 2x" ` "s in the actual path to my project. I KNEW having those dumb folder names would screw my stuff up some day! And sure enough it did -with Java, but I moved Eclipse out of there a long time ago and forgot about it.
Anyway, I moved the flash project to a more friendly directory and included the embedAsCFF="false" and it worked.
Also, having -managers=flash.fonts.AFEFontManager in your compiler arguments or not, seems to not matter.
fontWeight="regular", doesn't exist. You're probably looking for fontWeight="normal" (or "bold", or "heavy")
Basically what your error is telling you that in the font you're trying to load, it couldn't find the weight "regular", so it can't be embedded.
I wrote this a while ago to explain font embedding, it might help: http://divillysausages.com/blog/as3_font_embedding_masterclass
Be sure you are not overwriting the default flex config file. If you need some config property append them in Additionnal compiler arguments : -load-config+=configFile.xml rather than -load-config configFile.xml It solve our trouble
I had the same issue embeding .otf font to starling project.
Resolved it by converting the otf file to ttf
Good luck

Can't see my site's flash map in an Iframe

I have a website, which includes a flash map ( http://www.megalim.co.il/ ).
I try to place an iframe tag in another site(another domain), with my site as a source, it goes well except for the flash map ( I see a white box instead ).
You can see it: http://www.netravel.co.il/Megalim/
I have to note that I get the following error:
Unsafe JavaScript attempt to access frame with URL http://www.netravel.co.il/Megalim/ from frame with URL http://www.megalim.co.il/. Domains, protocols and ports must match.
Unable to post message to http://googleads.g.doubleclick.net. Recipient has origin http://www.megalim.co.il.
Hope you can help me, thanks from advance,
Ben
Sorry for the delay, seems like it was an issue of cross-browsers' scripting...