Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- /**
- * ...
- * @author Denis Maslov
- */
- public class Url
- {
- public function Url()
- {
- if (string.indexOf('photo') != -1)
- {
- var str:String = "sdsdsdsdsd";
- var txt:Array;
- var exp:RegExp = new RegExp('photo([-, 0-9, _]*)');
- txt = string.match(exp);
- Main.VK.api('photos.getById', {photos: txt[1], extended: 0}, processingUrl(str), vkError);
- }
- else
- {
- trace("Error");
- }
- }
- public static function processingUrl(string:String):Function
- {
- return function(e:Object):String
- {
- trace(e[0]['src_big']);
- }
- }
- private static function vkError(e:String):void
- {
- trace(e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement